修复bug

This commit is contained in:
宋伟佳
2021-07-21 18:37:15 +08:00
parent ceb38f14df
commit 6aaa35c260
4 changed files with 133 additions and 91 deletions
@@ -1946,6 +1946,7 @@ export default {
},
// 点击查看
handlePreview (item) {
console.log(item);
let routeUrl = this.$router.resolve({
name: 'OtherStandardDetails',
params: {
@@ -6,9 +6,9 @@
<el-tab-pane label="未符合项整改数据库" name="database">
<rectification-database></rectification-database>
</el-tab-pane>
<el-tab-pane label="重点问题项管控" name="keynote">
<key-issues></key-issues>
</el-tab-pane>
<!-- <el-tab-pane label="重点问题项管控" name="keynote">-->
<!-- <key-issues></key-issues>-->
<!-- </el-tab-pane>-->
</el-tabs>
</div>
</div>
@@ -26,7 +26,7 @@
>
<el-input
slot="reference"
v-model="nonConformitySearch.responseUnitShow"
v-model="nonConformitySearch.responsibleUnitShow"
placeholder="根据责任部门查找"
readonly
clearable
@@ -349,7 +349,7 @@
</div>
<div class="typeitems">
<div class="itemsLeft">责任部门:</div>
<div class="itemsRight">{{item.responseUnitShow}}</div>
<div class="itemsRight">{{item.responsibleUnitShow}}</div>
</div>
<div class="typeitems">
<div class="itemsLeft">责任工程师:</div>
@@ -370,7 +370,7 @@
</div>
<div class="typeitems">
<div class="itemsLeft">责任部门:</div>
<div class="itemsRight">{{item.responseUnitShow}}</div>
<div class="itemsRight">{{item.responsibleUnitShow}}</div>
</div>
<div class="typeitems">
<div class="itemsLeft">责任工程师:</div>
@@ -524,6 +524,35 @@ export default {
})
}
},
// 获取组织机构数据
getOrgTreeSource () {
this.$http.get('sys/org/getTree', {}, {
_this: this
},
res => {
if (res.ok) {
let treeNode = []
res.data.map((item, index) => {
let treeItem = {}
for (let key in item) {
if (key === 'orgName') {
treeItem.name = item[key]
} else {
treeItem[key] = item[key]
}
}
treeNode[index] = treeItem
})
this.zNodesS = JSON.parse(JSON.stringify(treeNode))
this.zNodesSItem = JSON.parse(JSON.stringify(treeNode))
this.searchInlandNodes = JSON.parse(JSON.stringify(treeNode))
}
}, e => {})
},
treeClickSearch (treeId, treeNode) {
this.nonConformitySearch.responsibleUnit = treeNode.id
this.nonConformitySearch.responsibleUnitShow = treeNode.name
},
// 清空 查询条件
clearAllSearch (search = true) {
this.nonConformitySearch = {
@@ -573,12 +602,13 @@ export default {
},
// 点击查看
handlePreview (item) {
console.log(item);
let routeUrl = this.$router.resolve({
name: 'OtherStandardDetails',
params: {
//gslh3tgg7kot97ay5oz0
id: item.id,
pageType: item.standType + '_STAND'
pageType: 'FOREIGN_STAND'
// pageType: item.standType + '_STAND'
}
})
window.open(routeUrl.href, '_blank')
@@ -625,6 +655,8 @@ export default {
},
mounted () {
this.getTableByPage()
// 加载所有的部门
this.getOrgTreeSource()
}
};
</script>
@@ -9,10 +9,12 @@
<div class="search-area">
<el-form :model="standCommonlySearch" inline class="label-input-form">
<el-formItem label="类别" class="search-item">
<el-input v-model="standCommonlySearch.categorg" class="s-c-input" placeholder="标准/政策" clearable :maxlength="100"></el-input>
<el-input v-model="standCommonlySearch.categorg" class="s-c-input" placeholder="标准/政策" clearable
:maxlength="100"></el-input>
</el-formItem>
<el-formItem label="关键字" class="search-item">
<el-input v-model="standCommonlySearch.cname" class="s-c-input" placeholder="请输入关键字" clearable :maxlength="100"></el-input>
<el-input v-model="standCommonlySearch.cname" class="s-c-input" placeholder="请输入关键字" clearable
:maxlength="100"></el-input>
</el-formItem>
<el-formItem label="开始日期" class="search-item">
<el-datePicker v-model="standCommonlySearch.start" :editable="false"
@@ -28,11 +30,13 @@
size="mini"
class="common-button-primary"
@click="sarStandCompareHisInfo">查询</el-button>
@click="sarStandCompareHisInfo">查询
</el-button>
<el-button
class="common-button-default"
size="mini"
@click="clearSearchStand">清空</el-button>
@click="clearSearchStand">清空
</el-button>
</el-formItem>
</el-form>
</div>
@@ -54,7 +58,7 @@
label="标准"
align="center">
<template slot-scope="scope">
<a class="table-jump" @click.stop="handlePreview(scope.row)">{{ scope.row.category }}</a>
<a class="table-jump" @click.stop="handlePreview(scope.row)">{{ scope.row.category }}</a>
</template>
</el-table-column>
<el-table-column
@@ -79,129 +83,134 @@
</div>
</div>
</div>
<pagination :page="standCommonlySearch.page" :total="total" @pageChange="pageChange" @pageSizeChange="pageSizeChange"></pagination>
<pagination :page="standCommonlySearch.page" :total="total" @pageChange="pageChange"
@pageSizeChange="pageSizeChange"></pagination>
<loading :loading="spinShow">数据加载中</loading>
</div>
</template>
<script>
export default {
name: 'standardForComments',
components: {
},
data () {
name: "standardForComments",
components: {},
data() {
return {
standCommonlySearch: {
categorg: '',
cname: '',
start: '',
end: '',
page: 1,
size: this.$store.getters.userInfo.configContent
},
spinShow: false,
standInfoList: [],
tableHeight: null,
total: 0
}
},
props: {
},
watch: {
standCommonlySearch: {
categorg: "",
cname: "",
start: "",
end: "",
page: 1,
size: this.$store.getters.userInfo.configContent
},
spinShow: false,
standInfoList: [],
tableHeight: null,
total: 0
};
},
props: {},
watch: {},
methods: {
// 点击查看
handlePreview (item) {
this.$store.commit('setDetailMap',this.$router.path)
this.$router.push({
name: 'consultationDetails',
query: {
item: item
}
})
},
// 清空
clearSearchStand () {
this.standCommonlySearch.page = 1
this.standCommonlySearch.start = ''
this.standCommonlySearch.end = ''
this.standCommonlySearch.categorg = ''
this.standCommonlySearch.cname = ''
this.sarStandCompareHis()
// 点击查看
handlePreview(item) {
this.$store.commit("setDetailMap", this.$router.path);
this.$router.push({
name: "consultationDetails",
query: {
item: item
}
});
},
// 搜索
sarStandCompareHisInfo() {
this.splitInfoPage = 1
this.sarStandCompareHis()
},
// 查询表格
sarStandCompareHis () {
this.spinShow = true
var form = this.standCommonlySearch
this.$http.get('slrs/sar-public-idea/SelectAllPage', form, {
_this: this
}, res => {
this.standInfoList = res.data.records
this.total = res.data.total
this.spinShow = false
}, e => {
})
},
pageChange (page) {
this.standCommonlySearch.page = page
this.sarStandCompareHis()
},
// 分页每页显示数改变后方法
pageSizeChange (pageSize) {
this.$store.getters.userInfo.configContent = pageSize
this.standCommonlySearch.size = pageSize
this.sarStandCompareHis()
},
},
computed: {
},
mounted () {
this.sarStandCompareHis()
this.tableHeight = $('.content').height() - 44
window.onresize = () => {
this.tableHeight = $('.content').height() - 44
// 清空
clearSearchStand() {
this.standCommonlySearch.page = 1;
this.standCommonlySearch.start = "";
this.standCommonlySearch.end = "";
this.standCommonlySearch.categorg = "";
this.standCommonlySearch.cname = "";
this.sarStandCompareHis();
},
// 搜索
sarStandCompareHisInfo() {
this.splitInfoPage = 1;
this.sarStandCompareHis();
},
// 查询表格
sarStandCompareHis() {
this.spinShow = true;
var form = this.standCommonlySearch;
this.$http.get("slrs/sar-public-idea/SelectAllPage", form, {
_this: this
}, res => {
this.standInfoList = res.data.records;
this.total = res.data.total;
this.spinShow = false;
}, e => {
});
},
pageChange(page) {
this.standCommonlySearch.page = page;
this.sarStandCompareHis();
},
// 分页每页显示数改变后方法
pageSizeChange(pageSize) {
this.$store.getters.userInfo.configContent = pageSize;
this.standCommonlySearch.size = pageSize;
this.sarStandCompareHis();
}
},
computed: {},
mounted() {
this.sarStandCompareHis();
this.tableHeight = $(".content").height() - 44;
window.onresize = () => {
this.tableHeight = $(".content").height() - 44;
};
}
}
};
</script>
<style lang="less" scoped>
@import '~@/assets/styles/mixins';
@import '~@/assets/styles/style';
.standardForComments {
height: 100%;
background: #fff;
.el-divider--horizontal {
display: block;
height: 1px;
width: 100%;
margin: 0;
}
.flex();
flex-direction: column;
.action-bar {
margin-bottom: 5px;
padding: 0;
}
.content {
flex: auto;
overflow: hidden;
display: flex;
flex-direction: column;
.table-wrap {
flex: auto;
overflow: hidden;
position: relative;
}
}
& > .pagination {
position: static;
/deep/.pagination-slot {
/deep/ .pagination-slot {
padding: 0;
}
}