This commit is contained in:
zhutianqi
2022-01-06 17:23:04 +08:00
parent 6b46cbf63e
commit 507eeea772
2 changed files with 72 additions and 47 deletions
@@ -36,15 +36,18 @@
<div class="search-area">
<div class="left">
<el-form :modal="replaceLawsNumForm" :inline="true" class="label-input-form">
<el-form-item label="编号/名称" class="search-item">
<el-input v-model="replaceLawsNumForm.standNumber" placeholder="根据编号/名称查找" clearable :maxlength="100"></el-input>
<el-form-item label="标准编号" class="search-item">
<el-input v-model="replaceLawsNumForm.standNumber" placeholder="根据标准编号查找" clearable :maxlength="100"></el-input>
</el-form-item>
<el-form-item label="标准名称" class="search-item">
<el-input v-model="replaceLawsNumForm.standName" placeholder="根据标准名称查找" clearable :maxlength="100"></el-input>
</el-form-item>
<el-form-item label="国内/海外" class="search-item">
<el-select
v-model="replaceLawsNumForm.standType"
placeholder="请选择"
>
<el-option value="1" label="企标"></el-option>
<el-option v-if="enterpriseStandard" value="1" label="企标"></el-option>
<el-option value="INLAND" label="国内"></el-option>
<el-option value="FOREIGN" label="海外"></el-option>
</el-select>
@@ -86,36 +89,44 @@
</el-table-column>
<el-table-column
label="标准编号"
show-overflow-tooltip
width="130">
<template slot-scope="scope">
<a v-if="scope.row.standYear" @click="handlePreview(scope.row)">{{ scope.row.standSort }} {{ scope.row.standNumber }}-{{ scope.row.standYear }}</a>
<a v-else @click="handlePreview(scope.row)">{{ scope.row.standSort }} {{ scope.row.standNumber }}</a>
<a class="table-jump" v-if="scope.row.standYear" @click="handlePreview(scope.row)">{{ scope.row.standSort }} {{ scope.row.standNumber }}-{{ scope.row.standYear }}</a>
<a class="table-jump" v-else @click="handlePreview(scope.row)">{{ scope.row.standSort }} {{ scope.row.standNumber }}</a>
</template>
</el-table-column>
<el-table-column
prop="standName"
label="标准名称"
width="130">
show-overflow-tooltip
label="标准名称">
<template slot-scope="scope">
<a class="table-jump" @click="handlePreview(scope.row)">{{ scope.row.standName }}</a>
</template>
</el-table-column>
<el-table-column
prop="issueTime"
show-overflow-tooltip
label="发布日期"
width="130">
</el-table-column>
<el-table-column
prop="putTime"
label="实施日期"
show-overflow-tooltip
width="130">
<template slot-scope="scope">
<span v-if="scope.row.standType === 'INLAND' || scope.row.standType === 'FOREIGN'">{{ scope.row.ssrq }}</span>
<span v-else>{{ scope.row.putTime }}</span>
</template>
</el-table-column>
<el-table-column
prop="standNatureShow"
label="标准性质"
width="130">
</el-table-column>
<el-table-column
prop="standStateShow"
label="标准状态"
label="文本状态"
show-overflow-tooltip
width="130">
<template slot-scope="scope">
<span v-if="scope.row.standType === 'INLAND' || scope.row.standType === 'FOREIGN'">{{ textStatusMap[scope.row.textStatus] }}</span>
<span v-else>{{ scope.row.standStatusShow }}</span>
</template>
</el-table-column>
</el-table>
<loading :loading="replaceLoading">{{$t('m.dataAcquisition')}}</loading>
@@ -167,10 +178,15 @@
},
placeholderText: {
type: String
},
enterpriseStandard: {
type: Boolean,
default: false
}
},
data () {
return {
textStatusMap: {},
replaceLawsNumModel: false,
sarBussionessLawsEO: {
replaceLawsNum: ''
@@ -178,6 +194,7 @@
// 代替标准号
replaceLawsNumForm: {
standNumber: '', // 政策编号
standName: '',
page: 1,
pageSize: this.$store.getters.userInfo.configContent,
total: 0,
@@ -210,6 +227,11 @@
}
},
methods: {
setMap(data) {
data.forEach(item => {
this.$set(this.textStatusMap, item.value, item.label)
})
},
handleChange (event) {
const value = event
this.$emit('input', value)
@@ -234,15 +256,6 @@
}, res => {
this.replaceLawsNumRow = res.data.list
this.replaceTotal = res.data.count
// if (this.selectedListRep.length !== 0) {
// this.selectedListRep.map((list) => {
// this.replaceLawsNumRow.map((item) => {
// if (list.id === item.id) {
// item._checked = true
// }
// })
// })
// }
}, e => {
})
} else {
@@ -258,15 +271,6 @@
}, res => {
this.replaceLawsNumRow = res.data.list
this.replaceTotal = res.data.count
// if (this.selectedListRep.length !== 0) {
// this.selectedListRep.map((list) => {
// this.replaceLawsNumRow.map((item) => {
// if (list.id === item.id) {
// item._checked = true
// }
// })
// })
// }
}, e => {
})
}
@@ -327,14 +331,26 @@
},
// 点击查看
handlePreview (item) {
let routeUrl = this.$router.resolve({
name: 'OtherBussStandardDetails',
params: {
id: item.id,
pageType: 'BUSINESS_STAND'
}
})
window.open(routeUrl.href, '_blank')
if (item.standType === 'INLAND' || item.standType === 'FOREIGN') {
let pageType = item.standType === 'INLAND' ? 'INLAND_STAND' : 'FOREIGN_STAND'
let routeUrl = this.$router.resolve({
name: 'OtherStandardDetails',
params: {
id: item.id,
pageType: pageType
}
})
window.open(routeUrl.href, '_blank')
} else {
let routeUrl = this.$router.resolve({
name: 'OtherBussStandardDetails',
params: {
id: item.id,
pageType: 'BUSINESS_STAND'
}
})
window.open(routeUrl.href, '_blank')
}
},
getResetLawsNumRow () {
this.replaceLawsNumForm = {
@@ -348,6 +364,14 @@
}
this.getReplaceLawsNumRow()
}
},
mounted() {
this.$http.get('sys/dictype/getDicTypeListCode', '', {
_this: this
}, res => {
this.setMap(res.data.WBZTCLASS)
}, e => {
})
}
}
</script>
@@ -118,7 +118,7 @@
prop="reviseStatus"
width="150"
align="center"
label="制修订状态">
label="制修订类型">
<template slot-scope="scope">
<div>{{ scope.row.reviseStatus === ''? '' : (scope.row.reviseStatus === '1'? '制定' : '修订') }}</div>
</template>
@@ -235,7 +235,7 @@
</div>
</el-form-item>
<el-form-item prop="planStatus" label="计划状态" style="width: 100%; margin-right:10px" class="add-form-item" :class="DrawerType === 'see' ? 'form-item-disabled' : ''">
<el-select :disabled="DrawerType === 'see'" v-model="addForm.planStatus" placeholder="请选择计划状态">
<el-select :disabled="DrawerType === 'see' || DrawerType === 'add' " v-model="addForm.planStatus" placeholder="请选择计划状态">
<el-option label="未开始" value="0"></el-option>
<el-option label="制定中" value="1"></el-option>
<el-option label="修订中" value="2"></el-option>
@@ -243,7 +243,7 @@
<el-option label="已完成" value="4"></el-option>
</el-select>
</el-form-item>
<el-form-item prop="reviseStatus" label="制修订状态" style="width: 100%; margin-right:10px" class="add-form-item" :class="DrawerType === 'see' ? 'form-item-disabled' : ''">
<el-form-item prop="reviseStatus" label="制修订类型" style="width: 100%; margin-right:10px" class="add-form-item" :class="DrawerType === 'see' ? 'form-item-disabled' : ''">
<el-select :disabled="DrawerType === 'see'" v-model="addForm.reviseStatus" placeholder="请选择制修订状态">
<el-option label="制定" value="1"></el-option>
<el-option label="修订" value="2"></el-option>
@@ -357,13 +357,13 @@
</div>
</el-form-item>
<template v-if="addForm.isRelate === '是'">
<custom-input-for-all-standards
<custom-input-for-all-standards2
class="classDisplay"
:config="{attrName: '采用标准'}"
:disabled="DrawerType === 'see'"
:labelWidth="'180px'"
v-model="addForm.esStandRelations"
></custom-input-for-all-standards>
></custom-input-for-all-standards2>
</template>
<el-form-item v-if="addForm.isRelate === '是'" label="采标程度" style="width: 100%; margin-right:10px" class="add-form-item" prop="useLevel" :class="DrawerType === 'see' ? 'form-item-disabled' : ''">
<div style="display: flex; height: 100%; justify-content: space-between;align-items: center;">
@@ -389,6 +389,7 @@
<template>
<custom-input-for-all-standards2
class="classDisplay"
:enterpriseStandard="true"
:placeholderText="'包括已有、应有的关联标准,如企业标准、行业标准、国家标准'"
:disabled="DrawerType === 'see'"
:config="{attrName: '引用标准'}"
@@ -584,7 +585,6 @@
</template>
<script>
import CustomInputForAllStandards from '@/components/CustomFormComponents/InputForAllStandards'
import CustomInputForAllStandards2 from '@/components/CustomFormComponents/InputForAllStandards2'
export default {
name: "enterpriseStandardPlan",
@@ -938,6 +938,7 @@
this.addDrawerTitle = '新增'
this.addForm = {}
this.DrawerType = 'add'
this.addForm.planStatus = '0'
this.addDrawer = true
}, // 新增数据
deleteList () {