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) {
......
...@@ -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!