|
@@ -82,7 +82,7 @@
|
|
|
>
|
|
>
|
|
|
<el-col v-bind="{ span: 4 }">
|
|
<el-col v-bind="{ span: 4 }">
|
|
|
<el-form-item label="分类:" label-width="60px">
|
|
<el-form-item label="分类:" label-width="60px">
|
|
|
- <el-select v-model="params.dictType">
|
|
|
|
|
|
|
+ <el-select v-model="params.dictType" @change="changeDictTypeChange">
|
|
|
<el-option
|
|
<el-option
|
|
|
v-for="(item, index) in dictList[
|
|
v-for="(item, index) in dictList[
|
|
|
'collaborative_type'
|
|
'collaborative_type'
|
|
@@ -96,10 +96,10 @@
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col v-bind="{ span: 4 }">
|
|
<el-col v-bind="{ span: 4 }">
|
|
|
<el-form-item label="单据:" label-width="60px">
|
|
<el-form-item label="单据:" label-width="60px">
|
|
|
- <el-select v-model="params.formId">
|
|
|
|
|
|
|
+ <el-select v-model="params.formId" @change="changeFormIdChange">
|
|
|
<el-option
|
|
<el-option
|
|
|
v-for="(item, index) in templateList[
|
|
v-for="(item, index) in templateList[
|
|
|
- params.dictType
|
|
|
|
|
|
|
+ currentDictType
|
|
|
]"
|
|
]"
|
|
|
:key="index"
|
|
:key="index"
|
|
|
:value="item.id"
|
|
:value="item.id"
|
|
@@ -289,7 +289,7 @@
|
|
|
>
|
|
>
|
|
|
<el-col v-bind="{ span: 4 }">
|
|
<el-col v-bind="{ span: 4 }">
|
|
|
<el-form-item label="分类:" label-width="60px">
|
|
<el-form-item label="分类:" label-width="60px">
|
|
|
- <el-select v-model="params.dictType">
|
|
|
|
|
|
|
+ <el-select v-model="params.dictType" @change="changeDictTypeChange">
|
|
|
<el-option
|
|
<el-option
|
|
|
v-for="(item, index) in dictList[
|
|
v-for="(item, index) in dictList[
|
|
|
'collaborative_type'
|
|
'collaborative_type'
|
|
@@ -303,7 +303,7 @@
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col v-bind="{ span: 4 }">
|
|
<el-col v-bind="{ span: 4 }">
|
|
|
<el-form-item label="单据:" label-width="60px">
|
|
<el-form-item label="单据:" label-width="60px">
|
|
|
- <el-select v-model="params.formId">
|
|
|
|
|
|
|
+ <el-select v-model="params.formId" @change="changeFormIdChange">
|
|
|
<el-option
|
|
<el-option
|
|
|
v-for="(item, index) in defaultTemplateList"
|
|
v-for="(item, index) in defaultTemplateList"
|
|
|
:key="index"
|
|
:key="index"
|
|
@@ -488,8 +488,8 @@
|
|
|
style="display: flex; align-items: center"
|
|
style="display: flex; align-items: center"
|
|
|
>
|
|
>
|
|
|
<el-col v-bind="{ span: 4 }">
|
|
<el-col v-bind="{ span: 4 }">
|
|
|
- <el-form-item label="单据:" label-width="60px">
|
|
|
|
|
- <el-select v-model="params.dictType">
|
|
|
|
|
|
|
+ <el-form-item label="分类:" label-width="60px">
|
|
|
|
|
+ <el-select v-model="params.dictType" @change="changeDictTypeChange">
|
|
|
<el-option
|
|
<el-option
|
|
|
v-for="(item, index) in dictList[
|
|
v-for="(item, index) in dictList[
|
|
|
'collaborative_type'
|
|
'collaborative_type'
|
|
@@ -502,8 +502,8 @@
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col v-bind="{ span: 4 }">
|
|
<el-col v-bind="{ span: 4 }">
|
|
|
- <el-form-item label="分类:" label-width="60px">
|
|
|
|
|
- <el-select v-model="params.formId">
|
|
|
|
|
|
|
+ <el-form-item label="单据:" label-width="60px">
|
|
|
|
|
+ <el-select v-model="params.formId" @change="changeFormIdChange">
|
|
|
<el-option
|
|
<el-option
|
|
|
v-for="(item, index) in defaultTemplateList"
|
|
v-for="(item, index) in defaultTemplateList"
|
|
|
:key="index"
|
|
:key="index"
|
|
@@ -690,7 +690,7 @@
|
|
|
>
|
|
>
|
|
|
<el-col v-bind="{ span: 4 }">
|
|
<el-col v-bind="{ span: 4 }">
|
|
|
<el-form-item label="分类:" label-width="60px">
|
|
<el-form-item label="分类:" label-width="60px">
|
|
|
- <el-select v-model="params.dictType">
|
|
|
|
|
|
|
+ <el-select v-model="params.dictType" @change="changeDictTypeChange">
|
|
|
<el-option
|
|
<el-option
|
|
|
v-for="(item, index) in dictList[
|
|
v-for="(item, index) in dictList[
|
|
|
'collaborative_type'
|
|
'collaborative_type'
|
|
@@ -704,7 +704,7 @@
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col v-bind="{ span: 4 }">
|
|
<el-col v-bind="{ span: 4 }">
|
|
|
<el-form-item label="单据:" label-width="60px">
|
|
<el-form-item label="单据:" label-width="60px">
|
|
|
- <el-select v-model="params.formId">
|
|
|
|
|
|
|
+ <el-select v-model="params.formId" @change="changeFormIdChange">
|
|
|
<el-option
|
|
<el-option
|
|
|
v-for="(item, index) in defaultTemplateList"
|
|
v-for="(item, index) in defaultTemplateList"
|
|
|
:key="index"
|
|
:key="index"
|
|
@@ -900,6 +900,8 @@
|
|
|
mixins: [dictMixins, tabMixins],
|
|
mixins: [dictMixins, tabMixins],
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
|
|
+ currentDictType: '',
|
|
|
|
|
+ currentFormId: '',
|
|
|
cacheKeyUrl: 'wt-eaf1548b-collaborative',
|
|
cacheKeyUrl: 'wt-eaf1548b-collaborative',
|
|
|
configFormDialogFlag: false,
|
|
configFormDialogFlag: false,
|
|
|
processSubmitDialogFlag: false,
|
|
processSubmitDialogFlag: false,
|
|
@@ -1134,23 +1136,26 @@
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
watch: {
|
|
watch: {
|
|
|
- 'params.formId': {
|
|
|
|
|
- handler(val) {
|
|
|
|
|
- this.allReload();
|
|
|
|
|
- this.reload();
|
|
|
|
|
- this.deptReload();
|
|
|
|
|
- this.noticeReload();
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- 'params.dictType': {
|
|
|
|
|
- handler(val) {
|
|
|
|
|
- this.params.formId = this.templateList[val][0].id;
|
|
|
|
|
- this.allReload();
|
|
|
|
|
- this.reload();
|
|
|
|
|
- this.deptReload();
|
|
|
|
|
- this.noticeReload();
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // currentFormId: {
|
|
|
|
|
+ // handler(val) {
|
|
|
|
|
+ // this.params.formId = this.params.dictType ? this.templateList[val][0].id : '';
|
|
|
|
|
+ // this.currentFormId = this.templateList[this.currentDictType][0].id;
|
|
|
|
|
+ // this.allReload();
|
|
|
|
|
+ // this.reload();
|
|
|
|
|
+ // this.deptReload();
|
|
|
|
|
+ // this.noticeReload();
|
|
|
|
|
+ // }
|
|
|
|
|
+ // },
|
|
|
|
|
+ // currentDictType: {
|
|
|
|
|
+ // handler(val) {
|
|
|
|
|
+ // this.params.formId = this.templateList[val][0].id;
|
|
|
|
|
+ // this.currentFormId = this.templateList[val][0].id;
|
|
|
|
|
+ // this.allReload();
|
|
|
|
|
+ // this.reload();
|
|
|
|
|
+ // this.deptReload();
|
|
|
|
|
+ // this.noticeReload();
|
|
|
|
|
+ // }
|
|
|
|
|
+ // }
|
|
|
},
|
|
},
|
|
|
async created() {
|
|
async created() {
|
|
|
await this.getDictList('collaborative_type');
|
|
await this.getDictList('collaborative_type');
|
|
@@ -1207,8 +1212,10 @@
|
|
|
this.templateList = _.groupBy(this.defaultTemplateList, 'dictType');
|
|
this.templateList = _.groupBy(this.defaultTemplateList, 'dictType');
|
|
|
this.params.dictType = this.dictList['collaborative_type'][0].value;
|
|
this.params.dictType = this.dictList['collaborative_type'][0].value;
|
|
|
this.params.formId = this.defaultTemplateList[0]?.id;
|
|
this.params.formId = this.defaultTemplateList[0]?.id;
|
|
|
|
|
+ this.currentDictType = this.dictList['collaborative_type'][0].value;
|
|
|
|
|
+ this.currentFormId = this.templateList[this.currentDictType][0]?.id;
|
|
|
let makingJson =
|
|
let makingJson =
|
|
|
- JSON.parse(this.defaultTemplateList[0].formJson.makingJson) || {};
|
|
|
|
|
|
|
+ JSON.parse(this.defaultTemplateList?.[0]?.formJson?.makingJson) || {};
|
|
|
console.log('makingJson~~~', makingJson);
|
|
console.log('makingJson~~~', makingJson);
|
|
|
this.formColumnList = makingJson.list;
|
|
this.formColumnList = makingJson.list;
|
|
|
console.log(this.formColumnList);
|
|
console.log(this.formColumnList);
|
|
@@ -1221,6 +1228,7 @@
|
|
|
},
|
|
},
|
|
|
/* 表格数据源 */
|
|
/* 表格数据源 */
|
|
|
async allDatasource({ page, limit, where, order }) {
|
|
async allDatasource({ page, limit, where, order }) {
|
|
|
|
|
+ console.log('allDatasource~~~', this.params);
|
|
|
let [createTimeBegin, createTimeEnd] = this.createTime1 || [];
|
|
let [createTimeBegin, createTimeEnd] = this.createTime1 || [];
|
|
|
let data = await getProcessInstanceAllPage({
|
|
let data = await getProcessInstanceAllPage({
|
|
|
pageNo: page,
|
|
pageNo: page,
|
|
@@ -1248,20 +1256,26 @@
|
|
|
},
|
|
},
|
|
|
/* 刷新表格 */
|
|
/* 刷新表格 */
|
|
|
allReload(where) {
|
|
allReload(where) {
|
|
|
|
|
+ console.log('allReload~~~', this.params);
|
|
|
let find =
|
|
let find =
|
|
|
this.defaultTemplateList.find(
|
|
this.defaultTemplateList.find(
|
|
|
- (item) => item.id == this.params.formId
|
|
|
|
|
|
|
+ (item) => item.id == this.currentFormId
|
|
|
) || {};
|
|
) || {};
|
|
|
- let makingJson = JSON.parse(find.formJson.makingJson) || {};
|
|
|
|
|
|
|
+ let makingJson = find.formJson?.makingJson ? JSON.parse(find.formJson.makingJson) || {} : {};
|
|
|
this.formColumnList = makingJson.list;
|
|
this.formColumnList = makingJson.list;
|
|
|
- this.$refs.allTable.reload({ page: 1, where });
|
|
|
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
|
+ this.$refs.allTable.reload({ page: 1, where });
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
/* 重置 */
|
|
/* 重置 */
|
|
|
allReset() {
|
|
allReset() {
|
|
|
this.params = { ...defaultParams };
|
|
this.params = { ...defaultParams };
|
|
|
this.createTime1 = [];
|
|
this.createTime1 = [];
|
|
|
- this.params.formId = this.defaultTemplateList[0]?.id;
|
|
|
|
|
- this.params.dictType = this.dictList['collaborative_type'][0].value;
|
|
|
|
|
|
|
+ this.currentDictType = this.dictList['collaborative_type'][0].value;
|
|
|
|
|
+ this.currentFormId = this.templateList?.[this.currentDictType]?.[0]?.id;
|
|
|
|
|
+ this.params.dictType = '';
|
|
|
|
|
+ this.params.formId = '';
|
|
|
|
|
+ console.log('allReset~~~', this.params);
|
|
|
this.allReload();
|
|
this.allReload();
|
|
|
},
|
|
},
|
|
|
/* 表格数据源 */
|
|
/* 表格数据源 */
|
|
@@ -1288,12 +1302,13 @@
|
|
|
reload(where) {
|
|
reload(where) {
|
|
|
let find =
|
|
let find =
|
|
|
this.defaultTemplateList.find(
|
|
this.defaultTemplateList.find(
|
|
|
- (item) => item.id == this.params.formId
|
|
|
|
|
|
|
+ (item) => item.id == this.currentFormId
|
|
|
) || {};
|
|
) || {};
|
|
|
- let makingJson = JSON.parse(find.formJson.makingJson) || {};
|
|
|
|
|
|
|
+ let makingJson = find.formJson?.makingJson ? JSON.parse(find.formJson.makingJson) || {} : {};
|
|
|
this.formColumnList = makingJson.list;
|
|
this.formColumnList = makingJson.list;
|
|
|
- this.$refs.table.reload({ page: 1, where });
|
|
|
|
|
- this.$refs.table.reRenderTable();
|
|
|
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
|
+ this.$refs.table.reload({ page: 1, where });
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
/* 重置 */
|
|
/* 重置 */
|
|
@@ -1302,7 +1317,8 @@
|
|
|
this.createTime1 = [];
|
|
this.createTime1 = [];
|
|
|
this.params.dictType = this.dictList['collaborative_type'][0].value;
|
|
this.params.dictType = this.dictList['collaborative_type'][0].value;
|
|
|
this.params.formId = this.templateList[this.params.dictType][0]?.id;
|
|
this.params.formId = this.templateList[this.params.dictType][0]?.id;
|
|
|
-
|
|
|
|
|
|
|
+ this.currentDictType = this.dictList['collaborative_type'][0].value;
|
|
|
|
|
+ this.currentFormId = this.templateList[this.currentDictType][0]?.id;
|
|
|
this.reload();
|
|
this.reload();
|
|
|
},
|
|
},
|
|
|
/* 表格数据源 */
|
|
/* 表格数据源 */
|
|
@@ -1328,12 +1344,13 @@
|
|
|
deptReload(where) {
|
|
deptReload(where) {
|
|
|
let find =
|
|
let find =
|
|
|
this.defaultTemplateList.find(
|
|
this.defaultTemplateList.find(
|
|
|
- (item) => item.id == this.params.formId
|
|
|
|
|
|
|
+ (item) => item.id == this.currentFormId
|
|
|
) || {};
|
|
) || {};
|
|
|
- let makingJson = JSON.parse(find.formJson.makingJson) || {};
|
|
|
|
|
|
|
+ let makingJson = find.formJson?.makingJson ? JSON.parse(find.formJson.makingJson) || {} : {};
|
|
|
this.formColumnList = makingJson.list;
|
|
this.formColumnList = makingJson.list;
|
|
|
-
|
|
|
|
|
- this.$refs.deptTable.reload({ page: 1, where });
|
|
|
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
|
+ this.$refs.deptTable.reload({ page: 1, where });
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
/* 重置 */
|
|
/* 重置 */
|
|
|
deptReset() {
|
|
deptReset() {
|
|
@@ -1341,6 +1358,8 @@
|
|
|
this.createTime1 = [];
|
|
this.createTime1 = [];
|
|
|
this.params.formId = this.defaultTemplateList[0]?.id;
|
|
this.params.formId = this.defaultTemplateList[0]?.id;
|
|
|
this.params.dictType = this.dictList['collaborative_type'][0].value;
|
|
this.params.dictType = this.dictList['collaborative_type'][0].value;
|
|
|
|
|
+ this.currentDictType = this.dictList['collaborative_type'][0].value;
|
|
|
|
|
+ this.currentFormId = this.templateList[this.currentDictType][0]?.id;
|
|
|
this.deptReload();
|
|
this.deptReload();
|
|
|
},
|
|
},
|
|
|
/* 表格数据源 */
|
|
/* 表格数据源 */
|
|
@@ -1369,7 +1388,7 @@
|
|
|
this.defaultTemplateList.find(
|
|
this.defaultTemplateList.find(
|
|
|
(item) => item.id == this.params.formId
|
|
(item) => item.id == this.params.formId
|
|
|
) || {};
|
|
) || {};
|
|
|
- let makingJson = JSON.parse(find.formJson.makingJson) || {};
|
|
|
|
|
|
|
+ let makingJson = find.formJson?.makingJson ? JSON.parse(find.formJson.makingJson) || {} : {};
|
|
|
this.formColumnList = makingJson.list;
|
|
this.formColumnList = makingJson.list;
|
|
|
this.$refs.noticeTable.reload({ page: 1, where });
|
|
this.$refs.noticeTable.reload({ page: 1, where });
|
|
|
},
|
|
},
|
|
@@ -1380,6 +1399,8 @@
|
|
|
|
|
|
|
|
this.params.formId = this.defaultTemplateList[0]?.id;
|
|
this.params.formId = this.defaultTemplateList[0]?.id;
|
|
|
this.params.dictType = this.dictList['collaborative_type'][0].value;
|
|
this.params.dictType = this.dictList['collaborative_type'][0].value;
|
|
|
|
|
+ this.currentDictType = this.dictList['collaborative_type'][0].value;
|
|
|
|
|
+ this.currentFormId = this.templateList[this.currentDictType][0]?.id;
|
|
|
this.noticeReload();
|
|
this.noticeReload();
|
|
|
},
|
|
},
|
|
|
/** */
|
|
/** */
|
|
@@ -1422,7 +1443,23 @@
|
|
|
} else if (this.activeName == 'notice') {
|
|
} else if (this.activeName == 'notice') {
|
|
|
this.noticeReset();
|
|
this.noticeReset();
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ changeDictTypeChange(v) {
|
|
|
|
|
+ this.currentDictType = v;
|
|
|
|
|
+ this.params.formId = this.templateList[v][0]?.id;
|
|
|
|
|
+ this.currentFormId = this.templateList[v][0]?.id;
|
|
|
|
|
+ this.allReload();
|
|
|
|
|
+ this.reload();
|
|
|
|
|
+ this.deptReload();
|
|
|
|
|
+ this.noticeReload();
|
|
|
|
|
+ },
|
|
|
|
|
+ changeFormIdChange(v) {
|
|
|
|
|
+ this.currentFormId = v;
|
|
|
|
|
+ this.allReload();
|
|
|
|
|
+ this.reload();
|
|
|
|
|
+ this.deptReload();
|
|
|
|
|
+ this.noticeReload();
|
|
|
|
|
+ },
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|