1102的两个问题

This commit is contained in:
shijing 2022-11-03 13:25:38 +08:00
parent c8268bbc26
commit 896413c933
4 changed files with 128 additions and 34 deletions

View File

@ -7,7 +7,8 @@ const getDefaultState = () => {
token: getToken(), token: getToken(),
name: '', name: '',
avatar: '', avatar: '',
perms: [] perms: [],
dept:''
} }
} }

View File

@ -682,8 +682,13 @@
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>{{showData.data.atype_name}}</p> <p><span class="drawerInfoTitle">能力类型 </span>{{showData.data.atype_name}}</p>
<p><span style="display: inline-block;width: 100px;font-weight: bold;">能力领域</span>{{showData.data.afield_name}}</p> <p><span class="drawerInfoTitle">能力领域</span>{{showData.data.afield_name}}</p>
<p><span class="drawerInfoTitle">对象数量</span>{{showData.data.num}}</p>
<p><span class="drawerInfoTitle">参数数量</span>{{showData.data.num2}}</p>
<p><span class="drawerInfoTitle">方法标准数量</span>{{showData.data.num3}}</p>
<p><span class="drawerInfoTitle">产品标准数量</span>{{showData.data.num4}}</p>
<p v-if="showData.data.file_"><span style="display: inline-block;width: 100px;font-weight: bold;">上传文件</span>{{showData.data.file_.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-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-divider></el-divider>
@ -716,8 +721,9 @@
<script> <script>
import { import {
getQtaskMy, getQtaskMy,
qtaskDetail,
getQtask, getQtask,
qactionMy, qactionList,
getQualityMy, getQualityMy,
createQuali, createQuali,
qactionDelete, qactionDelete,
@ -732,7 +738,7 @@
} from "@/api/ability"; } 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, getSubOrgList} from "@/api/org";
import {getCMAGroup} from "@/api/cma"; import {getCMAGroup} from "@/api/cma";
import checkPermission from "@/utils/permission"; import checkPermission from "@/utils/permission";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
@ -854,6 +860,9 @@
this.afieldOptions = []; this.afieldOptions = [];
this.getOptions(); this.getOptions();
this.getProvince(); this.getProvince();
// debugger;
console.log(this.$store.state.user.dept);
this.pageForm.org = this.$store.state.user.dept;
}, },
methods: { methods: {
@ -943,8 +952,9 @@
}, },
checkPermission, checkPermission,
getTableList() { getTableList() {
this.listLoading = true; this.listLoading = true;getQtaskMy
getQtaskMy(this.pageForm).then((response) => { getQtaskMy(this.pageForm).then((response) => {
// qtaskDetail(this.pageForm).then((response) => {
if (response.data) { if (response.data) {
debugger; debugger;
this.taskList = response.data; this.taskList = response.data;
@ -956,9 +966,15 @@
}); });
}, },
getGroup() { getGroup() {
if (this.checkPermission(["record_confirm"])) {
getOrgList({ can_supervision: true }).then((res) => { getOrgList({ can_supervision: true }).then((res) => {
this.orgData = res.data; this.orgData = res.data;
}); });
} else {
getSubOrgList().then((res) => {
this.orgData = res.data;
});
}
}, },
getrecordlist() { getrecordlist() {
this.getTableList(); this.getTableList();
@ -970,16 +986,18 @@
this.checkedItem = obj; this.checkedItem = obj;
this.qtask = obj.qtask; this.qtask = obj.qtask;
this.qtaskName = obj.qtask_.name; this.qtaskName = obj.qtask_.name;
if(obj.org== this.$store.state.user.dept){
this.buttonsShow = true; this.buttonsShow = true;
}else{
this.buttonsShow = false;
}
this.listQuery.qtask = obj.qtask; this.listQuery.qtask = obj.qtask;
qactionMy(this.listQuery).then((res) => { qactionList(this.listQuery).then((res) => {
this.recordList = res.data; this.recordList = res.data;
}) })
}, },
///////
getList() { getList() {
qactionMy(this.listQuery).then((res) => { qactionList(this.listQuery).then((res) => {
this.recordList = res.data; this.recordList = res.data;
}) })
}, },
@ -1134,6 +1152,9 @@
}); });
}, },
handleDetail(type,item){ handleDetail(type,item){
debugger;
console.log(type)
console.log(item)
let that = this; let that = this;
that.drawer = true; that.drawer = true;
this.showData.id = item.id; this.showData.id = item.id;
@ -1148,7 +1169,9 @@
if (res.code>=200) { if (res.code>=200) {
let updateDetail = res.data.update_detail;//更改字段 let updateDetail = res.data.update_detail;//更改字段
updateDetail.forEach(item=>{ updateDetail.forEach(item=>{
// debugger;
this.fieldList2.push(item.field);//所有字段 this.fieldList2.push(item.field);//所有字段
debugger;
}); });
this.drawer = true; this.drawer = true;
} }
@ -1177,5 +1200,9 @@
</script> </script>
<style scoped> <style scoped>
.drawerInfoTitle{
display: inline-block;
width: 120px;
font-weight: bold;
}
</style> </style>

View File

@ -481,7 +481,7 @@
clickRow(row, col, e) { clickRow(row, col, e) {
this.listLoading2 = true; this.listLoading2 = true;
this.detailItem = row; this.detailItem = row;
this.listQuery = {pageoff: true, qtask: row.qtask, belong_dept: row.dept}; this.listQuery = {pageoff: true, qtask: row.qtask, belong_dept: row.org};
this.getQactionList(); this.getQactionList();
}, },
handleSelectRecords(val) { handleSelectRecords(val) {

View File

@ -60,7 +60,6 @@
highlight-current-row highlight-current-row
max-height="600" max-height="600"
@sort-change="changeTableSort" @sort-change="changeTableSort"
:span-method="objectSpanMethod"
> >
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
@ -116,7 +115,7 @@
<template slot-scope="scope" v-if="scope.row.files"> <template slot-scope="scope" v-if="scope.row.files">
<el-link <el-link
v-if="scope.row.files.length > 1" v-if="scope.row.files.length > 1"
@click="handleRecord({ action: 'view', record: scope.row })" @click="handleRecord(scope.row)"
> >
<span style="color: red">{{ scope.row.files.length }}</span> <span style="color: red">{{ scope.row.files.length }}</span>
个文件</el-link 个文件</el-link
@ -138,33 +137,56 @@
@pagination="getList" @pagination="getList"
/> />
</el-card> </el-card>
<el-drawer
:visible.sync="drawerLiminted"
:with-header="false"
size="40%">
<div class="drawerTitle">资质能力报送记录</div>
<el-form class="drawerBody" v-if="record.content_">
<el-form-item label="材料名称">
{{ record.content_.name }}
</el-form-item>
<el-form-item label="材料详情" v-if="record.content_">
{{ record.content_.desc }}
</el-form-item>
<el-form-item label="报送状态">
{{ record.state }}
<el-tag v-if="record.is_self" style="margin-left: 2px" effect="plain">主动报送</el-tag>
</el-form-item>
<el-form-item label="所属任务" v-if="record.task_">
{{ record.task_.name }}/{{ record.task_.end_date }}
</el-form-item>
<el-form-item label="执行组织" v-if="record.belong_dept_">
{{ record.belong_dept_.name }}
</el-form-item>
<el-form-item label="报送人" v-if="record.up_user_">
{{ record.up_user_.name }}/{{ record.up_date }}
</el-form-item>
<el-form-item label="文件列表">
</el-form-item>
<div
class="recordfiles"
v-for="(item, index) in record.files_"
v-bind:key="item.id"
>
<el-link :href="item.path" target="_blank" type="primary">{{
item.name
}}</el-link>
</div>
</el-form>
</el-drawer>
</div> </div>
</template> </template>
<style lang="scss">
.el-transfer-panel {
width: 470px;
}
.el-transfer__buttons {
padding: 0 2px;
.el-button {
display: block;
}
}
</style>
<script> <script>
import { getOrgList, getSubOrgList } from "@/api/org"; import { getOrgList, getSubOrgList } from "@/api/org";
import { getRecordList } from "@/api/ability"; import { getRecordList } from "@/api/ability";
import checkPermission from "@/utils/permission"; import checkPermission from "@/utils/permission";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
const defaultrecord = {
name: "",
};
export default { export default {
components: { Pagination}, components: { Pagination},
data() { data() {
return { return {
record: defaultrecord, record: {},
recordList: { recordList: {
count: 0, count: 0,
}, },
@ -215,7 +237,9 @@ export default {
}, },
listLoading: false, listLoading: false,
dialogVisible: false, dialogVisible: false,
drawerLiminted:false,
dialogType: "new", dialogType: "new",
orgData:[],
rule1: { rule1: {
name: [{ required: true, message: "请输入", trigger: "blur" }], name: [{ required: true, message: "请输入", trigger: "blur" }],
}, },
@ -225,10 +249,21 @@ export default {
watch: {}, watch: {},
created() { created() {
this.getState(); this.getState();
this.getGroup();
}, },
methods: { methods: {
checkPermission, checkPermission,
getGroup() {
if (this.checkPermission(["record_confirm"])) {
getOrgList({ can_supervision: true }).then((res) => {
this.orgData = res.data;
});
} else {
getSubOrgList().then((res) => {
this.orgData = res.data;
});
}
},
getState() { getState() {
if(this.checkPermission(["record_confirm"])){ if(this.checkPermission(["record_confirm"])){
this.listQuery = { this.listQuery = {
@ -248,7 +283,14 @@ export default {
}); });
}, },
changeTableSort(val) {
if (val.order == "ascending") {
this.listQuery.ordering = val.prop;
} else {
this.listQuery.ordering = "-" + val.prop;
}
this.getList();
},
handleFilter() { handleFilter() {
this.listQuery.page = 1; this.listQuery.page = 1;
this.getList(); this.getList();
@ -261,8 +303,32 @@ export default {
}; };
this.getList(); this.getList();
}, },
handleRecord(item){
this.drawerLiminted = true;
this.record = item;
},
}, },
}; };
</script> </script>
<style lang="scss">
.el-transfer-panel {
width: 470px;
}
.el-transfer__buttons {
padding: 0 2px;
.el-button {
display: block;
}
}
.drawerTitle{
padding: 20px 0 20px 20px;
}
.drawerBody{
padding-left: 20px;
}
.recordfiles{
margin: 2px;
}
</style>