This commit is contained in:
曹前明 2022-06-06 08:40:23 +08:00
commit a87535616f
8 changed files with 464 additions and 286 deletions

View File

@ -120,6 +120,12 @@ export function getAbilityQuality(query) {
params: query params: query
}) })
} }
export function getQualityItem(id) {
return request({
url: `/ability/quali/${id}/`,
method: 'get'
})
}
export function getQualityMy(query) { export function getQualityMy(query) {
return request({ return request({
url: `/ability/quali/my/`, url: `/ability/quali/my/`,

View File

@ -64,28 +64,44 @@
ref="filterTable" ref="filterTable"
> >
<el-table-column type="index" width="45"/> <el-table-column type="index" width="45"/>
<el-table-column label="名称" prop="name"> <el-table-column label="名称">
<template slot-scope="scope">
<span v-html="showlight(scope.row.name)"></span>
</template>
</el-table-column> </el-table-column>
<el-table-column label="资质类型" prop="type"> <el-table-column label="资质类型">
<template slot-scope="scope">
<span v-html="showlight(scope.row.name)"></span>
</template>
</el-table-column> </el-table-column>
<el-table-column label="等级"> <el-table-column label="等级">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.type==='OTHER'">{{scope.row.level}}</span> <span v-if="scope.row.type==='OTHER'" v-html="showlight(scope.row.level)">{{scope.row.level}}</span>
<span v-else>{{typeOptions[scope.row.grade]}}</span> <span v-else v-html="showlight(typeOptions[scope.row.grade])">{{typeOptions[scope.row.grade]}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备案城市" prop="citys"> <el-table-column label="备案城市">
<!-- <template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.grade">{{ scope.row.grade}}</span> <span v-if="scope.row.province_name" v-html="showlight(scope.row.province_name)"></span>
<span v-if="scope.row.level">{{ scope.row.level}}</span> <span v-if="scope.row.city_name" v-html="showlight(scope.row.city_name)"></span>
</template>--> </template>
</el-table-column> </el-table-column>
<el-table-column label="所属单位" prop="org"></el-table-column> <el-table-column label="所属单位">
<el-table-column label="主要服务" prop="service"> <template slot-scope="scope">
<span v-if="scope.row.org_" v-html="showlight(scope.row.org_.name)"></span>
</template>
</el-table-column> </el-table-column>
<el-table-column label="资质范围" prop="scope"> <!-- <el-table-column label="主要服务" prop="service">
</el-table-column>-->
<el-table-column label="资质范围">
<template slot-scope="scope">
<span v-html="showlight(scope.row.scope)"></span>
</template>
</el-table-column> </el-table-column>
<el-table-column label="描述" prop="description"> <el-table-column label="描述">
<template slot-scope="scope">
<span v-html="showlight(scope.row.description)"></span>
</template>
</el-table-column> </el-table-column>
<el-table-column label="创建日期"> <el-table-column label="创建日期">
<template slot-scope="scope">{{scope.row.create_time.substring(0, 10)}}</template> <template slot-scope="scope">{{scope.row.create_time.substring(0, 10)}}</template>
@ -152,6 +168,20 @@
this.getGroup(); this.getGroup();
}, },
methods: { methods: {
showlight(val) {
val = val + "";
if (this.listQuery.search !== "") {
let searchList = this.listQuery.search.split(" ");
let reg = null;
for (let i = 0; i < searchList.length; i++) {
reg=new RegExp(searchList[i],"g");
val = val.replace(reg, '<span style="color:red;font-weight:bold">' + searchList[i] + '</span>');
}
return val;
} else {
return val;
}
},
checkPermission, checkPermission,
getList() { getList() {
this.listLoading = true; this.listLoading = true;

View File

@ -47,7 +47,6 @@
</el-col> </el-col>
</el-row> </el-row>
<div style="margin-top: 10px"> <div style="margin-top: 10px">
<!-- <el-button type="primary" icon="el-icon-plus" @click="handleAdd" v-if="checkPermission(['cma_create'])">新增</el-button> -->
<el-popover <el-popover
placement="top" placement="top"
width="160" width="160"
@ -71,13 +70,9 @@
> >
</el-upload> </el-upload>
</div> </div>
<el-button slot="reference">导入分子公司能力</el-button> <el-button slot="reference">导入分子公司能力</el-button>
</el-popover> </el-popover>
<el-button @click="delAll()" v-if="checkPermission(['cma_deletes'])">批量删除</el-button> <el-button @click="delAll()" v-if="checkPermission(['cma_deletes'])">批量删除</el-button>
</div> </div>
</el-card> </el-card>
<el-card style="margin-top: 10px"> <el-card style="margin-top: 10px">
@ -135,14 +130,10 @@
></template> ></template>
</el-table-column> </el-table-column>
<el-table-column label="创建日期"> <el-table-column label="创建日期">
<template slot-scope="scope">{{ <template slot-scope="scope">{{scope.row.create_time.substring(0, 10)}}</template>
scope.row.create_time.substring(0, 10)
}}</template>
</el-table-column> </el-table-column>
<el-table-column label="变更日期"> <el-table-column label="变更日期">
<template slot-scope="scope">{{ <template slot-scope="scope">{{scope.row.update_time.substring(0, 10)}}</template>
scope.row.update_time.substring(0, 10)
}}</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="关联资质" label="关联资质"
@ -183,7 +174,6 @@
</template> </template>
</el-table-column> --> </el-table-column> -->
</el-table> </el-table>
<pagination <pagination
v-show="cmaList.count > 0" v-show="cmaList.count > 0"
:total="cmaList.count" :total="cmaList.count"
@ -281,13 +271,10 @@ export default {
val = val + ""; val = val + "";
if (this.listQuery.search != "") { if (this.listQuery.search != "") {
let searchList = this.listQuery.search.split(" "); let searchList = this.listQuery.search.split(" ");
for (var i = 0; i < searchList.length; i++) { let reg = null;
val = val.replace( for (let i = 0; i < searchList.length; i++) {
searchList[i], reg=new RegExp(searchList[i],"g");
'<span style="color:red;font-weight:bold">' + val = val.replace(reg, '<span style="color:red;font-weight:bold">' + searchList[i] + '</span>');
searchList[i] +
"</span>"
);
} }
return val; return val;
} else { } else {

View File

@ -26,7 +26,7 @@
fit fit
stripe stripe
highlight-current-row highlight-current-row
max-height="300" :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>
@ -103,9 +103,9 @@
fit fit
stripe stripe
highlight-current-row highlight-current-row
max-height="400" :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>
@ -124,13 +124,6 @@
<el-tag type="danger" effect="plain" v-else>未确认</el-tag> <el-tag type="danger" effect="plain" v-else>未确认</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="改动内容">
<template #default="scope">
<span v-if="scope.row.value2.name">{{ scope.row.value2.name }}</span>
<span v-else>{{ scope.row.value2 }}</span>
</template>
</el-table-column>
<el-table-column label="报送文件"> <el-table-column label="报送文件">
<template slot-scope="scope" v-if="scope.row.files"> <template slot-scope="scope" v-if="scope.row.files">
<el-link <el-link
@ -138,19 +131,23 @@
@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>
<el-table-column label="操作人"> <el-table-column label="操作人">
<template slot-scope="scope">{{ scope.row.content_name }}</template> <template slot-scope="scope">
<span v-if="scope.row.create_by_"> {{ scope.row.create_by_.name }}</span>
</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
@ -165,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>
@ -319,21 +317,16 @@
</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-select
v-model="qualiForm.province" v-model="qualiForm.citys"
placeholder="省份" placeholder="备案城市"
clearable style="width: 100%;"
@change="getCites(qualiForm.province)" filterable
> remote
<el-option multiple
v-for="item in proviceOptions" reserve-keyword
:key="item.id" :remote-method="searchCity"
:label="item.name" :loading="loading"
:value="item.id"> @change="getCheckCity"
</el-option>
</el-select>
<el-select
v-model="qualiForm.city"
placeholder="所在市"
> >
<el-option <el-option
v-for="item in cityOptions" v-for="item in cityOptions"
@ -364,6 +357,11 @@
style="width: 100%;" style="width: 100%;"
v-model="qualiForm.city" v-model="qualiForm.city"
placeholder="所在市" placeholder="所在市"
filterable
remote
reserve-keyword
:remote-method="searchCity"
:loading="loading"
> >
<el-option <el-option
v-for="item in cityOptions" v-for="item in cityOptions"
@ -396,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>
@ -464,60 +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.province" <!--<span v-for="item in qualiForm.citys" :key="item.id">{{item.name}}</span>-->
placeholder="省份"
clearable
@change="getCites(qualiForm.province)"
>
<el-option
v-for="item in proviceOptions"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
<el-select
v-model="qualiForm.city"
placeholder="所在市"
>
<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="省份"
clearable
style="width: 100%"
@change="getCites(qualiForm.province)"
>
<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="所在市"
>
<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">
@ -554,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";
@ -573,27 +540,28 @@
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,},
recordList: {count: 0,}, recordList: {count: 0,},
drawer: false, drawer: false,
loading: false,
showForm: false, showForm: false,
multiple: true, multiple: true,
listLoading: false, listLoading: false,
@ -602,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: "",
@ -641,18 +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,
bottomHeight: null,
} }
}, },
mounted() { mounted() {
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.getTableList(); this.getTableList();
this.getGroup(); this.getGroup();
//领域类型 //领域类型
@ -663,22 +637,41 @@
}, },
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 => {
this.cityOptions = res.data.results;
}) })
}, },
getCites(province){ searchCity(query) {
this.qualiForm.city =''; if (query !== '') {
cityLists({parent:province,page:1,page_size:100}).then(res=>{ this.loading = true;
cityLists({search: query}).then(res => {
this.cityOptions = res.data.results;
this.loading = false;
})
} else {
this.cityOptions = [];
}
},
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; this.cityOptions = res.data.results;
}) })
}, },
@ -717,22 +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() {
this.qtask = obj.qtask; qactionMy(this.listQuery).then((res) => {
this.listQuery.task = obj.qtask;
qactionMy(this.listQuery).then((res)=>{
this.recordList = res.data; this.recordList = res.data;
}) })
}, },
@ -741,14 +732,16 @@
this.dialogVisibleSever = true; this.dialogVisibleSever = true;
}, },
//更新服务提交 //更新服务提交
submitEditSever(form){ submitEditSever(form) {
let that = this;
this.$refs[form].validate((valid) => { this.$refs[form].validate((valid) => {
if (valid) { if (valid) {
this.severForm.qtask = this.qtask; that.severForm.qtask = this.qtask;
updateService(this.severForm).then((res) => { updateService(this.severForm).then((res) => {
if (res.code >= 200) { if (res.code >= 200) {
this.dialogVisibleSever = false; that.getList();
this.$message.success("成功"); that.dialogVisibleSever = false;
that.$message.success("成功");
} }
}); });
} else { } else {
@ -768,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() {
@ -804,37 +803,32 @@
}, },
//提交资质 //提交资质
async confirm(form) { async confirm(form) {
this.$refs[form].validate((valid) => { let that = this;
that.$refs[form].validate((valid) => {
if (valid) { if (valid) {
if(this.qualiForm.type==='OTHER'){
let city = parseInt(this.qualiForm.city);
let province = parseInt(this.qualiForm.province);
this.qualiForm.citys.push(province);
this.qualiForm.citys.push(city);
}else{}
let obj = new Object(); let obj = new Object();
obj.qtask = this.qtask; obj.qtask = that.qtask;
obj.value2 = this.qualiForm; obj.value2 = that.qualiForm;
if(obj.value2.grade===''){ if (obj.value2.grade === '') {
obj.value2.grade=null obj.value2.grade = null;
} }
const isEdit = this.dialogType === "edit"; const isEdit = that.dialogType === "edit";
if (isEdit) { if (isEdit) {
updateQuali(obj).then((res) => { updateQuali(obj).then((res) => {
if (res.code >= 200) { if (res.code >= 200 && res.code < 400) {
this.getTableList(); that.getList();
this.dialogVisibleQuliEdit = false; that.dialogVisibleQuliEdit = false;
this.$message.success("成功"); that.$message.success("成功");
} }
}); });
} else { } else {
debugger; debugger;
console.log(obj) console.log(obj);
createQuali(obj).then((res) => { createQuali(obj).then((res) => {
if (res.code >= 200) { if (res.code >= 200 && res.code < 400) {
this.getTableList(); that.getList();
this.dialogVisible = false; that.dialogVisible = false;
this.$message.success("成功"); that.$message.success("成功");
} }
}); });
} }
@ -845,14 +839,15 @@
}, },
//提交服务更新 //提交服务更新
async confirmAbility(form) { async confirmAbility(form) {
this.$refs[form].validate((valid) => { let that = this;
that.$refs[form].validate((valid) => {
if (valid) { if (valid) {
this.abilityForm.qtask = this.qtask; that.abilityForm.qtask = that.qtask;
createAbility(this.abilityForm).then((res) => { createAbility(that.abilityForm).then((res) => {
if (res.code >= 200) { if (res.code >= 200 && res.code < 400) {
this.getTableList(); that.getList();
this.dialogVisibleAbility = false; that.dialogVisibleAbility = false;
this.$message.success("成功"); that.$message.success("成功");
} }
}); });
} else { } else {
@ -861,12 +856,16 @@
}); });
}, },
//删除操作 //删除操作
handleDelete(id){ handleDelete(id) {
this.$confirm("确认删除该操作吗?", "提示") let that = this;
that.$confirm("确认删除该操作吗?", "提示")
.then(async () => { .then(async () => {
await qactionDelete(id); await qactionDelete(id).then(res => {
location.reload(); if (res.code >= 200 && res.code < 400) {
this.$message.success("成功"); that.getList();
that.$message.success("成功");
}
});
}) })
.catch((err) => { .catch((err) => {
console.error(err); console.error(err);

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-card> <el-card class="filterTop">
<el-input <el-input
v-model="pageForm.search" v-model="pageForm.search"
placeholder="任务名" placeholder="任务名"
@ -41,7 +41,7 @@
fit fit
stripe stripe
highlight-current-row highlight-current-row
max-height="600" :height="tableHeight"
> >
<el-table-column type="index" width="50"/> <el-table-column type="index" width="50"/>
<el-table-column label="任务名称" prop="name"></el-table-column> <el-table-column label="任务名称" prop="name"></el-table-column>
@ -65,12 +65,12 @@
size="small" size="small"
@click="handleClick(scope)" @click="handleClick(scope)"
>执行</el-link> >执行</el-link>
<el-link <!-- <el-link
v-if="scope.row.state==='待发布'" v-if="scope.row.state==='待发布'"
type="primary" type="primary"
size="small" size="small"
@click="handleEdit(scope)" @click="handleEdit(scope)"
>编辑</el-link> >编辑</el-link>-->
<el-link <el-link
v-if="scope.row.state==='待发布'" v-if="scope.row.state==='待发布'"
type="warning" type="warning"
@ -173,9 +173,13 @@
}, },
filterOrgText: "", filterOrgText: "",
treeLoding: false, treeLoding: false,
tableHeight: null,
} }
}, },
mounted(){ mounted(){
let height1 = document.getElementsByClassName('app-main')[0].clientHeight;
let height2 = document.getElementsByClassName('filterTop')[0].clientHeight;
this.tableHeight = height1-height2-70;
this.getOrgsList(); this.getOrgsList();
this.getQtaskList(); this.getQtaskList();
}, },

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-card> <el-card class="filterTop">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span>任务详情</span> <span>任务详情</span>
</div> </div>
@ -65,7 +65,7 @@
fit fit
stripe stripe
highlight-current-row highlight-current-row
height="300px" :height="tableHeight"
@row-click="clickRow" @row-click="clickRow"
> >
<el-table-column label="序号" type="index" align="center" width="55"/> <el-table-column label="序号" type="index" align="center" width="55"/>
@ -149,7 +149,7 @@
fit fit
stripe stripe
highlight-current-row highlight-current-row
height="300px" :height="tableHeight"
style="margin-top:2px" style="margin-top:2px"
@selection-change="handleSelectRecords" @selection-change="handleSelectRecords"
> >
@ -169,18 +169,13 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作人"> <el-table-column label="操作人">
<template slot-scope="scope">{{ scope.row.content_name }}</template> <template slot-scope="scope">
<span v-if=" scope.row.create_by_">{{ scope.row.create_by_.name }}</span>
</template>
</el-table-column> </el-table-column>
<el-table-column label="操作时间"> <el-table-column label="操作时间">
<template slot-scope="scope">{{ scope.row.update_time }}</template> <template slot-scope="scope">{{ scope.row.update_time }}</template>
</el-table-column> </el-table-column>
<el-table-column label="改动内容">
<template slot-scope="scope">
<span v-if="scope.row.value2.name">{{ scope.row.value2.name}}</span>
<span v-else>{{ scope.row.value2}}</span>
</template>
</el-table-column>
<el-table-column label="文件"> <el-table-column label="文件">
<template slot-scope="scope"> <template slot-scope="scope">
<el-link v-if="scope.row.file" :href="scope.row.file" target="_blank" type="primary"> <el-link v-if="scope.row.file" :href="scope.row.file" target="_blank" type="primary">
@ -225,12 +220,13 @@
size="40%" size="40%"
> >
<div <div
v-if="data.action==='service:update'" v-if="showData.type==='service:update'"
style="padding: 10px 20px;position: relative" style="padding: 10px 20px;position: relative"
> >
<p style="font-size: 20px;font-weight: bold;">更新服务</p> <p style="font-size: 20px;font-weight: bold;">更新服务</p>
<p><span style="display: inline-block;width: 100px;font-weight: bold;">原始内容</span>{{data.value1}}</p> <p><span style="display: inline-block;width: 100px;font-weight: bold;">原始内容</span>{{showData.data.value1}}</p>
<p><span style="display: inline-block;width: 100px;font-weight: bold;">更新内容</span>{{data.value2}}</p> <p><span style="display: inline-block;width: 100px;font-weight: bold;">更新内容</span>{{showData.data.value2}}</p>
<el-divider></el-divider>
<el-button <el-button
v-if="actionType==='confirm'" v-if="actionType==='confirm'"
style="position: absolute;right:40px;margin-top: 20px" style="position: absolute;right:40px;margin-top: 20px"
@ -241,14 +237,15 @@
</el-button> </el-button>
</div> </div>
<div <div
v-if="data.action==='ablity:create'" v-if="showData.type==='ablity:create'"
style="padding: 10px 20px;position: relative" style="padding: 10px 20px;position: relative"
> >
<p style="font-size: 20px;font-weight: bold;">新增能力</p> <p style="font-size: 20px;font-weight: bold;">新增能力</p>
<p><span style="display: inline-block;width: 100px;font-weight: bold;">能力类型 </span>{{data.afield_name}}</p> <p><span style="display: inline-block;width: 100px;font-weight: bold;">能力类型 </span>{{showData.data.afield_name}}</p>
<p><span style="display: inline-block;width: 100px;font-weight: bold;">能力领域</span>{{data.afield_name}}</p> <p><span style="display: inline-block;width: 100px;font-weight: bold;">能力领域</span>{{showData.data.afield_name}}</p>
<p><span style="display: inline-block;width: 100px;font-weight: bold;">上传文件</span>{{data.file}}</p> <p><span style="display: inline-block;width: 100px;font-weight: bold;">上传文件</span>{{showData.data.file}}</p>
<el-link :href="data.file" target="_blank" type="primary">{{data.file}}</el-link> <el-link :href="showData.data.file" target="_blank" type="primary">{{showData.data.file}}</el-link>
<el-divider></el-divider>
<el-button <el-button
v-if="actionType==='confirm'" v-if="actionType==='confirm'"
style="position: absolute;right:40px;margin-top: 20px" style="position: absolute;right:40px;margin-top: 20px"
@ -265,9 +262,10 @@
@handleDo="handleDo" @handleDo="handleDo"
></quliShow> ></quliShow>
<quliShow <quliShow
v-if="drawer&&showData.type==='quli:update'" v-if="drawer&&showData.type==='quali:update'"
ref="quliShow" ref="quliShow"
:showData="showData" :showData="showData"
:fieldList2="fieldList2"
@handleDo="handleDo" @handleDo="handleDo"
></quliShow> ></quliShow>
</el-drawer> </el-drawer>
@ -318,22 +316,29 @@
qtask: {}, qtask: {},
detailItem: {}, detailItem: {},
actionType: null, actionType: null,
tableHeight: null,
fieldList2: [],
}; };
}, },
created() { created() {
this.qtaskId = sessionStorage.getItem('qtaskId'); this.qtaskId = sessionStorage.getItem('qtaskId');
}, },
mounted() { mounted() {
debugger; let height1 = document.getElementsByClassName('app-main')[0].clientHeight;
let height2 = document.getElementsByClassName('filterTop')[0].clientHeight;
let computedHeight = height1-height2;
this.tableHeight = computedHeight/2-54;
this.qtaskId = sessionStorage.getItem('qtaskId'); this.qtaskId = sessionStorage.getItem('qtaskId');
this.getQtaskDept(); this.getQtaskDept();
}, },
methods: { methods: {
checkPermission, checkPermission,
getQtaskDept() { getQtaskDept() {
debugger;
qtaskDetail({qtask: this.qtaskId}).then((res) => { qtaskDetail({qtask: this.qtaskId}).then((res) => {
debugger;
this.qtaskDepts = res.data.results; this.qtaskDepts = res.data.results;
this.qtask = res.data.results[0].qtask_; this.qtask = res.data.results[0].qtask_;
}); });
@ -351,28 +356,31 @@
}, },
//操作处理 //操作处理
handleRecord(type, item) { handleRecord(type, item) {
debugger; this.showData.id = item.id;
if (item.action === 'quali:update' || item.action === 'quali:create') { this.showData.type = item.action;
this.data = item; this.showData.action = type;
this.showData.data = item; this.actionType = type;
this.showData.type = item.action; this.fieldList2 =[];
this.showData.action = type; qactionItem(item.id).then(res=>{
} else { if (res.code>=200) {
this.data = item; let updateDetail = res.data.update_detail;//更改字段
this.actionType = type; updateDetail.forEach(item=>{
} this.fieldList2.push(item.field);//所有字段
this.drawer = true; })
qactionItem(item.id).then(res => { this.drawer = true;
debugger; }
console.log(res) console.log(this.fieldList2)
}) })
}, },
handleDelete(id) { handleDelete(id) {
this.$confirm("确认删除该操作吗?", "提示") this.$confirm("确认删除该操作吗?", "提示")
.then(async () => { .then(async () => {
await qactionDelete(id); await qactionDelete(id).then(res=>{
location.reload(); if(res.code>=200&&res.code<400){
this.$message.success("成功"); this.getQactionList();
this.$message.success("成功");
}
});
}) })
.catch((err) => { .catch((err) => {
console.error(err); console.error(err);
@ -381,15 +389,14 @@
//操作确认 //操作确认
confirmClick() { confirmClick() {
qactionConfirm(this.data.id).then(res => { qactionConfirm(this.data.id).then(res => {
debugger; if (res.code>=200) {
console.log(res)
if (res.code === 200) {
this.drawer = false; this.drawer = false;
this.getQactionList(); this.getQactionList();
} }
}) })
}, },
handleDo(data) { handleDo(data) {
console.log(data);
this.drawer = data; this.drawer = data;
this.getQactionList(); this.getQactionList();
}, },

View File

@ -1,44 +1,120 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<div class="ma">资质报送详情</div> <p v-if="showData.type==='quali:create'" style="font-size: 20px;font-weight: bold;">新增资质</p>
<el-form label-width="100px" label-position="left"> <p v-if="showData.type==='quali:update'" style="font-size: 20px;font-weight: bold;">编辑资质</p>
<el-form
v-if="showData.type==='quali:create'"
label-width="100px"
label-position="left"
>
<el-form-item label="资质名称"> <el-form-item label="资质名称">
{{ data.value2.name }} {{ data.name }}
</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>
<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>
<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>
<el-form-item label="资质范围"> <el-form-item label="资质范围">
{{data.value2.scope}} {{data.scope}}
</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>
<el-form-item label="备案城市" v-if="data.type==='OTHER'"> <el-form-item label="备案城市" v-if="data.type==='OTHER'">
{{ data.value2.name }} <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'">
<el-form
label-width="100px"
label-position="left"
>
<el-form-item label="资质名称">
{{ formData.name }}
</el-form-item>
<el-form-item label="资质类型">
{{ formData.type }}
</el-form-item>
<el-form-item label="资质等级" v-if="formData.type!=='OTHER'">
<span v-if="formData.grade===10">国家级</span>
<span v-if="formData.grade===20">省级</span>
<span v-if="formData.grade===30">市级</span>
</el-form-item>
<el-form-item label="二级等级" v-if="formData.type==='OTHER'">
{{ formData.level }}
</el-form-item>
<el-form-item label="资质范围">
{{formData.scope}}
</el-form-item>
<el-form-item label="描述">
{{formData.description}}
</el-form-item>
<el-form-item label="备案城市" v-if="formData.type==='OTHER'">
<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 }}
</el-form-item>
<el-form-item label="所在市" v-if="formData.grade===30">
{{ formData.city_name }}
</el-form-item>
</el-form>
<el-divider></el-divider>
<el-form
label-width="100px"
label-position="left"
>
<el-form-item label="资质名称">
<span :class="setClass('name')"> {{ formData2.name }}</span>
</el-form-item>
<el-form-item label="资质类型">
<span :class="setClass('type')"> {{ formData2.type }}</span>
</el-form-item>
<el-form-item label="资质等级" v-if="formData2.type!=='OTHER'">
<span v-if="formData2.grade===10" :class="setClass('grade')">国家级</span>
<span v-if="formData2.grade===20" :class="setClass('grade')">省级</span>
<span v-if="formData2.grade===30" :class="setClass('grade')">市级</span>
</el-form-item>
<el-form-item label="二级等级" v-if="formData2.type==='OTHER'">
<span :class="setClass('level')"> {{ formData2.level }}</span>
</el-form-item>
<el-form-item label="资质范围">
<span :class="setClass('scope')"> {{ formData2.scope }}</span>
</el-form-item>
<el-form-item label="描述">
<span :class="setClass('description')"> {{ formData2.description }}</span>
</el-form-item>
<el-form-item label="备案城市" v-if="formData2.type==='OTHER'">
<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>
</el-form-item>
<el-form-item label="所在市" v-if="formData.grade===30">
<span :class="setClass('city')"> {{ formData2.city_name }}</span>
</el-form-item>
</el-form>
</div>
<el-divider></el-divider> <el-divider></el-divider>
<div style="text-align: right"> <div style="text-align: right">
<el-button <el-button
v-if="this.showData.action == 'confirm'" v-if="action === 'confirm'"
@click="confirm()" @click="confirm()"
type="primary" type="primary"
> >
@ -50,31 +126,73 @@
<script> <script>
import {upUrl, upHeaders} from "@/api/file"; import {upUrl, upHeaders} from "@/api/file";
import {qactionConfirm} from "@/api/ability"; import {qactionConfirm,qactionItem,getQualityItem,provinceLists,cityLists} from "@/api/ability";
export default { export default {
name: "quliShow", name: "quliShow",
props: ["showData"], props:{
showData:{
type:Object,
require:true //属性必要性true表示属性必须进行传递
},
fieldList2:{
type:Array,
default:[]
}
},
data() { data() {
return { return {
data: null, data: null,
action: null,
fileList: [], fileList: [],
formData: null,
formData2: null,
updateDetail: [],
fieldList: [],
}; };
}, },
created() { mounted() {
this.initRecord(); this.initRecord();
}, },
methods: { methods: {
setClass(item){
let obj = {};
if(this.fieldList2.indexOf(item)>-1){
obj = 'redFont';
}
return obj;
},
initRecord() { initRecord() {
debugger; // debugger;
console.log(this.showData); //操作类型查看/确认
this.data = Object.assign({}, this.showData.data); let that = this;
that.action = that.showData.action;
let type = that.showData.type;
qactionItem(that.showData.id).then(res=>{
if (res.code>=200) {
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;
}
});
}
}
})
}, },
confirm() { confirm() {
qactionConfirm(this.data.id).then(res => { qactionConfirm(this.data.id).then(res => {
if (res.code === 200) { if (res.code>=200) {
this.drawer = false; this.$emit("handleDo", false);
this.$emit("handleDo", true);
} }
}) })
}, },
@ -97,4 +215,7 @@
cursor: pointer; cursor: pointer;
color: #409eff; color: #409eff;
} }
.redFont{
color: red;
}
</style> </style>

View File

@ -1,9 +1,30 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-card> <el-card class="filterTop">
<el-button type="primary" icon="el-icon-plus" @click="handleAddVideo" <el-button type="primary" icon="el-icon-plus" @click="handleAddVideo"
>新增</el-button >新增</el-button
> >
<el-input
v-model="listQuery.search"
placeholder="关键字"
style="width: 300px"
class="filter-item"
@keyup.enter.native="handleFilter"
/>
<el-button
class="filter-item"
type="primary"
icon="el-icon-search"
@click="handleFilter"
>搜索</el-button
>
<el-button
class="filter-item"
type="primary"
icon="el-icon-refresh-left"
@click="resetFilter"
>重置</el-button
>
</el-card> </el-card>
<el-card style="margin-top: 10px"> <el-card style="margin-top: 10px">
<el-table <el-table
@ -20,7 +41,7 @@
fit fit
stripe stripe
highlight-current-row highlight-current-row
max-height="600" :height="tableHeight"
> >
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column label="名称" prop="name"></el-table-column> <el-table-column label="名称" prop="name"></el-table-column>
@ -36,13 +57,6 @@
width="200px" width="200px"
fixed="right" fixed="right"
> >
<template slot="header" slot-scope="scope">
<el-input
v-model="search"
size="mini"
placeholder="输入关键字搜索"
/>
</template>
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
:disabled="!checkPermission(['video_update'])" :disabled="!checkPermission(['video_update'])"
@ -224,6 +238,7 @@ export default {
data() { data() {
return { return {
tableHeight:null,
dialogVisible: false, dialogVisible: false,
signature: "", signature: "",
treeLoding: false, treeLoding: false,
@ -235,6 +250,7 @@ export default {
listQuery: { listQuery: {
page: 1, page: 1,
page_size: 20, page_size: 20,
search:''
}, },
search: "", search: "",
VideoContent: defaultVideo, VideoContent: defaultVideo,
@ -256,7 +272,9 @@ export default {
}, },
computed: {}, computed: {},
created() { mounted() {
let height1 = document.getElementsByClassName('app-main')[0].clientHeight;
this.tableHeight = height1-120;
this.getList(); this.getList();
this.getTypeAll(); this.getTypeAll();
}, },
@ -287,7 +305,13 @@ export default {
console.log(row) console.log(row)
return row.category === value; return row.category === value;
}, },
handleFilter(){
this.getList();
},
resetFilter(){
this.listQuery.search = '';
this.getList();
},
/*弹出弹窗 */ /*弹出弹窗 */
handleAddVideo() { handleAddVideo() {
this.VideoContent = Object.assign({}, defaultVideo); this.VideoContent = Object.assign({}, defaultVideo);