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