citys
This commit is contained in:
parent
ae0e8da35f
commit
af539a6a17
|
|
@ -26,7 +26,7 @@
|
|||
fit
|
||||
stripe
|
||||
highlight-current-row
|
||||
:height="topHeight"
|
||||
:height="topHeight"
|
||||
@row-click="clickRow"
|
||||
>
|
||||
<el-table-column type="index" width="50"/>
|
||||
|
|
@ -66,7 +66,7 @@
|
|||
v-if="buttonsShow&&checkPermission(['qaction_create'])"
|
||||
type="primary"
|
||||
style="float: right"
|
||||
@click="serviceUpdate(scope)"
|
||||
@click="serviceUpdate()"
|
||||
>
|
||||
更新服务
|
||||
</el-button>
|
||||
|
|
@ -74,7 +74,7 @@
|
|||
v-if="buttonsShow&&checkPermission(['qaction_create'])"
|
||||
type="primary"
|
||||
style="float: right;margin-right: 10px"
|
||||
@click="qualiUpdate(scope)"
|
||||
@click="qualiUpdate()"
|
||||
>
|
||||
编辑资质
|
||||
</el-button>
|
||||
|
|
@ -82,7 +82,7 @@
|
|||
v-if="buttonsShow&&checkPermission(['qaction_create'])"
|
||||
type="primary"
|
||||
style="float: right;margin-right: 10px"
|
||||
@click="qualiCreate(scope)"
|
||||
@click="qualiCreate()"
|
||||
>
|
||||
新增资质
|
||||
</el-button>
|
||||
|
|
@ -90,7 +90,7 @@
|
|||
v-if="buttonsShow&&checkPermission(['qaction_create'])"
|
||||
type="primary"
|
||||
style="float: right;margin-right: 10px"
|
||||
@click="abilityCreate(scope)"
|
||||
@click="abilityCreate()"
|
||||
>
|
||||
新增能力
|
||||
</el-button>
|
||||
|
|
@ -105,7 +105,7 @@
|
|||
highlight-current-row
|
||||
:height="bottomHeight"
|
||||
>
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column type="index" width="50"/>
|
||||
|
||||
<el-table-column width="150px" label="任务标题">
|
||||
<template>{{qtaskName}}</template>
|
||||
|
|
@ -131,11 +131,13 @@
|
|||
@click="handleRecord({ action: 'view', record: scope.row })"
|
||||
>有
|
||||
<span style="color: red">{{ scope.row.files.length }}</span>
|
||||
个文件</el-link
|
||||
个文件
|
||||
</el-link
|
||||
>
|
||||
<div v-else v-for="item in scope.row.files_" v-bind:key="item.id">
|
||||
<el-link :href="item.path" target="_blank" type="primary">
|
||||
{{item.name }}</el-link>
|
||||
{{item.name }}
|
||||
</el-link>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
@ -145,7 +147,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作时间">
|
||||
<template slot-scope="scope" >{{ scope.row.update_time.substring(0, 16) }}</template>
|
||||
<template slot-scope="scope">{{ scope.row.update_time.substring(0, 16) }}</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
|
|
@ -160,7 +162,8 @@
|
|||
type="danger"
|
||||
size="small"
|
||||
@click="handleDelete( scope.row.id )"
|
||||
>删除</el-link>
|
||||
>删除
|
||||
</el-link>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
|
|
@ -323,6 +326,7 @@
|
|||
reserve-keyword
|
||||
:remote-method="searchCity"
|
||||
:loading="loading"
|
||||
@change="getCheckCity"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in cityOptions"
|
||||
|
|
@ -390,12 +394,13 @@
|
|||
align="center"
|
||||
label="操作"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<template #default="scope">
|
||||
<el-link
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="handleEdit(scope.row)"
|
||||
>编辑</el-link>
|
||||
>编辑
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
@ -458,53 +463,16 @@
|
|||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="备案城市" v-if="qualiForm.type==='OTHER'">
|
||||
<el-select
|
||||
v-model="qualiForm.citys"
|
||||
placeholder="备案城市"
|
||||
style="width: 100%;"
|
||||
filterable
|
||||
remote
|
||||
multiple
|
||||
disabled
|
||||
reserve-keyword
|
||||
>
|
||||
<el-option
|
||||
v-for="item in cityOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
<el-input v-model="qualiForm.citys" disabled placeholder="备案城市"/>
|
||||
<!--<span v-for="item in qualiForm.citys" :key="item.id">{{item.name}}</span>-->
|
||||
</el-form-item>
|
||||
<el-form-item label="所在省" v-if="qualiForm.grade===20">
|
||||
<el-select
|
||||
v-model="qualiForm.province"
|
||||
placeholder="省份"
|
||||
style="width: 100%"
|
||||
disabled
|
||||
>
|
||||
<el-option
|
||||
v-for="item in proviceOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-input v-model="qualiForm.province_name" disabled placeholder="所在省"/>
|
||||
<!--{{ formData.province_name }}-->
|
||||
</el-form-item>
|
||||
<el-form-item label="所在市" v-if="qualiForm.grade===30">
|
||||
<el-select
|
||||
style="width: 100%;"
|
||||
v-model="qualiForm.city"
|
||||
placeholder="所在市"
|
||||
disabled
|
||||
>
|
||||
<el-option
|
||||
v-for="item in cityOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
<el-input v-model="qualiForm.city_name" disabled placeholder="所在市"/>
|
||||
<!--{{ formData.city_name }}-->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div style="text-align: right">
|
||||
|
|
@ -541,7 +509,19 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import {getQtaskMy, getQtask,qactionMy, getQualityMy,createQuali,qactionDelete,updateQuali, createAbility, updateService,provinceLists,cityLists} from "@/api/ability";
|
||||
import {
|
||||
getQtaskMy,
|
||||
getQtask,
|
||||
qactionMy,
|
||||
getQualityMy,
|
||||
createQuali,
|
||||
qactionDelete,
|
||||
updateQuali,
|
||||
createAbility,
|
||||
updateService,
|
||||
provinceLists,
|
||||
cityLists
|
||||
} from "@/api/ability";
|
||||
import {getDictList} from "@/api/dict";
|
||||
import {genTree} from "@/utils";
|
||||
import {getOrgList} from "@/api/org";
|
||||
|
|
@ -560,22 +540,22 @@
|
|||
upHeaders: upHeaders(),
|
||||
upUrl: upUrl(),
|
||||
qtask: null,
|
||||
checkedItem:null,
|
||||
checkedItem: null,
|
||||
pageForm: {
|
||||
page: 1,
|
||||
page_size: 10,
|
||||
org: '',
|
||||
},
|
||||
listQuery:{
|
||||
listQuery: {
|
||||
page: 1,
|
||||
page_size: 10,
|
||||
task:null,
|
||||
task: null,
|
||||
},
|
||||
quliList: [],
|
||||
orgData: [],
|
||||
fileList: [],
|
||||
cityOptions: [],
|
||||
proviceOptions:[],
|
||||
proviceOptions: [],
|
||||
fileLista: [],
|
||||
updateId: null,
|
||||
taskList: {count: 0,},
|
||||
|
|
@ -590,14 +570,14 @@
|
|||
dialogVisibleAbility: false,
|
||||
dialogVisibleQuliEdit: false,
|
||||
dialogType: "new",
|
||||
severForm:{
|
||||
qtask:null,
|
||||
value2:'',
|
||||
severForm: {
|
||||
qtask: null,
|
||||
value2: '',
|
||||
},
|
||||
qualiForm: {
|
||||
name: "",
|
||||
type: "",
|
||||
grade:null,
|
||||
grade: null,
|
||||
scope: "",
|
||||
level: "",
|
||||
province: "",
|
||||
|
|
@ -629,24 +609,24 @@
|
|||
'CNAS',
|
||||
'OTHER'
|
||||
],
|
||||
atypeOptions:[],
|
||||
atypeOptions: [],
|
||||
afieldOptions: [],//领域
|
||||
gradeOptions: [
|
||||
{id:10,name:'国家级'},{id:20,name:'省级'},{id:30,name:'市级'}
|
||||
{id: 10, name: '国家级'}, {id: 20, name: '省级'}, {id: 30, name: '市级'}
|
||||
],//等级
|
||||
qtaskName: "",
|
||||
filterOrgText: "",
|
||||
treeLoding: false,
|
||||
buttonsShow: false,
|
||||
topHeight:null,
|
||||
bottomHeight:null,
|
||||
topHeight: null,
|
||||
bottomHeight: null,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
let height1 = document.getElementsByClassName('app-main')[0].clientHeight/2;
|
||||
let height1 = document.getElementsByClassName('app-main')[0].clientHeight / 2;
|
||||
let height2 = document.getElementsByClassName('pagination-container')[0].clientHeight;
|
||||
this.topHeight = height1-height2-95;
|
||||
this.bottomHeight = height1-height2-80;
|
||||
this.topHeight = height1 - height2 - 95;
|
||||
this.bottomHeight = height1 - height2 - 80;
|
||||
this.getTableList();
|
||||
this.getGroup();
|
||||
//领域类型
|
||||
|
|
@ -657,26 +637,26 @@
|
|||
},
|
||||
|
||||
methods: {
|
||||
getOptions(){
|
||||
getDictList({type__code: "field_type",is_used:true}).then((res) => {
|
||||
this.afieldOptions = genTree(res.data);
|
||||
getOptions() {
|
||||
getDictList({type__code: "field_type", is_used: true}).then((res) => {
|
||||
this.afieldOptions = genTree(res.data);
|
||||
});
|
||||
getDictList({type__code: "quality_type",is_used:true}).then((res) => {
|
||||
getDictList({type__code: "quality_type", is_used: true}).then((res) => {
|
||||
this.atypeOptions = genTree(res.data);
|
||||
});
|
||||
},
|
||||
getProvince(){
|
||||
provinceLists({page:1,page_size:60}).then(res=>{
|
||||
getProvince() {
|
||||
provinceLists({page: 1, page_size: 60}).then(res => {
|
||||
this.proviceOptions = res.data.results;
|
||||
});
|
||||
cityLists().then(res=>{
|
||||
cityLists().then(res => {
|
||||
this.cityOptions = res.data.results;
|
||||
})
|
||||
},
|
||||
searchCity(query){
|
||||
searchCity(query) {
|
||||
if (query !== '') {
|
||||
this.loading = true;
|
||||
cityLists({search:query}).then(res=>{
|
||||
cityLists({search: query}).then(res => {
|
||||
this.cityOptions = res.data.results;
|
||||
this.loading = false;
|
||||
})
|
||||
|
|
@ -684,9 +664,14 @@
|
|||
this.cityOptions = [];
|
||||
}
|
||||
},
|
||||
getCites(province){
|
||||
this.qualiForm.city ='';
|
||||
cityLists({parent:province,page:1,page_size:100}).then(res=>{
|
||||
getCheckCity(data) {
|
||||
debugger;
|
||||
console.log(data);
|
||||
this.qualiForm.citys = data;
|
||||
},
|
||||
getCites(province) {
|
||||
this.qualiForm.city = '';
|
||||
cityLists({parent: province, page: 1, page_size: 100}).then(res => {
|
||||
this.cityOptions = res.data.results;
|
||||
})
|
||||
},
|
||||
|
|
@ -725,20 +710,20 @@
|
|||
handleFilter() {
|
||||
this.getTableList();
|
||||
},
|
||||
clickRow(obj){
|
||||
clickRow(obj) {
|
||||
this.checkedItem = obj;
|
||||
this.qtask = obj.qtask;
|
||||
this.qtaskName = obj.qtask_.name;
|
||||
this.buttonsShow = true;
|
||||
this.listQuery.task = obj.qtask;
|
||||
qactionMy(this.listQuery).then((res)=>{
|
||||
this.listQuery.task = obj.qtask;
|
||||
qactionMy(this.listQuery).then((res) => {
|
||||
this.recordList = res.data;
|
||||
})
|
||||
},
|
||||
|
||||
///////
|
||||
getList(){
|
||||
qactionMy(this.listQuery).then((res)=>{
|
||||
getList() {
|
||||
qactionMy(this.listQuery).then((res) => {
|
||||
this.recordList = res.data;
|
||||
})
|
||||
},
|
||||
|
|
@ -747,7 +732,7 @@
|
|||
this.dialogVisibleSever = true;
|
||||
},
|
||||
//更新服务提交
|
||||
submitEditSever(form){
|
||||
submitEditSever(form) {
|
||||
let that = this;
|
||||
this.$refs[form].validate((valid) => {
|
||||
if (valid) {
|
||||
|
|
@ -776,35 +761,41 @@
|
|||
this.dialogVisibleQuliEdit = true;
|
||||
this.getQuliList();
|
||||
},
|
||||
getQuliList(){
|
||||
getQualityMy().then(res=>{
|
||||
getQuliList() {
|
||||
getQualityMy().then(res => {
|
||||
this.quliList = res.data.results;
|
||||
})
|
||||
},
|
||||
//更改资质类型
|
||||
qualiTypeChange(){
|
||||
if(this.qualiForm.type==='OTHER'){
|
||||
qualiTypeChange() {
|
||||
if (this.qualiForm.type === 'OTHER') {
|
||||
this.qualiForm.grade = '';
|
||||
this.qualiForm.city = '';
|
||||
this.qualiForm.province = '';
|
||||
}
|
||||
},
|
||||
//编辑资质
|
||||
handleEdit(row){
|
||||
handleEdit(row) {
|
||||
|
||||
this.showForm = true;
|
||||
this.qualiForm.id= row.id;
|
||||
this.qualiForm.name= row.name;
|
||||
this.qualiForm.type= row.type;
|
||||
this.qualiForm.grade =row.grade;
|
||||
this.qualiForm.scope= row.scope;
|
||||
this.qualiForm.level=row.level;
|
||||
this.qualiForm.province=row.province;
|
||||
this.qualiForm.city=row.city;
|
||||
this.qualiForm.description=row.description;
|
||||
this.qualiForm.citys=row.citys;
|
||||
cityLists({parent:row.province,page:1,page_size:100}).then(res=>{
|
||||
this.cityOptions = res.data.results;
|
||||
})
|
||||
this.qualiForm.id = row.id;
|
||||
this.qualiForm.name = row.name;
|
||||
this.qualiForm.type = row.type;
|
||||
this.qualiForm.grade = row.grade;
|
||||
this.qualiForm.scope = row.scope;
|
||||
this.qualiForm.level = row.level;
|
||||
this.qualiForm.province_name = row.province_name?row.province_name:'';
|
||||
this.qualiForm.city_name = row.city_name?row.city_name:'';
|
||||
this.qualiForm.description = row.description;
|
||||
this.qualiForm.citys = null;
|
||||
if(row.citys_&&row.citys_.length>0){
|
||||
let citys = '';
|
||||
row.citys_.forEach(item=>{
|
||||
citys = citys+item.name;
|
||||
})
|
||||
this.qualiForm.citys = citys;
|
||||
}
|
||||
|
||||
},
|
||||
//新增能力
|
||||
abilityCreate() {
|
||||
|
|
@ -815,23 +806,16 @@
|
|||
let that = this;
|
||||
that.$refs[form].validate((valid) => {
|
||||
if (valid) {
|
||||
if(that.qualiForm.type==='OTHER'){
|
||||
that.qualiForm.citys=[];
|
||||
let city = parseInt(that.qualiForm.city);
|
||||
let province = parseInt(that.qualiForm.province);
|
||||
that.qualiForm.citys.push(province);
|
||||
that.qualiForm.citys.push(city);
|
||||
}else{}
|
||||
let obj = new Object();
|
||||
obj.qtask = that.qtask;
|
||||
obj.value2 = that.qualiForm;
|
||||
if(obj.value2.grade===''){
|
||||
obj.value2.grade=null;
|
||||
if (obj.value2.grade === '') {
|
||||
obj.value2.grade = null;
|
||||
}
|
||||
const isEdit = that.dialogType === "edit";
|
||||
if (isEdit) {
|
||||
updateQuali(obj).then((res) => {
|
||||
if (res.code>=200&&res.code<400) {
|
||||
if (res.code >= 200 && res.code < 400) {
|
||||
that.getList();
|
||||
that.dialogVisibleQuliEdit = false;
|
||||
that.$message.success("成功");
|
||||
|
|
@ -841,7 +825,7 @@
|
|||
debugger;
|
||||
console.log(obj);
|
||||
createQuali(obj).then((res) => {
|
||||
if (res.code>=200&&res.code<400) {
|
||||
if (res.code >= 200 && res.code < 400) {
|
||||
that.getList();
|
||||
that.dialogVisible = false;
|
||||
that.$message.success("成功");
|
||||
|
|
@ -860,7 +844,7 @@
|
|||
if (valid) {
|
||||
that.abilityForm.qtask = that.qtask;
|
||||
createAbility(that.abilityForm).then((res) => {
|
||||
if (res.code>=200&&res.code<400) {
|
||||
if (res.code >= 200 && res.code < 400) {
|
||||
that.getList();
|
||||
that.dialogVisibleAbility = false;
|
||||
that.$message.success("成功");
|
||||
|
|
@ -872,12 +856,12 @@
|
|||
});
|
||||
},
|
||||
//删除操作
|
||||
handleDelete(id){
|
||||
handleDelete(id) {
|
||||
let that = this;
|
||||
that.$confirm("确认删除该操作吗?", "提示")
|
||||
.then(async () => {
|
||||
await qactionDelete(id).then(res=>{
|
||||
if(res.code>=200&&res.code<400){
|
||||
await qactionDelete(id).then(res => {
|
||||
if (res.code >= 200 && res.code < 400) {
|
||||
that.getList();
|
||||
that.$message.success("成功");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -356,28 +356,21 @@
|
|||
},
|
||||
//操作处理
|
||||
handleRecord(type, item) {
|
||||
// debugger;
|
||||
this.showData.data = item;
|
||||
this.showData.id = item.id;
|
||||
this.showData.type = item.action;
|
||||
this.showData.action = type;
|
||||
this.actionType = type;
|
||||
this.fieldList2 =[];
|
||||
qactionItem(item.id).then(res=>{
|
||||
if (res.code>=200) {
|
||||
debugger;
|
||||
let updateDetail = res.data.update_detail;//更改字段
|
||||
updateDetail.forEach(item=>{
|
||||
this.fieldList2.push(item.field);//所有字段
|
||||
})
|
||||
this.drawer = true;
|
||||
}
|
||||
debugger;
|
||||
console.log(this.fieldList2)
|
||||
})
|
||||
|
||||
qactionItem(item.id).then(res => {
|
||||
console.log(res)
|
||||
})
|
||||
},
|
||||
handleDelete(id) {
|
||||
this.$confirm("确认删除该操作吗?", "提示")
|
||||
|
|
|
|||
|
|
@ -8,56 +8,34 @@
|
|||
label-position="left"
|
||||
>
|
||||
<el-form-item label="资质名称">
|
||||
{{ data.value2.name }}
|
||||
</el-form-item>
|
||||
<el-form-item label="" v-if="data.value2.name1">
|
||||
<span style="color: #f56c6c;">{{data.value2.name1}}</span>
|
||||
{{ data.name }}
|
||||
</el-form-item>
|
||||
<el-form-item label="资质类型">
|
||||
{{ data.value2.type }}
|
||||
</el-form-item>
|
||||
<el-form-item label="" v-if="data.value2.type1">
|
||||
<span style="color: #f56c6c;">{{data.value2.type1}}</span>
|
||||
{{ data.type }}
|
||||
</el-form-item>
|
||||
<el-form-item label="资质等级" v-if="data.type!=='OTHER'">
|
||||
<span v-if="data.value2.grade===10">国家级</span>
|
||||
<span v-if="data.value2.grade===20">省级</span>
|
||||
<span v-if="data.value2.grade===30">市级</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="" v-if="data.value2.grade1">
|
||||
<span v-if="data.value2.grade1===10">国家级</span>
|
||||
<span v-if="data.value2.grade1===20">省级</span>
|
||||
<span v-if="data.value2.grade1===30">市级</span>
|
||||
<span v-if="data.grade===10">国家级</span>
|
||||
<span v-if="data.grade===20">省级</span>
|
||||
<span v-if="data.grade===30">市级</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="二级等级" v-if="data.type==='OTHER'">
|
||||
{{ data.value2.level }}
|
||||
</el-form-item>
|
||||
<el-form-item label="" v-if="data.value2.level1">
|
||||
<span style="color: #f56c6c;">{{data.value2.level1}}</span>
|
||||
{{ data.level }}
|
||||
</el-form-item>
|
||||
<el-form-item label="资质范围">
|
||||
{{data.value2.scope}}
|
||||
</el-form-item>
|
||||
<el-form-item label="" v-if="data.value2.scope1">
|
||||
<span style="color: #f56c6c;">{{data.value2.scope1}}</span>
|
||||
{{data.scope}}
|
||||
</el-form-item>
|
||||
<el-form-item label="描述">
|
||||
{{data.value2.description}}
|
||||
</el-form-item>
|
||||
<el-form-item label="" v-if="data.value2.description1">
|
||||
<span style="color: #f56c6c;">{{data.value2.description1}}</span>
|
||||
{{data.description}}
|
||||
</el-form-item>
|
||||
<el-form-item label="备案城市" v-if="data.type==='OTHER'">
|
||||
{{ data.value2.citys }}
|
||||
<span v-for="item in data.citys_" :key="item.id">{{item.name}}</span>
|
||||
<!--{{ data.value2.citys }}-->
|
||||
</el-form-item>
|
||||
<el-form-item label="所在省" v-if="data.type!=='OTHER'">
|
||||
{{ data.value2.province }}
|
||||
<el-form-item label="所在省" v-if="data.grade===20">
|
||||
{{ data.province_name }}
|
||||
</el-form-item>
|
||||
<el-form-item label="所在市" v-if="data.type!=='OTHER'">
|
||||
{{ data.value2.city }}
|
||||
</el-form-item>
|
||||
<el-form-item label="报送人">
|
||||
{{ data.value2.name }}
|
||||
<el-form-item label="所在市" v-if="data.grade==30">
|
||||
{{ data.city_name }}
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div v-if="showData.type==='quali:update'">
|
||||
|
|
@ -86,7 +64,7 @@
|
|||
{{formData.description}}
|
||||
</el-form-item>
|
||||
<el-form-item label="备案城市" v-if="formData.type==='OTHER'">
|
||||
{{ formData.province_name }}{{ formData.city_name }}
|
||||
<span v-for="item in data.value2.citys_" :key="item.id">{{item.name}}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="所在省" v-if="formData.grade===20">
|
||||
{{ formData.province_name }}
|
||||
|
|
@ -121,7 +99,8 @@
|
|||
<span :class="setClass('description')"> {{ formData2.description }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="备案城市" v-if="formData2.type==='OTHER'">
|
||||
<span :class="setClass('citys')"> {{ formData2.province_name}}{{ formData2.city_name }}</span>
|
||||
<span :class="setClass('citys')" v-for="item in data.value2.citys_" :key="item.id">{{item.name}}</span>
|
||||
<!--<span :class="setClass('citys')"> {{ formData2.province_name}}{{ formData2.city_name }}</span>-->
|
||||
</el-form-item>
|
||||
<el-form-item label="所在省" v-if="formData2.grade===20">
|
||||
<span :class="setClass('provice')"> {{ formData2.province_name}}</span>
|
||||
|
|
@ -174,7 +153,6 @@
|
|||
},
|
||||
mounted() {
|
||||
this.initRecord();
|
||||
this.getProvince();
|
||||
},
|
||||
methods: {
|
||||
setClass(item){
|
||||
|
|
@ -185,26 +163,29 @@
|
|||
return obj;
|
||||
},
|
||||
initRecord() {
|
||||
// debugger;
|
||||
//操作类型查看/确认
|
||||
this.action = this.showData.action;
|
||||
this.data = Object.assign({}, this.showData.data);
|
||||
qactionItem(this.data.id).then(res=>{
|
||||
let that = this;
|
||||
that.action = that.showData.action;
|
||||
let type = that.showData.type;
|
||||
qactionItem(that.showData.id).then(res=>{
|
||||
if (res.code>=200) {
|
||||
this.formData =Object.assign({}, res.data.value1);
|
||||
this.formData2 = res.data.value1;
|
||||
debugger;
|
||||
console.log(this.formData);
|
||||
console.log(this.formData2);
|
||||
let fieldList = [];
|
||||
let updateDetail = res.data.update_detail;//更改字段
|
||||
for( let key in this.formData2 ){
|
||||
fieldList.push(key);//所有字段
|
||||
}
|
||||
updateDetail.forEach(item=>{
|
||||
if(fieldList.indexOf(item.field)>-1){
|
||||
this.formData2[item.field] = item.value2;
|
||||
if(type==='quali:create'){
|
||||
that.data = res.data.value2;
|
||||
}else{
|
||||
that.formData =Object.assign({}, res.data.value1);
|
||||
that.formData2 = res.data.value1;
|
||||
let fieldList = [];
|
||||
let updateDetail = res.data.update_detail;//更改字段
|
||||
for( let key in that.formData2 ){
|
||||
fieldList.push(key);//所有字段
|
||||
}
|
||||
});
|
||||
updateDetail.forEach(item=>{
|
||||
if(fieldList.indexOf(item.field)>-1){
|
||||
that.formData2[item.field] = item.value2;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue