Merge remote-tracking branch 'origin/master'

This commit is contained in:
liyawei
2022-04-28 19:50:17 +08:00
6 changed files with 254 additions and 236 deletions
@@ -32,10 +32,9 @@
checkable checkable
:loading="loading" :loading="loading"
:tree-data="gData" :tree-data="gData"
v-model:checkedKeys="selectedKey"
@select="onSelect"
@check="onCheck" @check="onCheck"
@expand="onExpand" @expand="onExpand"
v-model:checkedKeys="defaultCheckedKeys"
:defaultCheckedKeys="defaultCheckedKeys" :defaultCheckedKeys="defaultCheckedKeys"
:defaultExpandedKeys="defaultExpandedKeys" :defaultExpandedKeys="defaultExpandedKeys"
> >
@@ -86,9 +85,10 @@
this.queryDepartUserTreeList() this.queryDepartUserTreeList()
this.visible = true this.visible = true
}, },
onSelect(selectedKeys, info) { // onSelect(selectedKeys, info) {
this.selectedKey = selectedKeys // console.log(selectedKeys)
}, // this.selectedKey = selectedKeys
// },
onCheck(checkedKeys, info) { onCheck(checkedKeys, info) {
this.userIds = [] this.userIds = []
@@ -167,30 +167,25 @@
if (res.success) { if (res.success) {
this.gData = res.result this.gData = res.result
this.defaultExpandedKeys = [this.departId] this.defaultExpandedKeys = [this.departId]
if (this.personneQuery[this.query.db_field_name + '_id']) { if (this.userName && this.userName.length == 0) {
this.defaultCheckedKeys = this.personneQuery[this.query.db_field_name + '_id'].split(',') if (this.personneQuery[this.query.db_field_name + 'Name']) {
this.selectedKey = this.personneQuery[this.query.db_field_name + '_id'].split(',') this.userName = this.personneQuery[this.query.db_field_name + 'Name'].split(',')
} else if (this.personneQuery[this.query.db_field_name]) { } else if (this.personneQuery[this.query.db_field_name]) {
this.defaultCheckedKeys = this.personneQuery[this.query.db_field_name].split(',') this.userName = this.personneQuery[this.query.db_field_name].split(',')
this.selectedKey = this.personneQuery[this.query.db_field_name].split(',') } else {
} else { this.userName = []
this.defaultCheckedKeys = [] }
this.selectedKey = []
} }
if (this.personneQuery[this.query.db_field_name + 'Name']) { if (this.userIds && this.userIds.length == 0) {
this.userName = this.personneQuery[this.query.db_field_name + 'Name'].split(',') if (this.personneQuery[this.query.db_field_name + '_id']) {
} else if (this.personneQuery[this.query.db_field_name]) { this.userIds = this.personneQuery[this.query.db_field_name + '_id'].split(',')
this.userName = this.personneQuery[this.query.db_field_name].split(',') } else if (this.personneQuery[this.query.db_field_name]) {
} else { this.userIds = this.personneQuery[this.query.db_field_name].split(',')
this.userName = [] } else {
} this.userIds = []
if (this.personneQuery[this.query.db_field_name + '_id']) { }
this.userIds = this.personneQuery[this.query.db_field_name + '_id'].split(',')
} else if (this.personneQuery[this.query.db_field_name]) {
this.userIds = this.personneQuery[this.query.db_field_name].split(',')
} else {
this.userIds = []
} }
this.defaultCheckedKeys = this.userIds
this.treeVisible = true this.treeVisible = true
} else { } else {
this.gData = [] this.gData = []
@@ -129,7 +129,7 @@
@change="dateChange({db_field_name:'xin1Che1Xing2Shi2Shi1Ri4Qi1'})" @change="dateChange({db_field_name:'xin1Che1Xing2Shi2Shi1Ri4Qi1'})"
format="YYYY-MM-DD" format="YYYY-MM-DD"
v-model="formInline.xin1Che1Xing2Shi2Shi1Ri4Qi1" v-model="formInline.xin1Che1Xing2Shi2Shi1Ri4Qi1"
:disabled="true" :disabled="false"
style="width: 100%"/> style="width: 100%"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -148,7 +148,7 @@
@change="dateChange({db_field_name:'implementTime'})" @change="dateChange({db_field_name:'implementTime'})"
format="YYYY-MM-DD" format="YYYY-MM-DD"
v-model="formInline.implementTime" v-model="formInline.implementTime"
:disabled="true" :disabled="false"
style="width: 100%"/> style="width: 100%"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -56,15 +56,15 @@
<a @click="VirtualListNameClick(record)">{{text}}</a> <a @click="VirtualListNameClick(record)">{{text}}</a>
</span> </span>
<span slot="operation" slot-scope="text,record"> <span slot="operation" slot-scope="text,record">
<a class="text-operation" @click="edit(record)">{{$t('edit')}}</a> <a class="text-operation" @click="edit(record)" :disabled="record.state == 1?true:false">{{$t('edit')}}</a>
<a class="text-operation" @click="withdraw(record)"> <a class="text-operation" @click="withdraw(record)">
{{record.state == 2 ? $t('release') : $t('withdraw')}} {{record.state == 2 ? $t('release') : $t('withdraw')}}
</a> </a>
<a class="text-operation" @click="maintenanceList(record)">{{$t('maintenanceList')}}</a> <a class="text-operation" :disabled="record.state == 1?true:false" @click="maintenanceList(record)">{{$t('maintenanceList')}}</a>
<a class="text-operation" :disabled="record.state == 2?true:false" @click="subscribe(record)"> <a class="text-operation" :disabled="record.state == 2?true:false" @click="subscribe(record)">
{{!record.readFlag || record.readFlag == 0 ? $t('subscribe') :$t('CancelSubscribe')}} {{!record.readFlag || record.readFlag == 0 ? $t('subscribe') :$t('CancelSubscribe')}}
</a> </a>
<a class="text-operation" :disabled="record.state == 2?true:false" @click="deleteLib(record)">{{$t('deleteLib')}}</a> <a class="text-operation" :disabled="record.state == 1?true:false" @click="deleteLib(record)">{{$t('deleteLib')}}</a>
</span> </span>
</a-table> </a-table>
</div> </div>
@@ -1,221 +1,219 @@
<template> <template>
<a-drawer <div>
:title="title" <a-drawer
:maskClosable="false" :title="title"
:width="1000" :maskClosable="false"
placement="right" :width="1000"
:closable="true" placement="right"
@close="handleCancel" :closable="true"
:visible="visible" @close="handleCancel"
style="height: 100%;overflow: auto;padding-bottom: 53px;"> :visible="visible"
<a-spin :spinning="confirmLoading"> style="height: 100%;overflow: auto;padding-bottom: 53px;">
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm"> <a-spin :spinning="confirmLoading">
<a-row :gutter="24"> <a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
<a-col :span="12"> <a-row :gutter="24">
<div class="box-title-text"> <a-col :span="12">
<div class="title-text"> <div class="box-title-text">
<div class="title-text">
<span class="title-text-text" <span class="title-text-text"
:title="$t('NiONumber')">{{$t('NiONumber')}}</span> :title="$t('NiONumber')">{{$t('NiONumber')}}</span>
</div>
<a-form-model-item class="itemModel" prop="paramsTemplateName">
<a-input class="box-input"
:disabled="disabled"
v-model="formInline.nioNumber"
:placeholder="$t('PleaseEnter')+$t('NiONumber')"/>
</a-form-model-item>
</div> </div>
<a-form-model-item class="itemModel" prop="paramsTemplateName"> </a-col>
<a-input class="box-input" <a-col :span="12">
:disabled="disabled" <div class="box-title-text">
v-model="formInline.nioNumber" <div class="title-text">
:placeholder="$t('PleaseEnter')+$t('NiONumber')"/> <span class="title-text-text" :title="$t('Required')">{{$t('Required')}}</span>
</a-form-model-item> </div>
</div> <a-form-model-item class="itemModel" prop="state">
</a-col> <a-select :placeholder="$t('PleaseSelect')+$t('Required')" v-model='formInline.isMust'>
<a-col :span="12"> <a-select-option :key="'1'" :value="'1'">{{$t('yes')}}
<div class="box-title-text"> </a-select-option>
<div class="title-text"> <a-select-option :key="'0'" :value="'0'">{{$t('not')}}
<span class="title-text-text" :title="$t('Required')">{{$t('Required')}}</span> </a-select-option>
</a-select>
</a-form-model-item>
</div> </div>
<a-form-model-item class="itemModel" prop="state"> </a-col>
<a-select :placeholder="$t('PleaseSelect')+$t('Required')" v-model="formInline.isMust"> </a-row>
<a-select-option v-for="(item, key) in isRequired" :key="key" :value="item.value"> <a-row :gutter="24">
<span style="display: inline-block;width: 100%" :title=" item.label "> <a-col :span="12">
{{ item.label }} <div class="box-title-text">
</span> <div class="title-text">
</a-select-option>
</a-select>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" <span class="title-text-text"
:title="$t('ParameterName')">{{$t('ParameterName')}}</span> :title="$t('ParameterName')">{{$t('ParameterName')}}</span>
</div>
<a-form-model-item class="itemModel" prop="paramsTemplateName">
<a-input class="box-input"
:disabled="disabled"
v-model="formInline.paramsName"
:placeholder="$t('PleaseEnter')+$t('ParameterName')"/>
</a-form-model-item>
</div> </div>
<a-form-model-item class="itemModel" prop="paramsTemplateName"> </a-col>
<a-input class="box-input" <a-col :span="12">
:disabled="disabled" <div class="box-title-text">
v-model="formInline.paramsName" <div class="title-text">
:placeholder="$t('PleaseEnter')+$t('ParameterName')"/> <span class="title-text-text" :title="$t('technicalField')">{{$t('technicalField')}}</span>
</a-form-model-item> </div>
</div> <a-form-model-item class="itemModel" prop="technologyTerritory">
</a-col> <a-tree-select
<a-col :span="12"> v-model="formInline.technologyTerritory"
<div class="box-title-text"> :maxTagCount="1"
<div class="title-text"> class="box-input"
<span class="title-text-text" :title="$t('technicalField')">{{$t('technicalField')}}</span> style="width: 100%"
:tree-data="CategoryTreeList"
tree-checkable
:placeholder="$t('PleaseSelect')+$t('technicalField')"
/>
</a-form-model-item>
</div> </div>
<a-form-model-item class="itemModel" prop="technologyTerritory"> </a-col>
<a-tree-select </a-row>
v-model="formInline.technologyTerritory" <a-row :gutter="24">
:maxTagCount="1" <a-col :span="12">
class="box-input" <div class="box-title-text">
style="width: 100%" <div class="title-text">
:tree-data="CategoryTreeList"
tree-checkable
:placeholder="$t('PleaseSelect')+$t('technicalField')"
/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" <span class="title-text-text"
:title="$t('parameterBatch')">{{$t('parameterBatch')}}</span> :title="$t('parameterBatch')">{{$t('parameterBatch')}}</span>
</div>
<a-form-model-item class="itemModel" prop="paramsTemplateName">
<j-dict-select-tag class="box-input" v-model="formInline.paramsBatch"
:disabled="disabled"
:placeholder="$t('PleaseSelect')+$t('parameterBatch')"
:type="'select'"
:triggerChange="false" :dictCode="'params_batch'"/>
</a-form-model-item>
</div> </div>
<a-form-model-item class="itemModel" prop="paramsTemplateName"> </a-col>
<j-dict-select-tag class="box-input" v-model="formInline.paramsBatch" <a-col :span="12">
:disabled="disabled" <div class="box-title-text">
:placeholder="$t('PleaseSelect')+$t('parameterBatch')" <div class="title-text">
:type="'select'" <span class="title-text-text" :title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
:triggerChange="false" :dictCode="'params_batch'"/> </div>
</a-form-model-item> <a-form-model-item class="itemModel" prop="technologyTerritory">
</div> <j-dict-select-tag class="box-input" v-model="formInline.dutyTerritory"
</a-col> :disabled="disabled"
<a-col :span="12"> :placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
<div class="box-title-text"> :type="'select'"
<div class="title-text"> :triggerChange="false" :dictCode="'duty_territory'"/>
<span class="title-text-text" :title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span> </a-form-model-item>
</div> </div>
<a-form-model-item class="itemModel" prop="technologyTerritory"> </a-col>
<j-dict-select-tag class="box-input" v-model="formInline.dutyTerritory" </a-row>
:disabled="disabled" <a-row :gutter="24">
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')" <a-col :span="24">
:type="'select'" <div class="box-title-text">
:triggerChange="false" :dictCode="'duty_territory'"/> <div class="title-text">
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" <span class="title-text-text"
:title="$t('ParameterDescription')">{{$t('ParameterDescription')}}</span> :title="$t('ParameterDescription')">{{$t('ParameterDescription')}}</span>
</div>
<a-form-model-item class="itemModel" prop="paramsTemplateName">
<a-input class="box-input"
:disabled="disabled"
v-model="formInline.description"
:placeholder="$t('PleaseEnter')+$t('ParameterDescription')"/>
</a-form-model-item>
</div> </div>
<a-form-model-item class="itemModel" prop="paramsTemplateName"> </a-col>
<a-input class="box-input" </a-row>
:disabled="disabled" <a-row :gutter="24">
v-model="formInline.description" <a-col :span="24">
:placeholder="$t('PleaseEnter')+$t('ParameterDescription')"/> <div class="box-title-text">
</a-form-model-item> <div class="title-text">
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" <span class="title-text-text"
:title="$t('ParameterName')">{{$t('certificationCategory')}}</span> :title="$t('ParameterName')">{{$t('certificationCategory')}}</span>
</div>
<a-form-model-item class="itemModel" prop="paramsTemplateName">
<j-multi-select-tag class="box-input" v-model="formInline.certCategory"
@change='Onchange'
v-on:changelabel='Onchangelabel'
:disabled="disabled"
:placeholder="$t('PleaseSelect')+$t('certificationCategory')"
:type="'checkbox'"
:triggerChange="false" :dictCode="'cert_category'"/>
</a-form-model-item>
</div> </div>
<a-form-model-item class="itemModel" prop="paramsTemplateName"> </a-col>
<j-multi-select-tag class="box-input" v-model="formInline.certCategory" </a-row>
@change='Onchange' <a-row :gutter="24">
v-on:changelabel='Onchangelabel' <a-col :span="12">
:disabled="disabled" <div class="box-title-text">
:placeholder="$t('PleaseSelect')+$t('certificationCategory')" <div class="title-text">
:type="'checkbox'"
:triggerChange="false" :dictCode="'cert_category'"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" <span class="title-text-text"
:title="$t('controlType')">{{$t('controlType')}}</span> :title="$t('controlType')">{{$t('controlType')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="controlType"> <a-form-model-item class="itemModel" prop="controlType">
<a-select :placeholder="$t('PleaseSelect')+$t('controlType')" v-model="formInline.controlType"> <a-select :placeholder="$t('PleaseSelect')+$t('controlType')" v-model="formInline.controlType">
<a-select-option v-for="(item, key) in controlType" :key="key" :value="item.value"> <a-select-option v-for="(item, key) in controlType" :key="key" :value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.label "> <span style="display: inline-block;width: 100%" :title=" item.label ">
{{ item.label }} {{ item.label }}
</span> </span>
</a-select-option> </a-select-option>
</a-select> </a-select>
</a-form-model-item> </a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('controlVerification')">{{$t('controlVerification')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="technologyTerritory"> </a-col>
<a-select :placeholder="$t('PleaseSelect')+$t('controlVerification')" v-model="formInline.controlVerify"> <a-col :span="12">
<a-select-option v-for="(item, key) in controlVerification" :key="key" :value="item.value"> <div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('controlVerification')">{{$t('controlVerification')}}</span>
</div>
<a-form-model-item class="itemModel" prop="technologyTerritory">
<a-select :placeholder="$t('PleaseSelect')+$t('controlVerification')" v-model="formInline.controlVerify">
<a-select-option v-for="(item, key) in controlVerification" :key="key" :value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.label "> <span style="display: inline-block;width: 100%" :title=" item.label ">
{{ item.label }} {{ item.label }}
</span> </span>
</a-select-option> </a-select-option>
</a-select> </a-select>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="title-text-text" <span class="title-text-text"
:title="$t('controlAlternatives')">{{$t('controlAlternatives')}}</span> :title="$t('controlAlternatives')">{{$t('controlAlternatives')}}</span>
</div>
<a-form-model-item class="itemModel" prop="paramsTemplateName">
<a-input class="box-input"
:disabled="disabled"
v-model="formInline.controlValues"
:placeholder="$t('PleaseEnter')+$t('controlAlternatives')"/>
</a-form-model-item>
</div> </div>
<a-form-model-item class="itemModel" prop="paramsTemplateName"> </a-col>
<a-input class="box-input" </a-row>
:disabled="disabled" <a-row :gutter="24">
v-model="formInline.controlValues" <a-col :span="12">
:placeholder="$t('PleaseEnter')+$t('controlAlternatives')"/> <div class="box-title-text">
</a-form-model-item> <div class="title-text">
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" <span class="title-text-text"
:title="$t('attachmentTemplate')">{{$t('attachmentTemplate')}}</span> :title="$t('attachmentTemplate')">{{$t('attachmentTemplate')}}</span>
</div>
<a-form-model-item class="itemModel" prop="paramsTemplateName">
<a-button type="primary" class="button-text"
@click="clickButtonToUpload()">
{{ (formInline.fileTemplateConnectId === 'null' || formInline.fileTemplateConnectId === '' ||
formInline.fileTemplateConnectId == null) ? $t('clickUpload') : $t('viewUploadedFiles')}}
</a-button>
</a-form-model-item>
</div> </div>
<a-form-model-item class="itemModel" prop="paramsTemplateName"> </a-col>
<a-button type="primary" class="button-text" </a-row>
@click="clickButtonToUpload(item)"> <a-row :gutter="24">
<!-- {{ (formInline[item.db_field_name] === 'null' || formInline[item.db_field_name] === '' ||--> <a-col :span="24" >
<!-- formInline[item.db_field_name] == null) ? $t('clickUpload') : $t('viewUploadedFiles')--> <a-tabs>
<!-- }}--> <a-tab-pane v-for='(item,index) in tt' :tab="item.textVal" :key="index + 1">
{{ $t('clickUpload') }}
</a-button>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="24" >
<a-tabs>
<a-tab-pane v-for='(item,index) in certCategoryParamsInfoEOList' :tab="item.textVal" :key="index + 1">
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
@@ -226,7 +224,7 @@
<a-form-model-item class="itemModel" prop="paramsTemplateName"> <a-form-model-item class="itemModel" prop="paramsTemplateName">
<a-input class="box-input" <a-input class="box-input"
:disabled="disabled" :disabled="disabled"
v-model="item.textVal" v-model="item.paramsNumber"
:placeholder="$t('PleaseEnter')+$t('standard')"/> :placeholder="$t('PleaseEnter')+$t('standard')"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -262,24 +260,28 @@
</a-col> </a-col>
</a-row> </a-row>
</a-tab-pane> </a-tab-pane>
</a-tabs> </a-tabs>
</a-col> </a-col>
</a-row> </a-row>
</a-form-model> </a-form-model>
</a-spin> </a-spin>
<div class="drawer-bootom-button"> <div class="drawer-bootom-button">
<a-button style="margin-right: .8rem" @click="handleCancel">{{$t('cancel')}}</a-button> <a-button style="margin-right: .8rem" @click="handleCancel">{{$t('cancel')}}</a-button>
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button> <a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
</div> </div>
</a-drawer> </a-drawer>
<uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"></uploadFile>
</div>
</template> </template>
<script> <script>
import PersonnelSelection from '@/components/PersonnelSelection/index' import PersonnelSelection from '@/components/PersonnelSelection/index'
import { getAction, postAction, downloadFile, putAction } from '@/api/manage' import { getAction, postAction, downloadFile, putAction } from '@/api/manage'
import uploadFile from '@/components/uploadFile/file'
export default { export default {
name: 'addModel', name: 'addModel',
components: { components: {
uploadFile,
PersonnelSelection PersonnelSelection
}, },
props: ['url'], props: ['url'],
@@ -340,7 +342,8 @@ export default {
disabled: false, disabled: false,
projectNameList: [], projectNameList: [],
title: '', title: '',
stateOne: '' stateOne: '',
tt : []
} }
}, },
mounted() { mounted() {
@@ -348,10 +351,22 @@ export default {
this.getSysCategoryTree() this.getSysCategoryTree()
}, },
methods: { methods: {
uploadSuccess(data) {
let attIdList = []
if (data && data.length > 0) {
data.map(item => {
attIdList.push(item.id || data.name)
})
}
this.$refs.uploadFile.visible = false
/** 赋值给当前对应的表单文件 */
this.formInline.fileTemplateConnectId = attIdList.join(',')
this.formInline = { ...this.formInline }
},
clickButtonToUpload(item) { clickButtonToUpload(item) {
// this.$refs.uploadFile.perentHandleFunc() // this.$refs.uploadFile.perentHandleFunc()
// this.$refs.uploadFile.state = item.flag // this.$refs.uploadFile.state = item.flag
// this.$refs.uploadFile.visible = true this.$refs.uploadFile.visible = true
// this.uploadName = item.db_field_name // this.uploadName = item.db_field_name
// getAction('sys/common/getFileInfos', { id: this.formInline[item.db_field_name] }).then((res) => { // getAction('sys/common/getFileInfos', { id: this.formInline[item.db_field_name] }).then((res) => {
// if (res.success) { // if (res.success) {
@@ -362,17 +377,16 @@ export default {
// }) // })
}, },
Onchangelabel(val) { Onchangelabel(val) {
this.certCategoryParamsInfoEOList = []
console.log(val,'val。。。') // this.formInline.certCategoryParamsInfoEOList = []
val.forEach((item) => { val.forEach((item) => {
let _tt = { this.tt.push({
textVal: item.text, // tab textVal: item.text, // tab
certCategory: '', // 所属认证类别 certCategory: '', // 所属认证类别
paramsNumber: '', // 编号 paramsNumber: '', // 编号
paramsName: '', // 参数名称 paramsName: '', // 参数名称
description: ''// 参数说明 description: ''// 参数说明
} })
this.certCategoryParamsInfoEOList.push(_tt)
}) })
}, },
Onchange() { Onchange() {
@@ -427,11 +441,14 @@ export default {
Action = postAction Action = postAction
} }
let query = JSON.parse(JSON.stringify(this.formInline)) let query = JSON.parse(JSON.stringify(this.formInline))
console.log(query,'queryqueryqueryquery')
Object.keys(query).forEach(res => { Object.keys(query).forEach(res => {
if (query[res] && query[res] instanceof Array) { if (query[res] && query[res] instanceof Array) {
query[res] = query[res].join(',') query[res] = query[res].join(',')
} }
}) })
let querytt = JSON.parse(JSON.stringify(this.tt))
query.certCategoryParamsInfoEOList = querytt
this.confirmLoading = true this.confirmLoading = true
Action(url, query).then((res) => { Action(url, query).then((res) => {
if (res.success) { if (res.success) {
@@ -113,6 +113,7 @@ export default {
dataSource: [], dataSource: [],
confirmLoading: false, confirmLoading: false,
url: { url: {
queryById: 'params/paramsInfo/queryById',
list: 'params/paramsInfo/page', list: 'params/paramsInfo/page',
add: 'params/paramsInfo/add', add: 'params/paramsInfo/add',
edit: 'params/paramsInfo/edit', edit: 'params/paramsInfo/edit',
@@ -227,7 +228,12 @@ export default {
}, },
//编辑 //编辑
edit(item) { edit(item) {
this.$refs.addModelRef.editModel(JSON.parse(JSON.stringify(item))) let _this = this
getAction(_this.url.queryById, { id: item.id }).then((res) => {
if (res.success) {
this.$refs.addModelRef.editModel(JSON.parse(JSON.stringify(res.result)))
}
})
}, },
//删除 //删除
deleteLib(val) { deleteLib(val) {
@@ -172,7 +172,7 @@
this.$message.success(this.$t('OperationSuccessful')) this.$message.success(this.$t('OperationSuccessful'))
this.visible = false this.visible = false
this.selectedRowKeys = [] this.selectedRowKeys = []
this.$emit('addModelList') this.$emit('transferListForm')
} else { } else {
this.$message.warning(this.$t('operationFailed')) this.$message.warning(this.$t('operationFailed'))
this.confirmLoading = false this.confirmLoading = false