flat: 修改些条件

This commit is contained in:
Apcallover
2024-05-21 14:29:41 +08:00
parent e970733bd0
commit 195ceb284d
13 changed files with 558 additions and 534 deletions

View File

@@ -112,3 +112,12 @@ export const getDeptMyTree = (params) => {
params params
}) })
} }
export const getDeptAllTree = (params) => {
return request({
url: '/api/jobslink-api/system/dept/all-tree',
method: 'get',
params
})
}

View File

@@ -13,7 +13,9 @@
:show-file-list="false" :show-file-list="false"
:http-request="allUpload" :http-request="allUpload"
:multiple="false" :multiple="false"
><el-button size="small" type="primary">点击上传</el-button></el-upload> >
<el-button size="small" type="primary">点击上传</el-button>
</el-upload>
</div> </div>
<avue-input disabled v-model="policyFileUrl" placeholder="点击上传文件"></avue-input> <avue-input disabled v-model="policyFileUrl" placeholder="点击上传文件"></avue-input>
</div> </div>
@@ -26,37 +28,37 @@
</el-col> </el-col>
</el-row> </el-row>
</basic-container> </basic-container>
</template> </template>
<script> <script>
import 'quill/dist/quill.core.css' import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css' import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css' import 'quill/dist/quill.bubble.css'
import { quillEditor } from "vue-quill-editor"; import {quillEditor} from "vue-quill-editor";
import { addNews, getNewsDetail, editNews } from "@/api/manage/news" import {addNews, getNewsDetail, editNews} from "@/api/manage/news"
import { putFile } from "@/api/resource/oss"; import {putFile} from "@/api/resource/oss";
import Tinymce from "@/components/Tinymce"; import Tinymce from "@/components/Tinymce";
import {getClassifyDic} from '@/api/help/article/classify' import {getClassifyDic} from '@/api/help/article/classify'
const toolbarItems = [ const toolbarItems = [
["bold", "italic", "underline", "strike"], // 加粗 斜体 下划线 删除线 ["bold", "italic", "underline", "strike"], // 加粗 斜体 下划线 删除线
["blockquote", "code-block"], // 引用 代码块 ["blockquote", "code-block"], // 引用 代码块
[{ header: 1 }, { header: 2 }], // 1、2 级标题 [{header: 1}, {header: 2}], // 1、2 级标题
[{ list: "ordered" }, { list: "bullet" }], // 有序、无序列表 [{list: "ordered"}, {list: "bullet"}], // 有序、无序列表
[{ script: "sub" }, { script: "super" }], // 上标/下标 [{script: "sub"}, {script: "super"}], // 上标/下标
[{ indent: "-1" }, { indent: "+1" }], // 缩进 [{indent: "-1"}, {indent: "+1"}], // 缩进
// [{'direction': 'rtl'}], // 文本方向 // [{'direction': 'rtl'}], // 文本方向
[{ size: ["small", false, "large", "huge"] }], // 字体大小 [{size: ["small", false, "large", "huge"]}], // 字体大小
[{ header: [1, 2, 3, 4, 5, 6, false] }], // 标题 [{header: [1, 2, 3, 4, 5, 6, false]}], // 标题
[{ color: [] }, { background: [] }], // 字体颜色、字体背景颜色 [{color: []}, {background: []}], // 字体颜色、字体背景颜色
[{ font: [] }], // 字体种类 [{font: []}], // 字体种类
[{ align: [] }], // 对齐方式 [{align: []}], // 对齐方式
["clean"], // 清除文本格式 ["clean"], // 清除文本格式
["image"], // 链接、图片、视频 ["image"], // 链接、图片、视频
] ]
export default { export default {
components: { quillEditor, Tinymce}, components: {quillEditor, Tinymce},
props: { props: {
id: Number, id: Number,
type: String type: String
@@ -75,7 +77,7 @@
form: { form: {
note: '' note: ''
}, },
description:'', description: '',
formOption: { formOption: {
// labelWidth:120, // labelWidth:120,
column: [ column: [
@@ -84,6 +86,8 @@
"span": 24, "span": 24,
labelWidth: 100, labelWidth: 100,
"prop": "createTime", "prop": "createTime",
format: "yyyy-MM-dd",
valueFormat: "yyyy-MM-dd",
"rules": [ "rules": [
{ {
"required": true, "required": true,
@@ -196,11 +200,10 @@
handleSubmit(form, done) { handleSubmit(form, done) {
// this.form['note'] = this.$refs.tinymce.getContent() // this.form['note'] = this.$refs.tinymce.getContent()
if(this.form.note.length>64*512){ if (this.form.note.length > 64 * 512) {
this.$message.error('文章内容不能超过64KB'); this.$message.error('文章内容不能超过64KB');
done() done()
} } else {
else{
if (this.type == 'add') { if (this.type == 'add') {
addNews( addNews(
this.form.articleTitle, this.form.articleTitle,
@@ -215,8 +218,7 @@
this.$message.success('添加成功'); this.$message.success('添加成功');
this.$router.go(-1); this.$router.go(-1);
}) })
} } else if (this.type == 'edit') {
else if (this.type == 'edit') {
editNews( editNews(
this.id, this.id,
this.form.articleTitle, this.form.articleTitle,
@@ -258,25 +260,26 @@
if (this.id && this.type == 'edit') { if (this.id && this.type == 'edit') {
getNewsDetail(this.id).then(res => { getNewsDetail(this.id).then(res => {
this.form = res.data.data; this.form = res.data.data;
this.description=this.form.description; this.description = this.form.description;
}) })
} }
}, },
}, },
}; };
</script> </script>
<style> <style>
.avatar-uploader { .avatar-uploader {
width: 0; width: 0;
height: 0; height: 0;
display: none; display: none;
} }
.ql-editor { .ql-editor {
height: 400px; height: 400px;
} }
.policyFileUrlWrapper {
.policyFileUrlWrapper {
position: relative; position: relative;
} }
@@ -286,5 +289,4 @@
z-index: 99; z-index: 99;
} }
</style> </style>

View File

@@ -867,9 +867,9 @@ export default {
column: [{ column: [{
label: '服务时间', label: '服务时间',
prop: 'createTime', prop: 'createTime',
type: 'datetime', type: 'date',
format: "yyyy-MM-dd HH:mm:ss", format: "yyyy-MM-dd",
valueFormat: "yyyy-MM-dd HH:mm:ss", valueFormat: "yyyy-MM-dd",
}, { }, {
label: '服务发起人', label: '服务发起人',
prop: 'fromName' prop: 'fromName'

View File

@@ -51,6 +51,7 @@ export default {
dicData: this.depTree, dicData: this.depTree,
props: { props: {
label: "title", label: "title",
value: 'value'
}, },
checkStrictly: true, checkStrictly: true,
slot: true, slot: true,

View File

@@ -140,7 +140,7 @@ import {
detail, detail,
getDept, getDept,
removeDept, removeDept,
upload, getDeptMyTree, upload, getDeptMyTree, getDeptAllTree,
} from "@/api/tenant/talents"; } from "@/api/tenant/talents";
import {getWorkTypes, getLabelList} from "@/api/tenant/common"; import {getWorkTypes, getLabelList} from "@/api/tenant/common";
import {mapGetters} from "vuex"; import {mapGetters} from "vuex";
@@ -196,6 +196,7 @@ export default {
obj: {}, obj: {},
depTree: [], depTree: [],
excelForm: {isCovered: 1}, excelForm: {isCovered: 1},
AllTree: [],
}; };
}, },
components: {addGroups, transferGroups, Resume, ied, TextTooltip}, components: {addGroups, transferGroups, Resume, ied, TextTooltip},
@@ -271,6 +272,7 @@ export default {
dicData: this.depTree, dicData: this.depTree,
props: { props: {
label: "title", label: "title",
value: 'value'
}, },
checkStrictly: true, checkStrictly: true,
span: 24, span: 24,
@@ -489,6 +491,7 @@ export default {
dicData: this.depTree, dicData: this.depTree,
props: { props: {
label: "title", label: "title",
value: 'value'
}, },
checkStrictly: true, checkStrictly: true,
slot: true, slot: true,
@@ -594,11 +597,10 @@ export default {
let params = { let params = {
tenantId: '000000' tenantId: '000000'
} }
let resData = await getDeptMyTree(params) // let resData = await getDeptMyTree(params)
let resData = await getDeptAllTree(params)
if (resData.data.code === 200) { if (resData.data.code === 200) {
this.depTree = resData.data.data this.depTree = resData.data.data
console.log(this.depTree)
} }
}, },
getWorkTypes() { getWorkTypes() {

View File

@@ -13,7 +13,9 @@
:show-file-list="false" :show-file-list="false"
:http-request="allUpload" :http-request="allUpload"
:multiple="false" :multiple="false"
><el-button size="small" type="primary">点击上传</el-button></el-upload> >
<el-button size="small" type="primary">点击上传</el-button>
</el-upload>
</div> </div>
<avue-input disabled v-model="policyFileUrl" placeholder="点击上传文件"></avue-input> <avue-input disabled v-model="policyFileUrl" placeholder="点击上传文件"></avue-input>
</div> </div>
@@ -26,37 +28,37 @@
</el-col> </el-col>
</el-row> </el-row>
</basic-container> </basic-container>
</template> </template>
<script> <script>
import 'quill/dist/quill.core.css' import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css' import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css' import 'quill/dist/quill.bubble.css'
import { quillEditor } from "vue-quill-editor"; import {quillEditor} from "vue-quill-editor";
import { addNews, getNewsDetail, editNews } from "@/api/manage/news" import {addNews, getNewsDetail, editNews} from "@/api/manage/news"
import { putFile } from "@/api/resource/oss"; import {putFile} from "@/api/resource/oss";
import Tinymce from "@/components/Tinymce"; import Tinymce from "@/components/Tinymce";
import {getClassifyDic} from '@/api/help/article/classify' import {getClassifyDic} from '@/api/help/article/classify'
const toolbarItems = [ const toolbarItems = [
["bold", "italic", "underline", "strike"], // 加粗 斜体 下划线 删除线 ["bold", "italic", "underline", "strike"], // 加粗 斜体 下划线 删除线
["blockquote", "code-block"], // 引用 代码块 ["blockquote", "code-block"], // 引用 代码块
[{ header: 1 }, { header: 2 }], // 1、2 级标题 [{header: 1}, {header: 2}], // 1、2 级标题
[{ list: "ordered" }, { list: "bullet" }], // 有序、无序列表 [{list: "ordered"}, {list: "bullet"}], // 有序、无序列表
[{ script: "sub" }, { script: "super" }], // 上标/下标 [{script: "sub"}, {script: "super"}], // 上标/下标
[{ indent: "-1" }, { indent: "+1" }], // 缩进 [{indent: "-1"}, {indent: "+1"}], // 缩进
// [{'direction': 'rtl'}], // 文本方向 // [{'direction': 'rtl'}], // 文本方向
[{ size: ["small", false, "large", "huge"] }], // 字体大小 [{size: ["small", false, "large", "huge"]}], // 字体大小
[{ header: [1, 2, 3, 4, 5, 6, false] }], // 标题 [{header: [1, 2, 3, 4, 5, 6, false]}], // 标题
[{ color: [] }, { background: [] }], // 字体颜色、字体背景颜色 [{color: []}, {background: []}], // 字体颜色、字体背景颜色
[{ font: [] }], // 字体种类 [{font: []}], // 字体种类
[{ align: [] }], // 对齐方式 [{align: []}], // 对齐方式
["clean"], // 清除文本格式 ["clean"], // 清除文本格式
["image"], // 链接、图片、视频 ["image"], // 链接、图片、视频
] ]
export default { export default {
components: { quillEditor, Tinymce}, components: {quillEditor, Tinymce},
props: { props: {
id: Number, id: Number,
type: String type: String
@@ -75,7 +77,7 @@
form: { form: {
note: '' note: ''
}, },
description:'', description: '',
formOption: { formOption: {
// labelWidth:120, // labelWidth:120,
column: [ column: [
@@ -84,6 +86,8 @@
"span": 24, "span": 24,
labelWidth: 100, labelWidth: 100,
"prop": "createTime", "prop": "createTime",
format: "yyyy-MM-dd",
valueFormat: "yyyy-MM-dd",
"rules": [ "rules": [
{ {
"required": true, "required": true,
@@ -196,11 +200,10 @@
handleSubmit(form, done) { handleSubmit(form, done) {
// this.form['note'] = this.$refs.tinymce.getContent() // this.form['note'] = this.$refs.tinymce.getContent()
if(this.form.note.length>64*512){ if (this.form.note.length > 64 * 512) {
this.$message.error('文章内容不能超过64KB'); this.$message.error('文章内容不能超过64KB');
done() done()
} } else {
else{
if (this.type == 'add') { if (this.type == 'add') {
addNews( addNews(
this.form.articleTitle, this.form.articleTitle,
@@ -215,8 +218,7 @@
this.$message.success('添加成功'); this.$message.success('添加成功');
this.$router.go(-1); this.$router.go(-1);
}) })
} } else if (this.type == 'edit') {
else if (this.type == 'edit') {
editNews( editNews(
this.id, this.id,
this.form.articleTitle, this.form.articleTitle,
@@ -258,25 +260,26 @@
if (this.id && this.type == 'edit') { if (this.id && this.type == 'edit') {
getNewsDetail(this.id).then(res => { getNewsDetail(this.id).then(res => {
this.form = res.data.data; this.form = res.data.data;
this.description=this.form.description; this.description = this.form.description;
}) })
} }
}, },
}, },
}; };
</script> </script>
<style> <style>
.avatar-uploader { .avatar-uploader {
width: 0; width: 0;
height: 0; height: 0;
display: none; display: none;
} }
.ql-editor { .ql-editor {
height: 400px; height: 400px;
} }
.policyFileUrlWrapper {
.policyFileUrlWrapper {
position: relative; position: relative;
} }
@@ -286,5 +289,4 @@
z-index: 99; z-index: 99;
} }
</style> </style>

View File

@@ -870,9 +870,9 @@ export default {
column: [{ column: [{
label: '服务时间', label: '服务时间',
prop: 'createTime', prop: 'createTime',
type: 'datetime', type: 'date',
format: "yyyy-MM-dd HH:mm:ss", format: "yyyy-MM-dd",
valueFormat: "yyyy-MM-dd HH:mm:ss", valueFormat: "yyyy-MM-dd",
}, { }, {
label: '服务发起人', label: '服务发起人',
prop: 'fromName' prop: 'fromName'

View File

@@ -51,6 +51,7 @@ export default {
dicData: this.depTree, dicData: this.depTree,
props: { props: {
label: "title", label: "title",
value: 'value'
}, },
checkStrictly: true, checkStrictly: true,
slot: true, slot: true,

View File

@@ -271,6 +271,7 @@ export default {
dicData: this.depTree, dicData: this.depTree,
props: { props: {
label: "title", label: "title",
value: 'value'
}, },
checkStrictly: true, checkStrictly: true,
span: 24, span: 24,

View File

@@ -51,6 +51,7 @@ export default {
dicData: this.depTree, dicData: this.depTree,
props: { props: {
label: "title", label: "title",
value: 'value'
}, },
checkStrictly: true, checkStrictly: true,
slot: true, slot: true,

View File

@@ -273,6 +273,7 @@ export default {
dicData: this.depTree, dicData: this.depTree,
props: { props: {
label: "title", label: "title",
value: 'value'
}, },
checkStrictly: true, checkStrictly: true,
span: 24, span: 24,
@@ -496,6 +497,7 @@ export default {
dicData: this.depTree, dicData: this.depTree,
props: { props: {
label: "title", label: "title",
value: 'value'
}, },
checkStrictly: true, checkStrictly: true,
slot: true, slot: true,

View File

@@ -137,6 +137,7 @@ import {
wageOptionsWithNoMonth, wageOptionsWithNoMonth,
educationState, educationState,
} from "@/common/dic"; } from "@/common/dic";
import {dateFormat} from "@/util/date";
const validateTel = (rule, value, callback) => { const validateTel = (rule, value, callback) => {
if (isvalidatemobile(value)[0]) { if (isvalidatemobile(value)[0]) {
@@ -354,8 +355,9 @@ export default {
valueFormat: "yyyy-MM-dd 00:00:00", valueFormat: "yyyy-MM-dd 00:00:00",
pickerOptions: { pickerOptions: {
disabledDate(time) { disabledDate(time) {
const oneDay = 1000 * 60 * 60 * 24
return !( return !(
time.getTime() > Date.now() && time.getTime() + oneDay > Date.now() &&
(!self.endTime || (!self.endTime ||
(time.getTime() < self.endTime && (time.getTime() < self.endTime &&
time.getTime() > self.endTime - 2678400000)) && time.getTime() > self.endTime - 2678400000)) &&

View File

@@ -474,8 +474,9 @@ export default {
valueFormat: "yyyy-MM-dd 00:00:00", valueFormat: "yyyy-MM-dd 00:00:00",
pickerOptions: { pickerOptions: {
disabledDate(time) { disabledDate(time) {
const oneDay = 1000 * 60 * 60 * 24
return !( return !(
time.getTime() > Date.now() && time.getTime() + oneDay > Date.now() &&
(!self.endTime || (!self.endTime ||
(time.getTime() < self.endTime && (time.getTime() < self.endTime &&
time.getTime() > self.endTime - 2678400000)) && time.getTime() > self.endTime - 2678400000)) &&