fiix
Showing
6 changed files
with
96 additions
and
111 deletions
| ... | @@ -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, ""); // 移除非数字字符 |
| ... | @@ -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)" | ... | ... |
| ... | @@ -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'; | ... | ... |
This diff is collapsed.
Click to expand it.
| ... | @@ -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 | templateUrl: '', | ||
| 86 | required: true, | 87 | required: true, |
| 87 | filterable: true, | ||
| 88 | clearable: true, | ||
| 89 | visible: true, | ||
| 90 | block: true, | 88 | block: true, |
| 91 | }, | 89 | visible: true, |
| 92 | { | 90 | default: [], |
| 93 | label: '分类', | ||
| 94 | type: 'tree-select', | ||
| 95 | placeholder: '请选择', | ||
| 96 | field: 'classifyDetailGuid', | ||
| 97 | default: '', | ||
| 98 | options: [], | ||
| 99 | props: { | ||
| 100 | label: "classifyName", | ||
| 101 | value: "guid", | ||
| 102 | }, | 91 | }, |
| 92 | { | ||
| 93 | label: '附件上传', | ||
| 94 | tip: '支持格式:pdf,单个文件不能超过10MB ', | ||
| 95 | type: 'upload-file', | ||
| 96 | accept: '.pdf', | ||
| 97 | field: 'costAssessmentFile1', | ||
| 98 | templateUrl: '', | ||
| 103 | required: true, | 99 | required: true, |
| 104 | checkStricty: true, | ||
| 105 | lazy: false, | ||
| 106 | filterable: true, | ||
| 107 | clearable: true, | ||
| 108 | visible: true, | ||
| 109 | block: true, | 100 | block: true, |
| 110 | }, | 101 | visible: true, |
| 111 | { | 102 | default: [], |
| 112 | label: '分级', | ||
| 113 | type: 'select', | ||
| 114 | maxlength: 19, | ||
| 115 | placeholder: '请输入', | ||
| 116 | field: 'gradeDetailGuid', | ||
| 117 | default: '', | ||
| 118 | options: [], | ||
| 119 | props: { | ||
| 120 | label: 'name', | ||
| 121 | value: 'guid', | ||
| 122 | }, | 103 | }, |
| 123 | clearable: true, | 104 | { |
| 105 | label: '附件上传', | ||
| 106 | tip: '支持格式:pdf,单个文件不能超过10MB ', | ||
| 107 | type: 'upload-file', | ||
| 108 | accept: '.pdf', | ||
| 109 | field: 'costAssessmentFile2', | ||
| 110 | templateUrl: '', | ||
| 124 | required: true, | 111 | required: true, |
| 125 | block: true, | 112 | block: true, |
| 126 | }, | 113 | visible: true, |
| 127 | // { | 114 | default: [], |
| 128 | // label: ' ', | 115 | }, |
| 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 | }, | ||
| 179 | submitBtnLoading: false, | ||
| 180 | btns: { | ||
| 181 | cancel: () => { | ||
| 182 | newCreateGradeStandardDialogInfo.value.visible = false; | ||
| 183 | newCreateGradeStandardDialogInfo.value.submitBtnLoading = false; | ||
| 184 | }, | 139 | }, |
| 185 | submit: async (btn, info) => { | 140 | type: '',//标识是否是重新提交 |
| 141 | contents: [ | ||
| 142 | { | ||
| 143 | type: 'form', | ||
| 144 | title: '', | ||
| 145 | formInfo: { | ||
| 146 | id: 'quality-coss-level', | ||
| 147 | items: formItems.value, | ||
| 148 | rules: formRules.value | ||
| 186 | } | 149 | } |
| 187 | } | 150 | } |
| 188 | }) | 151 | ], |
| 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 | ... | ... |
-
Please register or sign in to post a comment