手动查找全部功能完毕
This commit is contained in:
+190
-11
@@ -285,10 +285,11 @@
|
||||
<el-form-item label="标准/政策来源" class="search-item">
|
||||
<el-select
|
||||
v-model="handleSelectForm.dataSource"
|
||||
@change="dataSourceChange"
|
||||
:popper-append-to-body="false"
|
||||
placeholder="请选择标准/政策来源">
|
||||
<el-option value="INLAND_STAND" label="国内标准库"></el-option>
|
||||
<el-option value="FOREIGN_STAND" label="海外标准库"></el-option>
|
||||
<el-option value="INLAND" label="国内标准库"></el-option>
|
||||
<el-option value="FOREIGN" label="海外标准库"></el-option>
|
||||
<el-option value="FOREIGN_LAWS" label="国内外政策库"></el-option>
|
||||
<el-option value="BUSINESS_STAND" label="企业标准库"></el-option>
|
||||
</el-select>
|
||||
@@ -296,6 +297,7 @@
|
||||
<el-form-item label="标准编号/政策编号" class="search-item">
|
||||
<el-input
|
||||
v-model="handleSelectForm.lawNumber"
|
||||
@change="lawNumberSearch"
|
||||
placeholder="根据标准编号/政策编号查找"
|
||||
clearable
|
||||
:maxlength="100"></el-input>
|
||||
@@ -303,6 +305,7 @@
|
||||
<el-form-item label="标准名称/政策名称" class="search-item">
|
||||
<el-input
|
||||
v-model="handleSelectForm.lawName"
|
||||
@change="lawNameSearch"
|
||||
placeholder="根据标准名称/政策名称查找"
|
||||
clearable
|
||||
:maxlength="100"></el-input>
|
||||
@@ -330,6 +333,7 @@
|
||||
tooltip-effect="dark"
|
||||
style="width: 100%;overflow-y: auto;overflow-x: hidden;"
|
||||
border
|
||||
:data="lawInfoTable"
|
||||
:height="300"
|
||||
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
|
||||
fontWeight: 'bold', height: '48px'}"
|
||||
@@ -345,14 +349,30 @@
|
||||
align="center"
|
||||
label="标准编号/政策编号">
|
||||
<template slot-scope="scope">
|
||||
<a v-if="scope.row.standYear" class="table-jump">{{ scope.row.standSort }} {{ scope.row.standNumber }}-{{ scope.row.standYear }}</a>
|
||||
<a v-else class="table-jump">{{ scope.row.standSort }} {{ scope.row.standNumber }}</a>
|
||||
<!--企标-->
|
||||
<a v-if="scope.row.standStatusShow === '作废' && handleSelectForm.dataSource === 'BUSINESS_STAND'" style="color: #F56C6C" @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.standCode }}</a>
|
||||
<a v-if="scope.row.standStatusShow === '参考' && handleSelectForm.dataSource === 'BUSINESS_STAND'" style="color: #E6A23C" @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.standCode }}</a>
|
||||
<a v-if="scope.row.standStatusShow !== '作废' && scope.row.standStatusShow !== '参考' && handleSelectForm.dataSource === 'BUSINESS_STAND'" style="color: #333333" @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.standCode }}</a>
|
||||
<!--国内外标准-->
|
||||
<a v-if="scope.row.standYear && (handleSelectForm.dataSource === 'INLAND'||handleSelectForm.dataSource === 'FOREIGN')" class="table-jump">{{ scope.row.standSort }} {{ scope.row.standNumber }}-{{ scope.row.standYear }}</a>
|
||||
<a v-if="(scope.row.standYear === ''||scope.row.standYear === undefined) && (handleSelectForm.dataSource === 'INLAND'||handleSelectForm.dataSource === 'FOREIGN')">{{ scope.row.standSort }} {{ scope.row.standNumber }}</a>
|
||||
<!--国内外政策-->
|
||||
<a v-if="scope.row.standStatusShow === '作废' && handleSelectForm.dataSource === 'FOREIGN_LAWS'" style="color: #F56C6C" class="table-jump">{{ scope.row.lawsNumber }}</a>
|
||||
<a v-if="scope.row.standStatusShow === '参考' && handleSelectForm.dataSource === 'FOREIGN_LAWS'" style="color: #E6A23C" class="table-jump">{{ scope.row.lawsNumber }}</a>
|
||||
<a v-if="scope.row.standStatusShow !== '作废' && scope.row.standStatusShow !== '参考' && handleSelectForm.dataSource === 'FOREIGN_LAWS'" style="color: #333333" @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.lawsNumber }}</a>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="lawName"
|
||||
align="center"
|
||||
label="标准名称/政策名称">
|
||||
<template slot-scope="scope">
|
||||
<a v-if="textStatusMap[scope.row.textStatus] === '废止' || textStatusMap[scope.row.textStatus] === '被代替'&& (handleSelectForm.dataSource === 'INLAND'||handleSelectForm.dataSource === 'FOREIGN'||handleSelectForm.dataSource === 'BUSINESS_STAND')" class="table-jump" style="color: #F56C6C">{{ scope.row.standName }}</a>
|
||||
<a v-else style="color: #333333" class="table-jump">{{ scope.row.standName }}</a>
|
||||
<a v-if="scope.row.standStatusShow === '作废' && handleSelectForm.dataSource === 'FOREIGN_LAWS'" style="color: #F56C6C" @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.lawsName }}</a>
|
||||
<a v-if="scope.row.standStatusShow === '参考' && handleSelectForm.dataSource === 'FOREIGN_LAWS'" style="color: #E6A23C" @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.lawsName }}</a>
|
||||
<a v-if="scope.row.standStatusShow !== '作废' && scope.row.standStatusShow !== '参考' && handleSelectForm.dataSource === 'FOREIGN_LAWS'" style="color: #333333" @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.lawsName }}</a>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="textStatus"
|
||||
@@ -360,7 +380,19 @@
|
||||
label="标准状态"
|
||||
width="350">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ textStatusMap[scope.row.textStatus] }}</span>
|
||||
<span v-if="textStatusMap[scope.row.textStatus] === '废止' || textStatusMap[scope.row.textStatus] === '被代替' && (handleSelectForm.dataSource === 'INLAND'||handleSelectForm.dataSource === 'FOREIGN'||handleSelectForm.dataSource === 'BUSINESS_STAND')" style="color: #F56C6C">{{
|
||||
textStatusMap[scope.row.textStatus]
|
||||
}}</span>
|
||||
<span v-else>{{ textStatusMap[scope.row.textStatus] }}</span>
|
||||
<span v-if="scope.row.standStatusShow === '作废' && handleSelectForm.dataSource === 'FOREIGN_LAWS'" style="color: #F56C6C">
|
||||
{{scope.row.standStatusShow}}
|
||||
</span>
|
||||
<span v-if="scope.row.standStatusShow === '参考' && handleSelectForm.dataSource === 'FOREIGN_LAWS'" style="color: #E6A23C">
|
||||
{{scope.row.standStatusShow}}
|
||||
</span>
|
||||
<span v-if="scope.row.standStatusShow !== '作废' && scope.row.standStatusShow !== '参考' && handleSelectForm.dataSource === 'FOREIGN_LAWS'">
|
||||
{{scope.row.standStatusShow}}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -385,18 +417,24 @@ export default {
|
||||
name: "listTracking",
|
||||
data () {
|
||||
return {
|
||||
lawInfoTable:[],
|
||||
handleSelectPage: 1,
|
||||
handleSelectTotal: 0,
|
||||
textStatusMap: {}, // 文本状态id与name对应
|
||||
handleSelectTableList:[],
|
||||
handleSelectForm: {
|
||||
dataSource: '',
|
||||
standName: '', //标准名称
|
||||
numberName: '', //政策名称
|
||||
lawsNumber: '', //政策编号
|
||||
standNumber: '', //标准编号
|
||||
standCode: '', //企标编号
|
||||
dataSource: 'INLAND',
|
||||
lawNumber: '', // 标准编号/政策编号
|
||||
lawName: '', // 标准名称/政策名称
|
||||
page: 1,
|
||||
pageSize: this.$store.getters.userInfo.configContent,
|
||||
total: 0,
|
||||
standType: 'INLAND',
|
||||
standType: '',
|
||||
quoteIdList: '',
|
||||
validFlag: '0',
|
||||
menuId: 'nomenu'
|
||||
@@ -509,8 +547,8 @@ export default {
|
||||
applyAuth: '' // 认证类型
|
||||
},
|
||||
dataSourceOptions: [
|
||||
{value: 'INLAND_STAND', label: '国内标准法规'},
|
||||
{value: 'FOREIGN_STAND', label: '海外标准法规'},
|
||||
{value: 'INLAND', label: '国内标准法规'},
|
||||
{value: 'FOREIGN', label: '海外标准法规'},
|
||||
{value: 'FOREIGN_LAWS', label: '国内外政策'},
|
||||
{value: 'BUSINESS', label: '企业标准 '}
|
||||
],
|
||||
@@ -528,19 +566,152 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 将文本状态的id与name对应
|
||||
setMap(data) {
|
||||
data.forEach(item => {
|
||||
this.$set(this.textStatusMap, item.value, item.label)
|
||||
})
|
||||
},
|
||||
dataSourceChange() {
|
||||
this.handleSelectForm.standType = this.handleSelectForm.dataSource
|
||||
this.searchLawBtn()
|
||||
},
|
||||
//根据标准编号/政策编号查询
|
||||
lawNumberSearch() {
|
||||
this.handleSelectForm.standNumber = this.handleSelectForm.lawNumber
|
||||
this.handleSelectForm.lawsNumber = this.handleSelectForm.lawNumber
|
||||
this.handleSelectForm.standCode = this.handleSelectForm.lawNumber
|
||||
},
|
||||
//根据标准名称/政策名称查询
|
||||
lawNameSearch() {
|
||||
this.handleSelectForm.standName = this.handleSelectForm.lawName
|
||||
this.handleSelectForm.numberName = this.handleSelectForm.lawName
|
||||
},
|
||||
//手动查找的确定按钮
|
||||
handleSelectConfirm(){
|
||||
if (this.handleSelectTableList.length>1){
|
||||
this.$message.warning('只能选择一条数据')
|
||||
}else if (this.handleSelectTableList.length===0){
|
||||
this.$message.warning('请选择一条数据')
|
||||
}
|
||||
else {
|
||||
// dataSourceOptions: [
|
||||
// {value: 'INLAND', label: '国内标准法规'},
|
||||
// {value: 'FOREIGN', label: '海外标准法规'},
|
||||
// {value: 'FOREIGN_LAWS', label: '国内外政策'},
|
||||
// {value: 'BUSINESS', label: '企业标准 '}
|
||||
// ],
|
||||
this.attributeEO.lawId =this.handleSelectTableList[0].standCode || this.handleSelectTableList[0].lawsNumber || this.handleSelectTableList[0].standSort+" "+this.handleSelectTableList[0].standNumber+"-"+this.handleSelectTableList[0].standYear
|
||||
this.attributeEO.lawName = this.handleSelectTableList[0].standName || this.handleSelectTableList[0].lawsName
|
||||
this.selectModal = false
|
||||
}
|
||||
console.log('确定',this.handleSelectTableList)
|
||||
},
|
||||
//手动查找的清空按钮
|
||||
clearLawBtn(){
|
||||
//清空的时候还是不要把人家选的数据源清空吧
|
||||
// this.handleSelectForm.dataSource = ''
|
||||
//清空标准编号/政策编号的查询
|
||||
this.handleSelectForm.lawNumber = ''
|
||||
this.handleSelectForm.standNumber = ''
|
||||
this.handleSelectForm.lawsNumber = ''
|
||||
this.handleSelectForm.standCode = ''
|
||||
//清空标准名称/政策名称的查询
|
||||
this.handleSelectForm.lawName = ''
|
||||
this.handleSelectForm.standName = ''
|
||||
this.handleSelectForm.numberName = ''
|
||||
this.searchLawBtn()
|
||||
},
|
||||
//手动查找的查询按钮
|
||||
searchLawBtn(){
|
||||
console.log('533',this.handleSelectForm.dataSource)
|
||||
if (this.handleSelectForm.dataSource === 'INLAND'){
|
||||
this.$http.get('sarStandardsInfo/sar-standards-info/getSarStandardsInfoPage',this.handleSelectForm,{
|
||||
_this: this
|
||||
},res=>{
|
||||
console.log('国内标准库数据',res)
|
||||
if (res.ok){
|
||||
this.lawInfoTable = res.data.list
|
||||
this.handleSelectTotal = res.data.count
|
||||
}else {
|
||||
this.$message.error(res.message)
|
||||
}
|
||||
},e=>{
|
||||
this.lawInfoTable = []
|
||||
this.total = 0
|
||||
})
|
||||
console.log('国内标准库')
|
||||
}else if(this.handleSelectForm.dataSource === 'FOREIGN'){
|
||||
this.$http.get('sarStandardsInfo/sar-standards-info/getSarStandardsInfoPage',this.handleSelectForm,{
|
||||
_this: this
|
||||
},res=>{
|
||||
console.log('海外标准库数据',res)
|
||||
if (res.ok){
|
||||
this.lawInfoTable = res.data.list
|
||||
this.handleSelectTotal = res.data.count
|
||||
}else {
|
||||
this.$message.error(res.message)
|
||||
}
|
||||
},e=>{
|
||||
this.lawInfoTable = []
|
||||
this.total = 0
|
||||
})
|
||||
console.log('海外标准库')
|
||||
}else if(this.handleSelectForm.dataSource === 'FOREIGN_LAWS'){
|
||||
this.$http.get('lawss/sarLawsInfo/page',this.handleSelectForm,{
|
||||
_this: this
|
||||
},res=>{
|
||||
console.log('国内外政策库数据',res)
|
||||
if (res.ok){
|
||||
this.lawInfoTable = res.data.list
|
||||
this.handleSelectTotal = res.data.count
|
||||
}else {
|
||||
this.$message.error(res.message)
|
||||
}
|
||||
},e=>{
|
||||
this.lawInfoTable = []
|
||||
this.total = 0
|
||||
})
|
||||
console.log('国内外政策库')
|
||||
}else if(this.handleSelectForm.dataSource === 'BUSINESS_STAND'){
|
||||
this.$http.get('lawss/sarBussionessStand/getSarBussionStandPage',this.handleSelectForm,{
|
||||
_this: this
|
||||
},res=>{
|
||||
console.log('企业标准库数据',res)
|
||||
if (res.ok){
|
||||
this.lawInfoTable = res.data.list
|
||||
this.handleSelectTotal = res.data.count
|
||||
}else {
|
||||
this.$message.error(res.message)
|
||||
}
|
||||
},e=>{
|
||||
this.lawInfoTable = []
|
||||
this.total = 0
|
||||
})
|
||||
console.log('企业标准库')
|
||||
}else {
|
||||
this.$message.warning('请先选择标准/政策来源')
|
||||
}
|
||||
},
|
||||
handleSelectPageChange(page){
|
||||
|
||||
this.handleSelectForm.page = page
|
||||
console.log(this.handleSelectForm.page)
|
||||
this.searchLawBtn()
|
||||
},
|
||||
handleSelectPageSizeChange(pageSize){
|
||||
|
||||
this.handleSelectForm.pageSize = this.$store.getters.userInfo.configContent
|
||||
console.log(this.handleSelectForm.pageSize)
|
||||
this.searchLawBtn()
|
||||
},
|
||||
// 手动查找 table选择事件
|
||||
handleSelectTableChange (row) {
|
||||
this.handleSelectTableList = row
|
||||
console.log('我选的',this.handleSelectTableList)
|
||||
},
|
||||
//点击手动查找按钮
|
||||
handleSelect() {
|
||||
this.selectModal = true
|
||||
this.searchLawBtn()
|
||||
},
|
||||
saveInfo () {
|
||||
this.$refs['attributeEO'].validate((valid) => {
|
||||
@@ -786,6 +957,14 @@ export default {
|
||||
mounted () {
|
||||
// 分页查询数据
|
||||
this.searchSarAccess()
|
||||
// 从数据库中查询各下拉框数据
|
||||
this.$http.get('sys/dictype/getDicTypeListCode', '', {
|
||||
_this: this
|
||||
}, res => {
|
||||
console.log(res.data.WBZTCLASS)
|
||||
this.setMap(res.data.WBZTCLASS)
|
||||
}, e => {
|
||||
})
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user