feat: There is no way the, 56742 标准入库流程发起页面增加起草单位维护功能----------- 新需求
This commit is contained in:
@@ -700,9 +700,14 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-show="form.standInData === '0'" label="起草单位" prop="qcdw" class="add-form-item form-item-disabled">
|
||||
<el-select :disabled="disabledXX" :popper-append-to-body="false" multiple filterable clearable v-model="form.qcdw" placeholder="请选择起草单位">
|
||||
<el-select :disabled="disabledXX" style="width: 82%;" :popper-append-to-body="false" multiple filterable clearable v-model="form.qcdw" placeholder="请选择起草单位">
|
||||
<el-option v-for="item in qcdwOption" :value="item.value" :key="item.value" :label="item.label" multiple filterable></el-option>
|
||||
</el-select>
|
||||
<el-button class="common-button-primary add-button"
|
||||
type="primary"
|
||||
icon="add"
|
||||
size="small"
|
||||
@click="productAdd">维护</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
@@ -1132,6 +1137,58 @@
|
||||
</div>
|
||||
</el-upload>
|
||||
</el-dialog>
|
||||
<!-- 新建抽屉 -->
|
||||
<el-drawer
|
||||
:wrapperClosable="false"
|
||||
:title="productTitle"
|
||||
:visible.sync="productModal"
|
||||
size="800px"
|
||||
:before-close="closeDrawerProductModelAdd"
|
||||
label-width="130px"
|
||||
>
|
||||
<div class="demo-drawer-content">
|
||||
<el-form :model="productModelAdd"
|
||||
ref="productModelAdd"
|
||||
:rules="productRules"
|
||||
class="label-input-form"
|
||||
label-width="130px">
|
||||
<el-row>
|
||||
<el-col>
|
||||
<el-form-item label="选项" prop="dicTypeName" class="add-form-item">
|
||||
<el-input v-model.trim="productModelAdd.dicTypeName" placeholder="请输入选项" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col>
|
||||
<el-form-item label="排序号" prop="showIndex" class="add-form-item">
|
||||
<el-input v-model.number="productModelAdd.showIndex"
|
||||
number
|
||||
placeholder="请输入排序号"
|
||||
:maxlength="4"
|
||||
clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col>
|
||||
<el-form-item label="描述" prop="describes" class="add-form-item">
|
||||
<el-input v-model.trim="productModelAdd.describes"
|
||||
placeholder="请输入描述"
|
||||
clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="demo-drawer-footer">
|
||||
<el-button
|
||||
class="common-button-primary"
|
||||
icon="el-icon-check"
|
||||
type="primary"
|
||||
@click="saveProduct('productModelAdd')">提交</el-button>
|
||||
<el-button
|
||||
class="common-button-default"
|
||||
icon="el-icon-close"
|
||||
@click="closeModal">取消</el-button>
|
||||
</div>
|
||||
</el-drawer>
|
||||
<el-dialog
|
||||
:title="config.attrName"
|
||||
:visible.sync="replaceLawsNumModel"
|
||||
@@ -1490,8 +1547,46 @@ export default {
|
||||
}
|
||||
callback()
|
||||
}
|
||||
/**
|
||||
* 验证不为0的正整数正则
|
||||
* */
|
||||
const validStandNumInCompile2 = (rule, value, callback) => {
|
||||
// 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()
|
||||
|
||||
Reference in New Issue
Block a user