0e184ae7 by xukangle

fiix

1 parent 2c28a99b
...@@ -164,8 +164,14 @@ export const deleteCostAssess = (params) => request({ ...@@ -164,8 +164,14 @@ export const deleteCostAssess = (params) => request({
164 }); 164 });
165 165
166 /** 通过价值评估审批 */ 166 /** 通过价值评估审批 */
167 // export const costAssessAllow = (params) => request({
168 // url: `${import.meta.env.VITE_API_NEW_PORTAL}/cost-assessment/allow`,
169 // method: 'post',
170 // data: params
171 // });
172 /** 质量评价审批通过 */
167 export const costAssessAllow = (params) => request({ 173 export const costAssessAllow = (params) => request({
168 url: `${import.meta.env.VITE_API_NEW_PORTAL}/cost-assessment/allow`, 174 url: `${import.meta.env.VITE_API_NEW_PORTAL}/cost-assessment/submit-flow`,
169 method: 'post', 175 method: 'post',
170 data: params 176 data: params
171 }); 177 });
......
...@@ -72,7 +72,7 @@ const textareVal = ref(""); ...@@ -72,7 +72,7 @@ const textareVal = ref("");
72 const headerSearchInputValue = ref(""); 72 const headerSearchInputValue = ref("");
73 73
74 const dialogVisible = computed(() => { 74 const dialogVisible = computed(() => {
75 return props.dialogInfo.visible; 75 return props.dialogInfo?.visible;
76 }); 76 });
77 const showClose = computed(() => { 77 const showClose = computed(() => {
78 return props.dialogInfo.showClose ?? true; 78 return props.dialogInfo.showClose ?? true;
...@@ -99,10 +99,10 @@ const dialogHeight = computed(() => { ...@@ -99,10 +99,10 @@ const dialogHeight = computed(() => {
99 return props.dialogInfo.height ?? "auto"; 99 return props.dialogInfo.height ?? "auto";
100 }); 100 });
101 const dialogTitle = computed(() => { 101 const dialogTitle = computed(() => {
102 return props.dialogInfo.header.title; 102 return props.dialogInfo.header?.title;
103 }); 103 });
104 const headerSearchInputVisible = computed(() => { 104 const headerSearchInputVisible = computed(() => {
105 return props.dialogInfo.header.headerSearchInputVisible ?? false; 105 return props.dialogInfo.header?.headerSearchInputVisible ?? false;
106 }); 106 });
107 const headerSearchInputPlaceholder = computed(() => { 107 const headerSearchInputPlaceholder = computed(() => {
108 return ( 108 return (
...@@ -579,7 +579,7 @@ defineExpose({ ...@@ -579,7 +579,7 @@ defineExpose({
579 <span>{{ bar.label }}</span> 579 <span>{{ bar.label }}</span>
580 </span> 580 </span>
581 <template v-else> 581 <template v-else>
582 <el-popover v-if="bar.popover" :visible="bar.popover.visible" :title="bar.popover.title" 582 <el-popover v-if="bar.popover" :visible="bar.popover?.visible" :title="bar.popover.title"
583 :content="bar.popover.content" placement="bottom-start" :width="bar.popover.width ?? 200" 583 :content="bar.popover.content" placement="bottom-start" :width="bar.popover.width ?? 200"
584 trigger="click"> 584 trigger="click">
585 <template #reference> 585 <template #reference>
...@@ -692,7 +692,7 @@ defineExpose({ ...@@ -692,7 +692,7 @@ defineExpose({
692 </div> 692 </div>
693 </div> 693 </div>
694 </div> 694 </div>
695 <template #footer v-if="footer.visible ?? true"> 695 <template #footer v-if="footer?.visible ?? true">
696 <div class="dialog-footer" :class="{ between: footer.textBtns }"> 696 <div class="dialog-footer" :class="{ between: footer.textBtns }">
697 <div v-if="footer.textBtns"> 697 <div v-if="footer.textBtns">
698 <span class="text_btn" v-for="btn in footer.textBtns" :disabled="btn.disabled ?? false" 698 <span class="text_btn" v-for="btn in footer.textBtns" :disabled="btn.disabled ?? false"
...@@ -700,7 +700,7 @@ defineExpose({ ...@@ -700,7 +700,7 @@ defineExpose({
700 </div> 700 </div>
701 <div> 701 <div>
702 <template v-for="btn in footer.btns"> 702 <template v-for="btn in footer.btns">
703 <el-button v-if="btn.visible ?? true" :type="btn.type" :disabled="btn.disabled ?? false" 703 <el-button v-if="btn?.visible ?? true" :type="btn.type" :disabled="btn.disabled ?? false"
704 :loading="btn.loading ?? btnLoading" @click="btnClick(btn, null)" v-preReClick>{{ btn.label }}</el-button> 704 :loading="btn.loading ?? btnLoading" @click="btnClick(btn, null)" v-preReClick>{{ btn.label }}</el-button>
705 </template> 705 </template>
706 </div> 706 </div>
......
...@@ -197,6 +197,19 @@ const inputChange = (val, row) => { ...@@ -197,6 +197,19 @@ const inputChange = (val, row) => {
197 formInline.value[row.field] = val = parseFloat(val || 0).toFixed(2); 197 formInline.value[row.field] = val = parseFloat(val || 0).toFixed(2);
198 } 198 }
199 } 199 }
200 if (row.inputType == 'scoreNumber' && parseFloat(val) > 100) {
201 // 先去除非数字和小数点字符
202 val = val.replace(/[^\d.]/g, "");
203 // 限制最多保留两位小数
204 val = val.replace(/\.{2,}/g, ".");
205 val = val.replace(/^(\d+)\.(\d{2}).*$/, "$1.$2");
206 let num = parseFloat(val);
207 if (num > 100) {
208 num = 100; // 超过100时将其设置为100
209 val = num.toFixed(2); // 保证显示为两位小数
210 }
211 formInline.value[row.field] = val;
212 }
200 // 新增的 inputType 处理逻辑:integerWithComma 213 // 新增的 inputType 处理逻辑:integerWithComma
201 if (row.inputType == "integerWithComma") { 214 if (row.inputType == "integerWithComma") {
202 val = val.replace(/[^\d]/g, ""); // 移除非数字字符 215 val = val.replace(/[^\d]/g, ""); // 移除非数字字符
...@@ -604,7 +617,7 @@ const panelChange = (scope, row) => { ...@@ -604,7 +617,7 @@ const panelChange = (scope, row) => {
604 required_mark: item.required, 617 required_mark: item.required,
605 }">{{ 618 }">{{
606 item.label 619 item.label
607 }}</span> 620 }}</span>
608 621
609 </span> 622 </span>
610 <div class="header_title_tooltip" style="width: auto" v-if="item.tooltip"> 623 <div class="header_title_tooltip" style="width: auto" v-if="item.tooltip">
...@@ -697,7 +710,7 @@ const panelChange = (scope, row) => { ...@@ -697,7 +710,7 @@ const panelChange = (scope, row) => {
697 <div class="item_panel" :class="{ is_block: panel.block }" v-for="panel in item.children"> 710 <div class="item_panel" :class="{ is_block: panel.block }" v-for="panel in item.children">
698 <label :class="{ required_mark: panel.required }">{{ 711 <label :class="{ required_mark: panel.required }">{{
699 panel.label 712 panel.label
700 }}</label> 713 }}</label>
701 <el-checkbox v-if="panel.type == 'checkbox'" v-model="formInline[panel.field]" 714 <el-checkbox v-if="panel.type == 'checkbox'" v-model="formInline[panel.field]"
702 :disabled="panel.disabled || readonly" :true-label="panel.trueValue ?? true" 715 :disabled="panel.disabled || readonly" :true-label="panel.trueValue ?? true"
703 :false-label="panel.falseValue ?? false">{{ panel.placeholder }}</el-checkbox> 716 :false-label="panel.falseValue ?? false">{{ panel.placeholder }}</el-checkbox>
...@@ -780,7 +793,7 @@ const panelChange = (scope, row) => { ...@@ -780,7 +793,7 @@ const panelChange = (scope, row) => {
780 <span class="item-label" slot="label"> 793 <span class="item-label" slot="label">
781 <span v-if="child.label" :class="{ required_mark: child.required }">{{ 794 <span v-if="child.label" :class="{ required_mark: child.required }">{{
782 child.label 795 child.label
783 }}</span> 796 }}</span>
784 </span> 797 </span>
785 <el-select v-if="child.type == 'select'" v-model="formInline[child.field]" 798 <el-select v-if="child.type == 'select'" v-model="formInline[child.field]"
786 :placeholder="child.placeholder" :disabled="child.disabled || readonly" :filterable="child.filterable" 799 :placeholder="child.placeholder" :disabled="child.disabled || readonly" :filterable="child.filterable"
...@@ -839,7 +852,7 @@ const panelChange = (scope, row) => { ...@@ -839,7 +852,7 @@ const panelChange = (scope, row) => {
839 <span class="item-label" slot="label"> 852 <span class="item-label" slot="label">
840 <span :class="{ required_mark: child.required }">{{ 853 <span :class="{ required_mark: child.required }">{{
841 child.label 854 child.label
842 }}</span> 855 }}</span>
843 </span> 856 </span>
844 <el-cascader v-if="child.type == 'cascader'" v-model="formInline[child.field]" :props="child.props" 857 <el-cascader v-if="child.type == 'cascader'" v-model="formInline[child.field]" :props="child.props"
845 :options="child.options" :show-all-levels="child.showAllLevels ?? true" 858 :options="child.options" :show-all-levels="child.showAllLevels ?? true"
...@@ -882,7 +895,7 @@ const panelChange = (scope, row) => { ...@@ -882,7 +895,7 @@ const panelChange = (scope, row) => {
882 <div class="item_panel" v-for="child in item.children"> 895 <div class="item_panel" v-for="child in item.children">
883 <label :class="{ required_mark: child.required }">{{ 896 <label :class="{ required_mark: child.required }">{{
884 child.label 897 child.label
885 }}</label> 898 }}</label>
886 <div class="tool_item"> 899 <div class="tool_item">
887 <el-select v-model="formInline[child.field]" :class="{ is_block: child.block }" 900 <el-select v-model="formInline[child.field]" :class="{ is_block: child.block }"
888 :placeholder="child.placeholder" :multiple="child.multiple" :collapse-tags="child.collapse" 901 :placeholder="child.placeholder" :multiple="child.multiple" :collapse-tags="child.collapse"
...@@ -957,7 +970,7 @@ const panelChange = (scope, row) => { ...@@ -957,7 +970,7 @@ const panelChange = (scope, row) => {
957 <span class="item-label" slot="label"> 970 <span class="item-label" slot="label">
958 <span :class="{ required_mark: child.required }">{{ 971 <span :class="{ required_mark: child.required }">{{
959 child.label 972 child.label
960 }}</span> 973 }}</span>
961 </span> 974 </span>
962 <el-input :class="[child.col, { is_block: child.block }]" v-model="formInline[child.field]" 975 <el-input :class="[child.col, { is_block: child.block }]" v-model="formInline[child.field]"
963 :rows="child.rows ?? 4" type="textarea" :placeholder="child.placeholder" 976 :rows="child.rows ?? 4" type="textarea" :placeholder="child.placeholder"
...@@ -981,8 +994,7 @@ const panelChange = (scope, row) => { ...@@ -981,8 +994,7 @@ const panelChange = (scope, row) => {
981 </div> 994 </div>
982 </div> 995 </div>
983 <div v-if="item.example" class="panel_header-expample">{{ item.example }}</div> 996 <div v-if="item.example" class="panel_header-expample">{{ item.example }}</div>
984 <el-input ref="exampleTextareaRef" :id="item.field" 997 <el-input ref="exampleTextareaRef" :id="item.field" :class="[item.col, { is_block: item.block }]"
985 :class="[item.col, { is_block: item.block }]"
986 v-model="formInline[item.field]" :rows="item.rows ?? 4" type="textarea" :placeholder="item.placeholder" 998 v-model="formInline[item.field]" :rows="item.rows ?? 4" type="textarea" :placeholder="item.placeholder"
987 :disabled="item.disabled || readonly" :readonly="item.readonly" resize="none" 999 :disabled="item.disabled || readonly" :readonly="item.readonly" resize="none"
988 :maxlength="item.maxlength ?? 500" show-word-limit @focus="(event) => inputFocus(event, item)" 1000 :maxlength="item.maxlength ?? 500" show-word-limit @focus="(event) => inputFocus(event, item)"
...@@ -1014,7 +1026,7 @@ const panelChange = (scope, row) => { ...@@ -1014,7 +1026,7 @@ const panelChange = (scope, row) => {
1014 <span class="item-label" slot="label"> 1026 <span class="item-label" slot="label">
1015 <span :class="{ required_mark: child.required }">{{ 1027 <span :class="{ required_mark: child.required }">{{
1016 child.label 1028 child.label
1017 }}</span> 1029 }}</span>
1018 </span> 1030 </span>
1019 <div class="input_group" :class="[child.col]" v-if="child.type == 'input-group'"> 1031 <div class="input_group" :class="[child.col]" v-if="child.type == 'input-group'">
1020 <template v-for="(group, c) in child.children"> 1032 <template v-for="(group, c) in child.children">
...@@ -1023,7 +1035,7 @@ const panelChange = (scope, row) => { ...@@ -1023,7 +1035,7 @@ const panelChange = (scope, row) => {
1023 <span class="item-label" slot="label"> 1035 <span class="item-label" slot="label">
1024 <span :class="{ required_mark: group.required }">{{ 1036 <span :class="{ required_mark: group.required }">{{
1025 group.label 1037 group.label
1026 }}</span> 1038 }}</span>
1027 </span> 1039 </span>
1028 <el-select v-if="group.type == 'select'" v-model="formInline[group.field]" 1040 <el-select v-if="group.type == 'select'" v-model="formInline[group.field]"
1029 :placeholder="group.placeholder" :clearable="group.clearable" 1041 :placeholder="group.placeholder" :clearable="group.clearable"
...@@ -1164,7 +1176,7 @@ const panelChange = (scope, row) => { ...@@ -1164,7 +1176,7 @@ const panelChange = (scope, row) => {
1164 <span class="item-label" slot="label"> 1176 <span class="item-label" slot="label">
1165 <span :class="{ required_mark: child.required }">{{ 1177 <span :class="{ required_mark: child.required }">{{
1166 child.label 1178 child.label
1167 }}</span> 1179 }}</span>
1168 </span> 1180 </span>
1169 <el-select v-if="child.type == 'select'" v-model="formInline[child.field]" 1181 <el-select v-if="child.type == 'select'" v-model="formInline[child.field]"
1170 :placeholder="child.placeholder" :clearable="child.clearable" :disabled="child.disabled || readonly" 1182 :placeholder="child.placeholder" :clearable="child.clearable" :disabled="child.disabled || readonly"
...@@ -1215,7 +1227,7 @@ const panelChange = (scope, row) => { ...@@ -1215,7 +1227,7 @@ const panelChange = (scope, row) => {
1215 <span class="item-label" slot="label" :class="[child.col]"> 1227 <span class="item-label" slot="label" :class="[child.col]">
1216 <span :class="{ required_mark: child.required }">{{ 1228 <span :class="{ required_mark: child.required }">{{
1217 child.label 1229 child.label
1218 }}</span> 1230 }}</span>
1219 </span> 1231 </span>
1220 <div class="input_popover_panel" v-if="child.type == 'input-popover-panel'"> 1232 <div class="input_popover_panel" v-if="child.type == 'input-popover-panel'">
1221 <el-popover placement="bottom-start" width="100%" trigger="click" :teleported="false"> 1233 <el-popover placement="bottom-start" width="100%" trigger="click" :teleported="false">
...@@ -1269,7 +1281,7 @@ const panelChange = (scope, row) => { ...@@ -1269,7 +1281,7 @@ const panelChange = (scope, row) => {
1269 <span class="item-label" slot="label"> 1281 <span class="item-label" slot="label">
1270 <span :class="{ required_mark: child.required }">{{ 1282 <span :class="{ required_mark: child.required }">{{
1271 child.label 1283 child.label
1272 }}</span> 1284 }}</span>
1273 </span> 1285 </span>
1274 <template v-if="child.type == 'upload-image'"> 1286 <template v-if="child.type == 'upload-image'">
1275 <el-upload :class="[child.col, 'avatar-uploader', { is_block: child.block }]" action="#" 1287 <el-upload :class="[child.col, 'avatar-uploader', { is_block: child.block }]" action="#"
......
...@@ -223,6 +223,7 @@ const tableBtnClick = (scope, btn) => { ...@@ -223,6 +223,7 @@ const tableBtnClick = (scope, btn) => {
223 const type = btn.value; 223 const type = btn.value;
224 const row = scope.row; 224 const row = scope.row;
225 currTableData.value = row; 225 currTableData.value = row;
226 console.log(row, '-------');
226 if (type == "redit") { 227 if (type == "redit") {
227 dialogInfo.value.visible = true; 228 dialogInfo.value.visible = true;
228 dialogInfo.value.type = 'reSubmit'; 229 dialogInfo.value.type = 'reSubmit';
...@@ -618,12 +619,12 @@ const passDialogBtnClick = (btn, info) => { ...@@ -618,12 +619,12 @@ const passDialogBtnClick = (btn, info) => {
618 evaluationRangeStart: info.evaluationRange[0], 619 evaluationRangeStart: info.evaluationRange[0],
619 evaluationRangeEnd: info.evaluationRange[1], 620 evaluationRangeEnd: info.evaluationRange[1],
620 evaluationNote: info.evaluationNote, 621 evaluationNote: info.evaluationNote,
621 evaluationFile: info.evaluationFile?.map(file => { 622 evaluationFile: info.evaluationFile?.map(file => {
622 return { 623 return {
623 name: file.name, 624 name: file.name,
624 url: file.url 625 url: file.url
625 } 626 }
626 }) || [], 627 }) || [],
627 }).then((res: any) => { 628 }).then((res: any) => {
628 passDialogInfo.value.footer.btns[1].loading = false; 629 passDialogInfo.value.footer.btns[1].loading = false;
629 if (res?.code == proxy.$passCode) { 630 if (res?.code == proxy.$passCode) {
......
...@@ -21,7 +21,7 @@ import { ...@@ -21,7 +21,7 @@ import {
21 } from "@/api/modules/queryService"; 21 } from "@/api/modules/queryService";
22 import useUserStore from "@/store/modules/user"; 22 import useUserStore from "@/store/modules/user";
23 import useDataAssetStore from "@/store/modules/dataAsset"; 23 import useDataAssetStore from "@/store/modules/dataAsset";
24 import { passFlowData, rejectFlowData, revokeFlowData } from '@/api/modules/workFlowService'; 24 import { getCamundaDeploymentId, getProcessNodesPromise, passFlowData, rejectFlowData, revokeFlowData } from '@/api/modules/workFlowService';
25 25
26 const assetStore = useDataAssetStore(); 26 const assetStore = useDataAssetStore();
27 27
...@@ -80,6 +80,7 @@ const tableFields = ref([ ...@@ -80,6 +80,7 @@ const tableFields = ref([
80 }, 80 },
81 ]); 81 ]);
82 82
83 const deploymentId = ref('');
83 onBeforeMount(() => { 84 onBeforeMount(() => {
84 if (isCompanyPlatform.value) { 85 if (isCompanyPlatform.value) {
85 tableInfo.value.fields = tableFields.value; 86 tableInfo.value.fields = tableFields.value;
...@@ -87,12 +88,19 @@ onBeforeMount(() => { ...@@ -87,12 +88,19 @@ onBeforeMount(() => {
87 tableFields.value.splice(3, 0, { label: "企业名称", field: "tenantName", width: 250, align: "left" }) 88 tableFields.value.splice(3, 0, { label: "企业名称", field: "tenantName", width: 250, align: "left" })
88 tableInfo.value.fields = tableFields.value; 89 tableInfo.value.fields = tableFields.value;
89 } 90 }
90 getTenantAttach(userData.tenantGuid).then((res: any) => { 91 // getTenantAttach(userData.tenantGuid).then((res: any) => {
91 if (res?.code == proxy.$passCode) { 92 // if (res?.code == proxy.$passCode) {
92 attachDataInfo.value = res.data || {}; 93 // attachDataInfo.value = res.data || {};
93 formItems.value[1].templateUrl = attachDataInfo.value.quality_evaluation_file; 94 // formItems.value[1].templateUrl = attachDataInfo.value.quality_evaluation_file;
95 // } else {
96 // ElMessage.error(res.msg);
97 // }
98 // })
99 getCamundaDeploymentId('10019', userData.tenantGuid, userData.staffGuid).then((res: any) => {
100 if (res.code == proxy.$passCode) {
101 deploymentId.value = res.data;
94 } else { 102 } else {
95 ElMessage.error(res.msg); 103 proxy.$ElMessage.error(res.msg);
96 } 104 }
97 }) 105 })
98 }); 106 });
...@@ -252,14 +260,14 @@ const tableInfo = ref({ ...@@ -252,14 +260,14 @@ const tableInfo = ref({
252 // } 260 // }
253 // return btnsArr; 261 // return btnsArr;
254 // } 262 // }
255 const getTableBtns = (row, includeDetail = true) => { 263 const getTableBtns = (row) => {
256 let btnsArr: any[] = []; 264 let btnsArr: any[] = [];
257 const approveVO = row.approveVO; 265 const approveVO = row.approveVO || {};
266 const approveState = row.approveState || null;
267 const approveStaffGuids = approveVO.approveStaffGuids || [];
268 const staffGuid = approveVO.staffGuid || '';
269 const bizApproveState = row.bizApproveState;
258 const currentStaffGuid = userData.staffGuid 270 const currentStaffGuid = userData.staffGuid
259 const bizApproveState = row.approveState;
260 const approveState = approveVO?.approveState || 'N';
261 const approveStaffGuids = approveVO?.approveStaffGuids || [];
262 const staffGuid = approveVO?.staffGuid || '';
263 let isShowCancel = false; 271 let isShowCancel = false;
264 let flowState; 272 let flowState;
265 if (approveState == 'N') { 273 if (approveState == 'N') {
...@@ -274,24 +282,25 @@ const getTableBtns = (row, includeDetail = true) => { ...@@ -274,24 +282,25 @@ const getTableBtns = (row, includeDetail = true) => {
274 if (approveVO && approveVO.approveState == 'A' && staffGuid == currentStaffGuid) { 282 if (approveVO && approveVO.approveState == 'A' && staffGuid == currentStaffGuid) {
275 isShowCancel = true; 283 isShowCancel = true;
276 } 284 }
277
278 if (flowState === 1) { 285 if (flowState === 1) {
279 btnsArr = [{ label: "编辑", value: "edit" }, { label: "删除", value: "delete" }] 286 btnsArr = [{ label: "删除", value: "delete" }]
280 } else { 287 }
288 if (flowState === 2) {
289 btnsArr = [{ label: "通过", value: "pass" }, { label: "驳回", value: "reject" }]
290 }
291 if (flowState === 3) {
292 btnsArr.push({ label: "删除", value: "delete" })
293 }
294 if (flowState === 3 && bizApproveState != 'D') {
295 btnsArr.push({ label: "重新提交", value: "redit" })
296 }
297 if (isShowCancel) {
298 btnsArr.push({ label: "撤销", value: "revoke" })
299 }
300 if (flowState !== 1) {
281 btnsArr.push({ label: "详情", value: "detail" }) 301 btnsArr.push({ label: "详情", value: "detail" })
282 if (flowState === 2) {
283 btnsArr.push(...[{ label: "通过", value: "pass" }, { label: "驳回", value: "reject" }])
284 if (isShowCancel) {
285 btnsArr.push({ label: "撤销", value: "revoke" })
286 }
287 } else if (flowState === 3) {
288 if (bizApproveState != 'D') {
289 btnsArr.push({ label: "重新提交", value: "edit" })
290 }
291 btnsArr.push({ label: "删除", value: "delete" })
292 }
293 } 302 }
294 return btnsArr 303 return btnsArr;
295 } 304 }
296 305
297 306
...@@ -300,12 +309,34 @@ const currTableData: any = ref({}); ...@@ -300,12 +309,34 @@ const currTableData: any = ref({});
300 const tableBtnClick = (scope, btn) => { 309 const tableBtnClick = (scope, btn) => {
301 const type = btn.value; 310 const type = btn.value;
302 const row = scope.row; 311 const row = scope.row;
312 console.log('row', row);
303 currTableData.value = row; 313 currTableData.value = row;
304 if (type == "edit") { 314 if (type == "redit") {
305 formItems.value[0].visible = false; 315 if (!row.registerGuid) {
306 formItems.value[1].default = row.costAssessmentFile || []; 316 formItems.value[2].visible = false;
307 dialogInfo.value.type = 'reSubmit'; 317 formItems.value[3].visible = false;
308 dialogInfo.value.visible = true; 318 formItems.value[4].visible = false;
319 formItems.value[5].visible = false;
320 formItems.value[0].visible = false;
321 formItems.value[0].default = row.damGuid;
322 formItems.value[1].default = row.costAssessmentFile || [];
323 dialogInfo.value.type = 'reSubmit';
324 dialogInfo.value.visible = true;
325 } else {
326 formItems.value[2].visible = true;
327 formItems.value[3].visible = true;
328 formItems.value[4].visible = true;
329 formItems.value[5].visible = true;
330 formItems.value[0].visible = false;
331 formItems.value[0].default = row.damGuid;
332 formItems.value[1].default = row.costAssessmentFile || [];
333 formItems.value[2].default = row.qualityScore;
334 formItems.value[3].default = row.evaluationRangeStart && row.evaluationRangeEnd ? [row.evaluationRangeStart, row.evaluationRangeEnd] : '';
335 formItems.value[4].default = row.evaluationNote;
336 formItems.value[5].default = row.evaluationFile || [];
337 dialogInfo.value.type = 'reSubmit';
338 dialogInfo.value.visible = true;
339 }
309 } else if (type == "delete") { 340 } else if (type == "delete") {
310 delTableOpen("此操作将永久删除该资产价值评估,是否继续?", "warning"); 341 delTableOpen("此操作将永久删除该资产价值评估,是否继续?", "warning");
311 } else if (type === 'backup') { 342 } else if (type === 'backup') {
...@@ -314,29 +345,23 @@ const tableBtnClick = (scope, btn) => { ...@@ -314,29 +345,23 @@ const tableBtnClick = (scope, btn) => {
314 passDialogInfo.value.visible = true; 345 passDialogInfo.value.visible = true;
315 passFormItems.value[2].placeholder = '按照本次评估目的及价值类型,该笔数据资产在评估基准日的评估值为人民币***元。本次评估结论在评估基准日后一年内有效,即自20*年*月*日至20*年*月*日止。超过一年,需重新举行资产评估。'; 346 passFormItems.value[2].placeholder = '按照本次评估目的及价值类型,该笔数据资产在评估基准日的评估值为人民币***元。本次评估结论在评估基准日后一年内有效,即自20*年*月*日至20*年*月*日止。超过一年,需重新举行资产评估。';
316 } else if (type === 'revoke') { // 撤销,状态为审批中时可以撤销。 347 } else if (type === 'revoke') { // 撤销,状态为审批中时可以撤销。
317 ElMessageBox.confirm('确定撤销该资产价值评估吗?', "提示", { 348 ElMessageBox.confirm(`撤销后,该流程将不再进行审核,确定这样操作吗?`, "提示", {
318 confirmButtonText: "确定", 349 confirmButtonText: "确定",
319 cancelButtonText: "取消", 350 cancelButtonText: "取消",
320 type: 'warning', 351 type: 'warning',
321 }).then(() => { 352 }).then(() => {
322 let params = { 353 revokeFlowData({
323 bizGuid: row.guid, 354 guid: row.approveVO.approveGuid,
324 funcCode: row.funcCode 355 flowType: row.approveVO.flowType,
325 } 356 approveStaffGuid: userData.staffGuid,
326 tableInfo.value.loading = true; 357 }).then((res: any) => {
327 registerApproveCancel(params).then((res: any) => { 358 if (res.code == '00000') {
328 tableInfo.value.loading = false; 359 ElMessage.success('撤销成功!')
329 if (res?.code == proxy.$passCode) { 360 getTableData();
330 if (res.data) {
331 ElMessage.success('该资产价值评估流程撤销成功!');
332 getTableData();
333 } else {
334 ElMessage.error('该资产价值评估流程撤销失败!');
335 }
336 } else { 361 } else {
337 ElMessage.error(res.msg); 362 ElMessage.error(res.msg)
338 } 363 }
339 }); 364 })
340 }).catch(() => { 365 }).catch(() => {
341 ElMessage({ 366 ElMessage({
342 type: 'info', 367 type: 'info',
...@@ -348,6 +373,23 @@ const tableBtnClick = (scope, btn) => { ...@@ -348,6 +373,23 @@ const tableBtnClick = (scope, btn) => {
348 name: 'registerValueDetail', 373 name: 'registerValueDetail',
349 query: { guid: row.registerGuid, costAssessGuid: row.guid, type: 'costAssess', daTenantGuid: row.tenantGuid } 374 query: { guid: row.registerGuid, costAssessGuid: row.guid, type: 'costAssess', daTenantGuid: row.tenantGuid }
350 }); 375 });
376 } else if (type === 'detail') { // 详情
377 if (row.registerApproveState == 'Y') {
378 router.push({
379 name: 'registerDetail',
380 query: { guid: row.registerGuid, costAssessGuid: row.guid, type: 'costAssess', daTenantGuid: row.tenantGuid }
381 });
382 } else {
383 router.push({
384 name: 'evaCatalogDetail',
385 query: { guid: row.registerGuid, costAssessGuid: row.guid, type: 'costAssess' }
386 });
387 }
388 } else if (type == 'productDetail') {
389 router.push({
390 name: 'registerCatalogDetail',
391 query: { guid: row.damGuid }
392 });
351 } 393 }
352 else if (type === 'pass') { 394 else if (type === 'pass') {
353 passDialogInfo.value.visible = true; 395 passDialogInfo.value.visible = true;
...@@ -458,7 +500,7 @@ const tablePageChange = (info) => { ...@@ -458,7 +500,7 @@ const tablePageChange = (info) => {
458 getTableData(); 500 getTableData();
459 }; 501 };
460 502
461 const formItems = ref([ 503 const formItems = ref<any>([
462 { 504 {
463 label: '资产名称', 505 label: '资产名称',
464 type: 'select', 506 type: 'select',
...@@ -479,6 +521,9 @@ const formItems = ref([ ...@@ -479,6 +521,9 @@ const formItems = ref([
479 tip: '支持格式:xls .xlsx .doc .docx .rar .zip', 521 tip: '支持格式:xls .xlsx .doc .docx .rar .zip',
480 type: 'upload-file', 522 type: 'upload-file',
481 accept: '.xls, .xlsx, .doc, .docx, .rar, .zip', 523 accept: '.xls, .xlsx, .doc, .docx, .rar, .zip',
524 field: 'costAssessmentFile',
525 default: [],
526 required: true,
482 templateUrl: 'auto', 527 templateUrl: 'auto',
483 templateClick: () => { 528 templateClick: () => {
484 const link = document.createElement('a'); 529 const link = document.createElement('a');
...@@ -488,11 +533,8 @@ const formItems = ref([ ...@@ -488,11 +533,8 @@ const formItems = ref([
488 link.click(); 533 link.click();
489 link.remove(); 534 link.remove();
490 }, 535 },
491 required: true,
492 block: true, 536 block: true,
493 visible: true, 537 visible: true,
494 default: [],
495 field: 'costAssessmentFile',
496 }, 538 },
497 // 质量评分 type: input 539 // 质量评分 type: input
498 { 540 {
...@@ -528,7 +570,6 @@ const formItems = ref([ ...@@ -528,7 +570,6 @@ const formItems = ref([
528 default: '', 570 default: '',
529 maxlength: 250, 571 maxlength: 250,
530 block: true, 572 block: true,
531 focusValue: true,
532 clearable: true, 573 clearable: true,
533 required: true, 574 required: true,
534 visible: false 575 visible: false
...@@ -614,19 +655,24 @@ const handleSelectChange = (val, row, info) => { ...@@ -614,19 +655,24 @@ const handleSelectChange = (val, row, info) => {
614 } 655 }
615 656
616 const passDialogInputChange = (val, item, inlineValue) => { 657 const passDialogInputChange = (val, item, inlineValue) => {
658 console.log('val', val, item, inlineValue);
617 if (item.field == 'assessmentMoney') { 659 if (item.field == 'assessmentMoney') {
618 let M = ""; 660 let M = "";
619 let D = ""; 661 let D = "";
620 let assessmentDate = inlineValue.assessmentDate; 662 let assessmentDate = inlineValue.assessmentDate;
621 if (assessmentDate) { 663 if (assessmentDate) {
622 M = (assessmentDate.getMonth() + 1 < 10 ? '0' + (assessmentDate.getMonth() + 1) : assessmentDate.getMonth() + 1); 664 M = (assessmentDate?.getMonth() + 1 < 10 ? '0' + (assessmentDate?.getMonth() + 1) : assessmentDate?.getMonth() + 1);
623 D = (assessmentDate.getDate() + 1 < 10 ? '0' + assessmentDate.getDate() : assessmentDate.getDate()); 665 D = (assessmentDate?.getDate() + 1 < 10 ? '0' + assessmentDate?.getDate() : assessmentDate?.getDate());
624 } 666 }
625 passFormItems.value[2].placeholder = `按照本次评估目的及价值类型,该笔数据资产在评估基准日的评估值为人民币${val}元。本次评估结论在评估基准日后一年内有效,即自${inlineValue.assessmentDate ? `${inlineValue.assessmentDate.getFullYear()}${M}${D}日至${inlineValue.assessmentDate.getFullYear() + 1}${M}${D}日` : '20*年*月*日至20*年*月*日'}止。超过一年,需重新举行资产评估。`; 667 passFormItems.value[2].placeholder = `按照本次评估目的及价值类型,该笔数据资产在评估基准日的评估值为人民币${val}元。本次评估结论在评估基准日后一年内有效,即自${inlineValue.assessmentDate ? `${inlineValue.assessmentDate?.getFullYear()}${M}${D}日至${inlineValue.assessmentDate?.getFullYear() + 1}${M}${D}` : '20*年*月*日至20*年*月*日'}止。超过一年,需重新举行资产评估。`;
626 } else if (item.field == 'assessmentDate') { 668 } else if (item.field == 'assessmentDate') {
627 let M = (val.getMonth() + 1 < 10 ? '0' + (val.getMonth() + 1) : val.getMonth() + 1); 669 if (val && !(val instanceof Date)) {
628 let D = (val.getDate() + 1 < 10 ? '0' + val.getDate() : val.getDate()); 670 // 如果 val 不是 Date 类型,尝试将其转换为 Date 对象
629 passFormItems.value[2].placeholder = `按照本次评估目的及价值类型,该笔数据资产在评估基准日的评估值为人民币${inlineValue.assessmentMoney ? inlineValue.assessmentMoney : '***'}元。本次评估结论在评估基准日后一年内有效,即自${val ? `${val.getFullYear()}${M}${D}日至${val.getFullYear() + 1}${M}${D}日` : '20*年*月*日至20*年*月*日'}止。超过一年,需重新举行资产评估。`; 671 val = new Date(val);
672 }
673 let M = (val?.getMonth() + 1 < 10 ? '0' + (val?.getMonth() + 1) : val?.getMonth() + 1);
674 let D = (val?.getDate() + 1 < 10 ? '0' + val?.getDate() : val?.getDate());
675 passFormItems.value[2].placeholder = `按照本次评估目的及价值类型,该笔数据资产在评估基准日的评估值为人民币${inlineValue.assessmentMoney ? inlineValue.assessmentMoney : '***'}元。本次评估结论在评估基准日后一年内有效,即自${val ? `${val?.getFullYear()}${M}${D}日至${val?.getFullYear() + 1}${M}${D}` : '20*年*月*日至20*年*月*日'}止。超过一年,需重新举行资产评估。`;
630 } 676 }
631 } 677 }
632 678
...@@ -635,75 +681,112 @@ const reSubmitPromise: any = ref(null); ...@@ -635,75 +681,112 @@ const reSubmitPromise: any = ref(null);
635 681
636 /** 编辑质量评估发起资产申请按钮处理。 */ 682 /** 编辑质量评估发起资产申请按钮处理。 */
637 const dialogBtnClick = (btn, info) => { 683 const dialogBtnClick = (btn, info) => {
684 console.log('btn', btn, info);
638 if (btn.value == 'submit') { 685 if (btn.value == 'submit') {
639 if (dialogInfo.value.type == 'reSubmit') { 686 getProcessNodesPromise({
640 if (reSubmitPromise.value) { 687 deploymentId: deploymentId.value,
641 return; 688 processInstanceId: null,
642 } 689 }).then((res: any) => {
643 reSubmitPromise.value = updateCostAssess({ 690 console.log('res', res);
644 guid: currTableData.value.guid, 691 if (dialogInfo.value.type == 'reSubmit') {
645 tenantGuid: userData.tenantGuid, 692 if (reSubmitPromise.value) {
646 registerGuid: currTableData.value.registerGuid, 693 return;
647 daName: currTableData.value.daName,
648 registerTime: currTableData.value.registerTime,
649 issuingEntityGuid: currTableData.value.issuingEntityGuid,
650 costAssessmentFile: info.costAssessmentFile?.map(f => f.url) || []
651 }).then((res: any) => {
652 reSubmitPromise.value = null;
653 if (res?.code == proxy.$passCode) {
654 ElMessage.success('该资产价值评估重新提交成功');
655 dialogInfo.value.visible = false;
656 page.value.curr = 1;
657 getTableData();
658 } else {
659 ElMessage.error(res.msg);
660 } 694 }
661 }) 695 reSubmitPromise.value = updateCostAssess({
662 } else { 696 guid: currTableData.value.guid,
663 if (savePromise.value) {
664 return;
665 }
666 let daInfo = assetListData.value.find(a => a.guid == info.registerGuid);
667 let params: any = {};
668 if (daInfo.qualityEvaluationGuid) {
669 //通过质量评估
670 params = {
671 immediateApprove: true, 697 immediateApprove: true,
672 tenantGuid: userData.tenantGuid, 698 tenantGuid: userData.tenantGuid,
673 registerGuid: info.registerGuid, 699 daName: currTableData.value.daName,
674 daName: daInfo.damName, 700 damGuid: currTableData.value.damGuid,
675 damGuid: daInfo.guid, 701 costAssessmentFile: info.costAssessmentFile?.map(file => {
676 costAssessmentFile: info.costAssessmentFile?.map(f => f.url) || [], 702 return {
677 evaluationFile: info.evaluationFile?.map(f => f.url) || [], 703 name: file.name,
678 qualityScore: info.qualityScore, 704 url: file.url
705 }
706 }) || [],
707 evaluationFile: info.evaluationFile?.map(file => {
708 return {
709 name: file.name,
710 url: file.url
711 }
712 }) || [],
713 qualityScore: info.qualityScore || null,
679 evaluationRangeStart: info.evaluationRange ? info.evaluationRange[0] : null, 714 evaluationRangeStart: info.evaluationRange ? info.evaluationRange[0] : null,
680 evaluationRangeEnd: info.evaluationRange ? info.evaluationRange[1] : null, 715 evaluationRangeEnd: info.evaluationRange ? info.evaluationRange[1] : null,
681 evaluationNote: info.evaluationNote, 716 evaluationNote: info.evaluationNote || null,
682 } 717 evaluationAgencyGuid: res.data?.[1]?.candidateUsers?.[0]?.staffGuid,
718 }).then((res: any) => {
719 reSubmitPromise.value = null;
720 if (res?.code == proxy.$passCode) {
721 ElMessage.success('该资产价值评估重新提交成功');
722 dialogInfo.value.visible = false;
723 page.value.curr = 1;
724 getTableData();
725 } else {
726 ElMessage.error(res.msg);
727 }
728 })
683 } else { 729 } else {
684 //未通过质量评估 730 if (savePromise.value) {
685 params = { 731 return;
686 immediateApprove: true,
687 tenantGuid: userData.tenantGuid,
688 registerGuid: info.registerGuid,
689 daName: daInfo.damName,
690 damGuid: daInfo.guid,
691 costAssessmentFile: info.costAssessmentFile?.map(f => f.url) || [],
692 } 732 }
693 } 733 let params: any = {};
694 console.log('daInfo', daInfo, info); 734 let daInfo = assetListData.value.find(a => a.guid == info.registerGuid);
695 savePromise.value = saveCostAssess(params).then((res: any) => { 735 if (daInfo.qualityEvaluationGuid) {
696 savePromise.value = null; 736 //通过质量评估发起资产申请
697 if (res?.code == proxy.$passCode) { 737 params = {
698 ElMessage.success('价值评估发起成功'); 738 immediateApprove: true,
699 dialogInfo.value.visible = false; 739 tenantGuid: userData.tenantGuid,
700 page.value.curr = 1; 740 daName: daInfo.damName,
701 getTableData(); 741 damGuid: daInfo.guid,
742 costAssessmentFile: info.costAssessmentFile?.map(file => {
743 return {
744 name: file.name,
745 url: file.url
746 }
747 }) || [],
748 evaluationAgencyGuid: res.data?.[1]?.candidateUsers?.[0]?.staffGuid,
749 }
702 } else { 750 } else {
703 ElMessage.error(res.msg); 751 //未通过质量评估发起资产申请
752 params = {
753 immediateApprove: true,
754 tenantGuid: userData.tenantGuid,
755 daName: daInfo.damName,
756 damGuid: daInfo.guid,
757 costAssessmentFile: info.costAssessmentFile?.map(file => {
758 return {
759 name: file.name,
760 url: file.url
761 }
762 }) || [],
763 evaluationFile: info.evaluationFile?.map(file => {
764 return {
765 name: file.name,
766 url: file.url
767 }
768 }) || [],
769 qualityScore: info.qualityScore,
770 evaluationRangeStart: info.evaluationRange ? info.evaluationRange[0] : null,
771 evaluationRangeEnd: info.evaluationRange ? info.evaluationRange[1] : null,
772 evaluationNote: info.evaluationNote,
773 evaluationAgencyGuid: res.data?.[1]?.candidateUsers?.[0]?.staffGuid,
774 }
704 } 775 }
705 }) 776 console.log('daInfo', daInfo, info);
706 } 777 savePromise.value = saveCostAssess(params).then((res: any) => {
778 savePromise.value = null;
779 if (res?.code == proxy.$passCode) {
780 ElMessage.success('价值评估发起成功');
781 dialogInfo.value.visible = false;
782 page.value.curr = 1;
783 getTableData();
784 } else {
785 ElMessage.error(res.msg);
786 }
787 })
788 }
789 })
707 } else if (btn.value == 'cancel') { 790 } else if (btn.value == 'cancel') {
708 dialogInfo.value.visible = false; 791 dialogInfo.value.visible = false;
709 } 792 }
...@@ -833,42 +916,26 @@ const passDialogInfo = ref({ ...@@ -833,42 +916,26 @@ const passDialogInfo = ref({
833 }, 916 },
834 }); 917 });
835 918
836 // const passDialogBtnClick = (btn, info) => {
837 // if (btn.value == 'submit') {
838 // costAssessAllow({
839 // guid: currTableData.value.guid,
840 // assessmentMoney: info.assessmentMoney,
841 // assessmentDate: info.assessmentDate,
842 // assessmentNote: info.assessmentNote,
843 // assessmentFile: info.assessmentFile.map(f => f.url),
844 // }).then((res: any) => {
845 // if (res?.code == proxy.$passCode) {
846 // if (res.data) {
847 // ElMessage.success('审批成功');
848 // passDialogInfo.value.visible = false;
849 // getTableData();
850 // } else {
851 // ElMessage.error('审批失败');
852 // }
853 // } else {
854 // ElMessage.error(res.msg);
855 // }
856 // })
857 // } else if (btn.value == 'cancel') {
858 // passDialogInfo.value.visible = false;
859 // }
860 // };
861 const passDialogBtnClick = (btn, info) => { 919 const passDialogBtnClick = (btn, info) => {
920 let params: any = {}
921 console.log('btn', btn, info, currTableData.value);
862 if (btn.value == 'submit') { 922 if (btn.value == 'submit') {
863 tableInfo.value.loading = true; 923
864 let params = { 924 costAssessAllow({
865 guid: currTableData.value.approveVO.approveGuid, 925 guid: currTableData.value.approveVO.approveGuid,
926 bizGuid: currTableData.value.guid,
866 flowType: currTableData.value.approveVO.flowType, 927 flowType: currTableData.value.approveVO.flowType,
867 approveSuggest: info.approveSuggest,
868 approveStaffGuid: userData.staffGuid, 928 approveStaffGuid: userData.staffGuid,
869 } 929 assessmentMoney: info.assessmentMoney,
870 passFlowData(params).then((res: any) => { 930 assessmentDate: info.assessmentDate,
871 tableInfo.value.loading = false; 931 assessmentNote: info.assessmentNote,
932 assessmentFile: info.assessmentFile.map(file => {
933 return {
934 name: file.name,
935 url: file.url
936 }
937 }) || [],
938 }).then((res: any) => {
872 if (res?.code == proxy.$passCode) { 939 if (res?.code == proxy.$passCode) {
873 if (res.data) { 940 if (res.data) {
874 ElMessage.success('审批成功'); 941 ElMessage.success('审批成功');
...@@ -880,9 +947,7 @@ const passDialogBtnClick = (btn, info) => { ...@@ -880,9 +947,7 @@ const passDialogBtnClick = (btn, info) => {
880 } else { 947 } else {
881 ElMessage.error(res.msg); 948 ElMessage.error(res.msg);
882 } 949 }
883 }).catch(() => { 950 })
884 tableInfo.value.loading = false;
885 });
886 } else if (btn.value == 'cancel') { 951 } else if (btn.value == 'cancel') {
887 passDialogInfo.value.visible = false; 952 passDialogInfo.value.visible = false;
888 } 953 }
......
...@@ -76,117 +76,90 @@ const tableInfo = ref({ ...@@ -76,117 +76,90 @@ const tableInfo = ref({
76 76
77 77
78 78
79 /**弹窗配置 */ 79 const formItems = ref([
80 const newCreateGradeFormItems = ref<any>([{ 80 {
81 label: '标签名', 81 label: '附件上传',
82 type: 'input', 82 tip: '支持格式:pdf,单个文件不能超过10MB ',
83 placeholder: '请选择', 83 type: 'upload-file',
84 field: 'label', 84 accept: '.pdf',
85 default: '', 85 field: 'costAssessmentFile',
86 required: true, 86 templateUrl: '',
87 filterable: true, 87 required: true,
88 clearable: true, 88 block: true,
89 visible: true, 89 visible: true,
90 block: true, 90 default: [],
91 }, 91 },
92 { 92 {
93 label: '分类', 93 label: '附件上传',
94 type: 'tree-select', 94 tip: '支持格式:pdf,单个文件不能超过10MB ',
95 placeholder: '请选择', 95 type: 'upload-file',
96 field: 'classifyDetailGuid', 96 accept: '.pdf',
97 default: '', 97 field: 'costAssessmentFile1',
98 options: [], 98 templateUrl: '',
99 props: { 99 required: true,
100 label: "classifyName", 100 block: true,
101 value: "guid", 101 visible: true,
102 default: [],
102 }, 103 },
103 required: true, 104 {
104 checkStricty: true, 105 label: '附件上传',
105 lazy: false, 106 tip: '支持格式:pdf,单个文件不能超过10MB ',
106 filterable: true, 107 type: 'upload-file',
107 clearable: true, 108 accept: '.pdf',
108 visible: true, 109 field: 'costAssessmentFile2',
109 block: true, 110 templateUrl: '',
110 }, 111 required: true,
111 { 112 block: true,
112 label: '分级', 113 visible: true,
113 type: 'select', 114 default: [],
114 maxlength: 19,
115 placeholder: '请输入',
116 field: 'gradeDetailGuid',
117 default: '',
118 options: [],
119 props: {
120 label: 'name',
121 value: 'guid',
122 }, 115 },
123 clearable: true,
124 required: true,
125 block: true,
126 },
127 // {
128 // label: ' ',
129 // type: 'label',
130 // default: '规则配置',
131 // block: true,
132 // col: 'title-label'
133 // },
134 // {
135 // label: '精确匹配',
136 // type: 'textarea',
137 // maxlength: 200,
138 // placeholder: '请输入字段中文,中间用英文“,”分号隔开',
139 // field: 'matchChValue',
140 // default: '',
141 // clearable: true,
142 // required: false,
143
144 // },
145 // {
146 // label: '',
147 // type: 'textarea',
148 // maxlength: 200,
149 // placeholder: '请输入字段中文,中间用英文“,”分号隔开',
150 // field: 'matchEnValue',
151 // default: '',
152 // clearable: true,
153 // required: false,
154 // }
155 ]); 116 ]);
156 117
157 const newCreateGradeFormRules = ref({ 118 const formRules = ref({
158 label: [ 119 registerGuid: [
159 { required: true, message: '请输入标签名', trigger: 'change' } 120 { required: true, trigger: 'change', message: "请填写资产名称" }
160 ],
161 detailGuid: [
162 { required: true, message: '请选择分类', trigger: 'change' }
163 ],
164 gradeDetailGuid: [
165 { required: true, message: '请选择分级', trigger: 'change' }
166 ], 121 ],
122 costAssessmentFile: [{
123 validator: (rule: any, value: any, callback: any) => {
124 if (!value?.length) {
125 callback(new Error('请上传数据价值评估附件'))
126 } else {
127 callback();
128 }
129 }, trigger: 'change'
130 }]
167 }); 131 });
168 132
169 const newCreateGradeStandardDialogInfo = ref({ 133 const dialogInfo = ref({
170 visible: false, 134 visible: false,
171 size: 600, 135 size: 510,
172 title: "添加标签", 136 direction: "column",
173 type: "", 137 header: {
174 formInfo: { 138 title: "价值评估发起",
175 id: "grade-form",
176 items: newCreateGradeFormItems.value,
177 rules: newCreateGradeFormRules.value,
178 }, 139 },
179 submitBtnLoading: false, 140 type: '',//标识是否是重新提交
180 btns: { 141 contents: [
181 cancel: () => { 142 {
182 newCreateGradeStandardDialogInfo.value.visible = false; 143 type: 'form',
183 newCreateGradeStandardDialogInfo.value.submitBtnLoading = false; 144 title: '',
184 }, 145 formInfo: {
185 submit: async (btn, info) => { 146 id: 'quality-coss-level',
147 items: formItems.value,
148 rules: formRules.value
149 }
186 } 150 }
187 } 151 ],
188 }) 152 footer: {
153 btns: [
154 { type: "default", label: "取消", value: "cancel" },
155 { type: "primary", label: "确定", value: "submit" },
156 ],
157 },
158 });
189 159
160 const dialogBtnClick = () => {
161 console.log('handleSelectChange');
162 };
190 163
191 164
192 const classSearchItemList = ref<any>([ 165 const classSearchItemList = ref<any>([
...@@ -244,13 +217,7 @@ const searchClass = async (val: any, clear: boolean = false) => { ...@@ -244,13 +217,7 @@ const searchClass = async (val: any, clear: boolean = false) => {
244 }; 217 };
245 218
246 const addNewLabel = () => { 219 const addNewLabel = () => {
247 newCreateGradeStandardDialogInfo.value.visible = true; 220 dialogInfo.value.visible = true;
248 newCreateGradeStandardDialogInfo.value.title = '新增标签';
249 newCreateGradeFormItems.value.forEach(item => {
250 item.default = '';
251 item.disabled = false;
252 });
253 newCreateGradeStandardDialogInfo.value.submitBtnLoading = false;
254 } 221 }
255 222
256 223
...@@ -276,8 +243,7 @@ const addNewLabel = () => { ...@@ -276,8 +243,7 @@ const addNewLabel = () => {
276 </div> 243 </div>
277 </div> 244 </div>
278 </div> 245 </div>
279 <Dialog_form ref="dialogLabelFormRef" :dialogConfigInfo="newCreateGradeStandardDialogInfo" class="v-dialog-form"> 246 <Dialog :dialogInfo="dialogInfo" @btnClick="dialogBtnClick" />
280 </Dialog_form>
281 </div> 247 </div>
282 </template> 248 </template>
283 249
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!