This commit is contained in:
shijing 2022-06-07 13:10:49 +08:00
parent 1bcdff9146
commit 11b57c4c10
3 changed files with 204 additions and 30 deletions

View File

@ -184,6 +184,14 @@ export function createAbility(data) {
data,
})
}
//能力无新增
export function abilityNoChange(data) {
return request({
url:`/ability/qaction/ability_nochange/`,
method:'post',
data,
})
}
//新增资质
export function createQuali(data) {
return request({
@ -192,6 +200,13 @@ export function createQuali(data) {
data,
})
}
export function qualiNoChange(data) {
return request({
url:`/ability/qaction/quali_nochange/`,
method:'post',
data,
})
}
//修改资质
export function updateQuali(data) {
return request({

View File

@ -86,6 +86,14 @@
>
新增资质
</el-button>
<el-button
v-if="buttonsShow&&checkPermission(['qaction_create'])"
type="primary"
style="float: right"
@click="noChange('1')"
>
资质无新增
</el-button>
<el-button
v-if="buttonsShow&&checkPermission(['qaction_create'])"
type="primary"
@ -94,6 +102,14 @@
>
新增能力
</el-button>
<el-button
v-if="buttonsShow&&checkPermission(['qaction_create'])"
type="primary"
style="float: right"
@click="noChange('2')"
>
能力无新增
</el-button>
</div>
<el-table
style="margin-top: 6px"
@ -116,6 +132,8 @@
<span v-else-if="scope.row.action==='service:update'">更新服务</span>
<span v-else-if="scope.row.action==='quali:update'">更新资质</span>
<span v-else-if="scope.row.action==='quali:create'">新增资质</span>
<span v-else-if="scope.row.action==='ability:nochange'">能力无新增</span>
<span v-else-if="scope.row.action==='quali:nochange'">资质无新增</span>
</template>
</el-table-column>
<el-table-column label="确认情况">
@ -129,9 +147,11 @@
<el-link v-if="scope.row.file_" :href="scope.row.file_.file" target="_blank" type="primary">
{{scope.row.file_.name}}
</el-link>
<el-link v-if="scope.row.value1" :href="scope.row.value1.file_" target="_blank" type="primary">
<span v-if="scope.row.value1.file_"> {{scope.row.value1.file_.name}}</span>
</el-link>
<span v-if="scope.row.value1">
<el-link v-if="scope.row.value1.file_" :href="scope.row.value1.file_.file" target="_blank" type="primary">
{{scope.row.value1.file_.name}}
</el-link>
</span>
</template>
</el-table-column>
<el-table-column label="操作人">
@ -149,12 +169,12 @@
fixed="right"
>
<template slot-scope="scope">
<!-- <el-link
<el-link
type="primary"
size="small"
@click="handleDetail( scope.row.id )"
@click="handleDetail( 'view',scope.row )"
>操作记录
</el-link>-->
</el-link>
<el-link
v-if="!scope.row.confirmed"
type="danger"
@ -172,19 +192,6 @@
:limit.sync="listQuery.page_size"
@pagination="getList"
/>
<!-- <el-drawer
title="记录"
:visible.sync="drawer"
:with-header="false"
size="40%"
>
<recorddo
ref="recorddo"
:data="data"
@handleDo="handleDo"
v-if="drawer"
></recorddo>
</el-drawer>-->
</el-card>
<el-dialog
:visible.sync="dialogVisibleAbility"
@ -592,6 +599,90 @@
</div>
</el-dialog>
<el-drawer
title="记录"
:visible.sync="drawer"
:with-header="false"
size="40%"
>
<div
v-if="showData.type==='service:update'"
style="padding: 10px 20px;position: relative"
>
<p style="font-size: 20px;font-weight: bold;">更新服务</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>{{showData.data.value2}}</p>
<el-divider></el-divider>
<el-button
v-if="actionType==='confirm'"
style="position: absolute;right:40px;margin-top: 20px"
type="primary"
@click="confirmClick"
>
确认
</el-button>
</div>
<div
v-if="showData.type==='quali:nochange'"
style="padding: 10px 20px;position: relative"
>
<p style="font-size: 20px;font-weight: bold;">资质无新增</p>
<el-button
v-if="actionType==='confirm'"
style="position: absolute;right:40px;margin-top: 20px"
type="primary"
@click="confirmClick"
>
确认
</el-button>
</div>
<div
v-if="showData.type==='ability:nochange'"
style="padding: 10px 20px;position: relative"
>
<p style="font-size: 20px;font-weight: bold;">能力无新增</p>
<el-button
v-if="actionType==='confirm'"
style="position: absolute;right:40px;margin-top: 20px"
type="primary"
@click="confirmClick"
>
确认
</el-button>
</div>
<div
v-if="showData.type==='ablity:create'"
style="padding: 10px 20px;position: relative"
>
<p style="font-size: 20px;font-weight: bold;">新增能力</p>
<p><span style="display: inline-block;width: 100px;font-weight: bold;">能力类型 </span>{{showData.data.atype_name}}</p>
<p><span style="display: inline-block;width: 100px;font-weight: bold;">能力领域</span>{{showData.data.afield_name}}</p>
<p v-if="showData.data.file_"><span style="display: inline-block;width: 100px;font-weight: bold;">上传文件</span>{{showData.data.file_.name}}</p>
<el-link v-if="showData.data.file_" :href="showData.data.file_.file" target="_blank" type="primary">{{showData.data.file_.name}}</el-link>
<el-divider></el-divider>
<el-button
v-if="actionType==='confirm'"
style="position: absolute;right:40px;margin-top: 20px"
type="primary"
@click="confirmClick"
>
确认
</el-button>
</div>
<quliShow
v-if="drawer&&showData.type==='quali:create'"
ref="quliShow"
:showData="showData"
@handleDo="handleDo"
></quliShow>
<quliShow
v-if="drawer&&showData.type==='quali:update'"
ref="quliShow"
:showData="showData"
:fieldList2="fieldList2"
@handleDo="handleDo"
></quliShow>
</el-drawer>
<!--<el-drawer
title="操作记录"
:visible.sync="drawer"
:with-header="false"
@ -612,7 +703,7 @@
<el-table-column label="更改值" prop="value2">
</el-table-column>
</el-table>
</el-drawer>
</el-drawer>-->
</div>
</template>
@ -629,7 +720,9 @@
updateService,
provinceLists,
cityLists,
qactionItem
qactionItem,
qualiNoChange,
abilityNoChange
} from "@/api/ability";
import {getDictList} from "@/api/dict";
import {genTree} from "@/utils";
@ -638,11 +731,12 @@
import checkPermission from "@/utils/permission";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
import Treeselect from "@riophae/vue-treeselect";
import quliShow from "@/views/ability/quliShow";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import {upUrl, upHeaders} from "@/api/file";
export default {
components: {Pagination, Treeselect},
components: {Pagination, Treeselect,quliShow},
name: "mQualityTask",
data() {
return {
@ -660,6 +754,7 @@
page_size: 10,
task: null,
},
showData:{},
quliList: [],
orgData: [],
fileList: [],
@ -725,12 +820,16 @@
'CNAS',
'OTHER'
],
fieldList2: [],
atypeOptions: [],
afieldOptions: [],//领域
gradeOptions: [
{id: 10, name: '国家级'}, {id: 20, name: '省级'}, {id: 30, name: '市级'}
],//等级
qtaskName: "",
atype_name: "",
afield_name: "",
actionType: "",
filterOrgText: "",
treeLoding: false,
buttonsShow: false,
@ -753,6 +852,15 @@
},
methods: {
noChange(index){
if(index==='1'){//资质无新增
qualiNoChange({qtask:this.qtask}).then(res=>{
})
}else{//能力无新增
abilityNoChange({qtask:this.qtask}).then(res=>{
})
}
},
getOptions() {
getDictList({type__code: "field_type", is_used: true}).then((res) => {
this.afieldOptions = genTree(res.data);
@ -812,6 +920,9 @@
if (response.data) {
debugger;
this.taskList = response.data;
this.buttonsShow = false;
this.qtaskName = '';
this.recordList={count: 0,};
}
this.listLoading = false;
});
@ -991,13 +1102,29 @@
}
});
},
/* handleDetail(id){
handleDetail(type,item){
let that = this;
that.drawer = true;
qactionItem(id).then(res=>{
that.recordData = res.data.update_detail;
this.showData.id = item.id;
this.showData.data = item;
this.showData.type = item.action;
this.showData.action = type;
this.actionType = type;
this.fieldList2 =[];
if(item.action==='ablity:create'||item.action==='service:update'){
}else{
qactionItem(item.id).then(res=>{
if (res.code>=200) {
let updateDetail = res.data.update_detail;//更改字段
updateDetail.forEach(item=>{
this.fieldList2.push(item.field);//所有字段
});
this.drawer = true;
}
console.log(this.fieldList2)
})
},*/
}
},
//删除操作
handleDelete(id) {
let that = this;

View File

@ -160,6 +160,8 @@
<span v-else-if="scope.row.action==='service:update'">更新服务</span>
<span v-else-if="scope.row.action==='quali:update'">更新资质</span>
<span v-else-if="scope.row.action==='quali:create'">新增资质</span>
<span v-else-if="scope.row.action==='ability:nochange'">能力无新增</span>
<span v-else-if="scope.row.action==='quali:nochange'">资质无新增</span>
</template>
</el-table-column>
<el-table-column label="确认情况">
@ -181,9 +183,11 @@
<el-link v-if="scope.row.file_" :href="scope.row.file_.file" target="_blank" type="primary">
{{scope.row.file_.name}}
</el-link>
<el-link v-if="scope.row.value1" :href="scope.row.value1.file_" target="_blank" type="primary">
<span v-if="scope.row.value1.file_"> {{scope.row.value1.file_.name}}</span>
</el-link>
<span v-if="scope.row.value1">
<el-link v-if="scope.row.value1.file_" :href="scope.row.value1.file_.file" target="_blank" type="primary">
{{scope.row.value1.file_.name}}
</el-link>
</span>
</template>
</el-table-column>
<el-table-column
@ -222,6 +226,34 @@
:with-header="false"
size="40%"
>
<div
v-if="showData.type==='quali:nochange'"
style="padding: 10px 20px;position: relative"
>
<p style="font-size: 20px;font-weight: bold;">资质无新增</p>
<el-button
v-if="actionType==='confirm'"
style="position: absolute;right:40px;margin-top: 20px"
type="primary"
@click="confirmClick"
>
确认
</el-button>
</div>
<div
v-if="showData.type==='ability:nochange'"
style="padding: 10px 20px;position: relative"
>
<p style="font-size: 20px;font-weight: bold;">能力无新增</p>
<el-button
v-if="actionType==='confirm'"
style="position: absolute;right:40px;margin-top: 20px"
type="primary"
@click="confirmClick"
>
确认
</el-button>
</div>
<div
v-if="showData.type==='service:update'"
style="padding: 10px 20px;position: relative"
@ -424,7 +456,7 @@
},
//操作确认
confirmClick() {
qactionConfirm(this.data.id).then(res => {
qactionConfirm(this.showData.id).then(res => {
if (res.code>=200) {
this.drawer = false;
this.getQactionList();