From da6b2a58e58ddd7ba3d4156bd28484214d045e5d Mon Sep 17 00:00:00 2001 From: "396572590@qq.com" Date: Fri, 22 Jul 2022 11:14:41 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20There=20is=20no=20way=20the,=2056742=20?= =?UTF-8?q?=E6=A0=87=E5=87=86=E5=85=A5=E5=BA=93=E6=B5=81=E7=A8=8B=E5=8F=91?= =?UTF-8?q?=E8=B5=B7=E9=A1=B5=E9=9D=A2=E5=A2=9E=E5=8A=A0=E8=B5=B7=E8=8D=89?= =?UTF-8?q?=E5=8D=95=E4=BD=8D=E7=BB=B4=E6=8A=A4=E5=8A=9F=E8=83=BD---------?= =?UTF-8?q?--=20=E6=96=B0=E9=9C=80=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/creatProcess/bzrk/step1.vue | 191 +++++++++++++++++- 1 file changed, 190 insertions(+), 1 deletion(-) diff --git a/src/pages/processCenter/pages/creatProcess/bzrk/step1.vue b/src/pages/processCenter/pages/creatProcess/bzrk/step1.vue index 645cce3f5..e96c3784a 100644 --- a/src/pages/processCenter/pages/creatProcess/bzrk/step1.vue +++ b/src/pages/processCenter/pages/creatProcess/bzrk/step1.vue @@ -700,9 +700,14 @@ - + + 维护 @@ -1132,6 +1137,58 @@ + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
{ + // let pattern = /^\d+$/ + let pattern = /^[1-9]\d*$/ + setTimeout(() => { + if (!pattern.test(value)) { + return callback(new Error('仅能输入正整数')) + } else { + callback() + } + }) + } return { disabledXX:!!this.$route.query.disabledXX, + productTitle: '', // 模态框标题 + productModelAdd: { + // 模态框信息 + dicTypeName: '', + showIndex: '', + // 描述 + describes: '', + // 唯一辨识 + dicId: '4upkjyo34koluwmld5us' // 写死 数据字段ID + }, + productRules: { + dicTypeName: [ + {required: true, message: '选项不能为空', trigger: 'blur'}, + {type: 'string', max: 100, message: '最多输入100位', trigger: 'blur'} + ], + showIndex: [ + {type: 'number', required: true, message: '排序号不能为空且为正整数', trigger: 'blur'}, + {type: 'string', validator: validStandNumInCompile2, trigger: 'blur'} + ], + describes: [ + {type: 'string', max: 500, message: '最多输入500位', trigger: 'blur'} + ] + }, + productModal: false, // 模态框是否打开 textList: [], gdType: '', //归档位置的赋值 standTypeModel: 'INLAND', @@ -1995,6 +2090,12 @@ export default { // }, }, methods: { + // 新增 + productAdd () { + this.productModal = true + this.productTitle = '维护起草单位' + this.productModelAdd.dicTypeCode = '' + }, checkIsOnly() { let standType = '' if(this.submitType !== 1){ @@ -3320,6 +3421,51 @@ export default { popoverHideModelCancel2() { this.modalShowFlag5 = false }, + closeModal () { + this.productModal = false + this.closeDrawerProductModelAdd() + }, + saveProduct (name) { + this.$refs[name].validate((valid) => { + if (valid) { + this.$http.postData('sys/dictype/create', this.productModelAdd, { + _this: this + }, res => { + if (res.ok) { + this.getDataAsync() + this.productModal = false + this.productModelAdd = { + // 模态框信息 + dicTypeName: '', + showIndex: '', + // 描述 + describes: '', + // 唯一辨识 + dicId: '4upkjyo34koluwmld5us' + } + } else { + this.productModal = true + } + }, e => {}) + } else { + } + }) + }, + closeDrawerProductModelAdd () { + this.$nextTick(() => { + this.$refs['productModelAdd'].resetFields() + this.productModelAdd = { + // 模态框信息 + dicTypeName: '', + showIndex: '', + // 描述 + describes: '', + // 唯一辨识 + dicId: '4upkjyo34koluwmld5us' + } + }) + this.productModal = false + }, closeDrawer() { this.ListModel = false }, @@ -3581,6 +3727,49 @@ export default { this.modelOptions = res.data }) }, + getDicTypeListCode(res,json) { + return new Promise((resolve, reject) => { + this.$http.get('sys/dictype/getDicTypeListCode', '', { + _this: this + }, res => { + const history = res; + resolve(history) + }) + }) + }, + async getDataAsync(){ + let res = await this.getDicTypeListCode() + if(res && res.data){ + this.countryOptions = res.data.COUNTRY//国家地区 + this.standSortOptions = res.data.STANDCLASSIFY // 标准类别 + this.standNatureOptions = res.data.SARPROPERTY // 标准性质 + const standOptions = [] + res.data.WBZTCLASS.forEach(item=>{ + if( item.label === '草案' || item.label === '征求意见' || item.label === '送审' || item.label === '报批' || item.label === '发布'){ + standOptions.push(item) + } + }) + this.standStateOptions0 = standOptions // 文本状态 + this.standStateOptions1 = res.data.WBZTCLASS + this.standSystemOptions = res.data.BZTXCLASS // 标准体系 + this.applyArcticOptions.options = res.data.ENERGYTYPES // 适用车型 + this.categoryOptions.options = res.data.NYLXCLASS // 能源类型 + this.applyAuthOptions.options = res.data.SYRZCLASS // 适用认证 + this.cysdOptions = res.data.WSCYSD // 我司参与深度 + this.cyzbpmOptions = res.data.CYZBPM // 我司参与制标排名 + this.wssmrOptions = res.data.WSSMR // 我司署名人 + this.sycpxOptions.options = res.data.SYCPXCLASS // 适用产品线 + this.zrbmOptions.options = res.data.ZRBMCLASS // 责任部门 + this.zrgcsOptions.options = res.data.ZRGCSCLASS // 责任工程师 + this.qcdwOption = res.data.QCDW // 体系类别 + this.gkglbmOptions = res.data.GKGLBM // 归口管理部门 + this.cbcdOptions = res.data.DEGREESTANDARD // 采标程度 + this.txlbOptions = res.data.TXLBCLASS // 体系类别 + this.setMap(this.standStateOptions0) + this.setMap(this.standStateOptions1) + + } + }, }, mounted() { this.getTree()