This commit is contained in:
zhutianqi
2021-12-28 14:55:17 +08:00
parent fcf697514d
commit bc2446c34e
4 changed files with 432 additions and 7 deletions
@@ -5,6 +5,7 @@
:prop="config.attrField"
:label-width="labelWidth"
class="add-form-item"
style="width: 100%;"
:class="{'form-item-disabled': disabled}"
>
<el-input
@@ -42,7 +43,7 @@
v-model="replaceLawsNumForm.standType"
placeholder="请选择"
>
<el-option value="ALL" label="全部"></el-option>
<el-option value="" label="全部"></el-option>
<el-option value="INLAND" label="国内"></el-option>
<el-option value="FOREIGN" label="海外"></el-option>
</el-select>
@@ -125,8 +126,8 @@
@pageChange="pageChangeReplace"
@pageSizeChange="pageSizeChangeReplace"></pagination>
<div slot="footer" class="demo-drawer-footer">
<el-button class="common-button-default" icon="el-icon-close" @click="replaceLawsNumModel = false">取消</el-button>
<el-button type="primary" round class="common-button-primary" icon="el-icon-check" @click="replaceLawsNumModelBt">提交</el-button>
<el-button class="common-button-default" round size="mini" icon="el-icon-close" @click="replaceLawsNumModel = false">取消</el-button>
<el-button type="primary" round size="mini" class="common-button-primary" icon="el-icon-check" @click="replaceLawsNumModelBt">提交</el-button>
</div>
</el-dialog>
@@ -176,7 +177,7 @@ export default {
page: 1,
pageSize: this.$store.getters.userInfo.configContent,
total: 0,
standType: 'ALL',
standType: '',
quoteIdList: '',
validFlag: '0',
menuId: 'nomenu'
@@ -0,0 +1,349 @@
<template>
<div>
<el-form-item
:label="config.attrName"
:prop="config.attrField"
:label-width="labelWidth"
class="add-form-item"
style="width: 100%;"
:class="{'form-item-disabled': disabled}"
>
<el-input
:value="value"
:placeholder="placeholder"
:disabled="disabled"
clearable
@input="handleChange"
></el-input>
<el-button
type="primary"
class="common-button-primary"
size="mini"
style="position:absolute;top: 10px;right: 0;"
@click="selectLaws"
v-if="(processModel && !disabled) || !processModel"
>{{config.attrField === 'releventStand' ? '选择标准' :'手动查找'}}</el-button>
</el-form-item>
<el-dialog
:title="config.attrName"
:visible.sync="replaceLawsNumModel"
width="875px"
:close-on-click-modal="false"
@close="replaceLawsNumModelCancel"
:append-to-body="true"
>
<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>
<el-form-item label="国内/海外" class="search-item">
<el-select
v-model="replaceLawsNumForm.standType"
placeholder="请选择"
>
<el-option value="1" label="企标"></el-option>
<el-option value="INLAND" label="国内"></el-option>
<el-option value="FOREIGN" label="海外"></el-option>
</el-select>
</el-form-item>
<el-form-item class="search-item btn-box">
<el-button
icon="el-icon-search"
type="primary"
class="common-button-primary"
round
@click="getReplaceLawsNumRowInfo">
</el-button>
</el-form-item>
<el-form-item class="search-item btn-box">
<el-button
class="common-button-default"
icon="el-icon-refresh-left"
round
type="default"
@click="getResetLawsNumRow"></el-button>
</el-form-item>
</el-form>
</div>
</div>
<el-table
ref="selections"
:data="replaceLawsNumRow"
tooltip-effect="dark"
style="width: 100%;overflow-y: auto;overflow-x: hidden;"
border
:height="300"
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
fontWeight: 'bold', height: '48px'}"
@selection-change="selectReplaceStandNumRowChange">
<el-table-column
type="selection"
width="55"
align="center">
</el-table-column>
<el-table-column
label="标准编号"
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>
</template>
</el-table-column>
<el-table-column
prop="standName"
label="标准名称"
width="130">
</el-table-column>
<el-table-column
prop="issueTime"
label="发布日期"
width="130">
</el-table-column>
<el-table-column
prop="putTime"
label="实施日期"
width="130">
</el-table-column>
<el-table-column
prop="standNatureShow"
label="标准性质"
width="130">
</el-table-column>
<el-table-column
prop="standStateShow"
label="标准状态"
width="130">
</el-table-column>
</el-table>
<loading :loading="replaceLoading">{{$t('m.dataAcquisition')}}</loading>
<!--分页-->
<pagination
style="position: relative;"
:page="replacePage"
:total="replaceTotal"
@pageChange="pageChangeReplace"
@pageSizeChange="pageSizeChangeReplace"></pagination>
<div slot="footer" class="demo-drawer-footer">
<el-button class="common-button-default" round size="mini" icon="el-icon-close" @click="replaceLawsNumModel = false">取消</el-button>
<el-button type="primary" round size="mini" class="common-button-primary" icon="el-icon-check" @click="replaceLawsNumModelBt">提交</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
export default {
name: 'CustomInput',
props: {
config: {
type: Object,
required: true
},
value: {
required: true
},
disabled: {
type: Boolean,
default: false
},
// 栅格比例
span: {
type: Number,
default: 24
},
// 是否为流程中使用
processModel: {
type: Boolean,
default: false
},
// label宽度
labelWidth: {
type: String,
default: '150px'
}
},
data () {
return {
replaceLawsNumModel: false,
sarBussionessLawsEO: {
replaceLawsNum: ''
},
// 代替标准号
replaceLawsNumForm: {
standNumber: '', // 政策编号
page: 1,
pageSize: this.$store.getters.userInfo.configContent,
total: 0,
standType: 'INLAND',
quoteIdList: '',
validFlag: '0',
menuId: 'nomenu'
},
replaceLawsNumRow: [], // 代替政策号 数组内容
replaceTotal: 0,
selectedListRep: [],
replaceLoading: true,
replacePage: 1
}
},
computed: {
placeholder () {
return `请输入${this.config.attrName}`
},
showMessage () {
return `${this.config.attrName}不能为空`
},
isRequired () {
return !!this.config.isMust
}
},
methods: {
handleChange (event) {
const value = event
this.$emit('input', value)
},
selectLaws () {
this.replaceLawsNumModel = true
this.getReplaceLawsNumRow()
},
getReplaceLawsNumRowInfo() {
this.replaceLawsNumForm.page = 1
this.getReplaceLawsNumRow()
},
// 代替政策号 请求数据
getReplaceLawsNumRow () {
if (this.replaceLawsNumForm.standType === '1') {
let json = {}
json = this.replaceLawsNumForm
json.userId = this.$store.getters.userInfo.userId
json.standCode = this.replaceLawsNumForm.standNumber
this.$http.get('lawss/sarBussionessStand/getSarBussionStandPage', json, {
_this: this, loading: 'replaceLoading'
}, 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 {
if (this.sarBussionessLawsEO.replaceLawsNum !== null && this.sarBussionessLawsEO.replaceLawsNum !== '') {
this.replaceLawsNumForm.quoteIdList = this.quoteIdList1.toString() === '' ? '' : this.quoteIdList1
} else {
this.quoteIdList1 = []
this.replaceLawsNumForm.quoteIdList = ''
}
this.$http.get('sarStandardsInfo/sar-standards-info/getSarStandardsInfoPage', this.replaceLawsNumForm, {
_this: this,
loading: 'replaceLoading'
}, 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 => {
})
}
},
// 代替政策编号-取消
replaceLawsNumModelCancel () {
this.$refs.selections.clearSelection()
},
// 代替政策号 table选择事件
selectReplaceStandNumRowChange (row) {
this.selectedListRep = row
},
// 代替政策分页
pageChangeReplace (page) {
this.replacePage = page
this.replaceLawsNumForm.page = page
this.getReplaceLawsNumRow()
},
pageSizeChangeReplace (pageSize) {
// this.replaceRows = pageSize
this.replaceLawsNumForm.pageSize = pageSize
this.getReplaceLawsNumRow()
},
// 代替政策编号确定
replaceLawsNumModelBt () {
let textArr = []
if (typeof this.value === 'string') {
if (this.value) {
textArr = this.value.split(',')
}
}
if (this.selectedListRep.length === 0) {
return this.$message({
message: '请先选择数据',
type: 'warning'
})
}
if (this.selectedListRep.length + textArr.length > 20) {
return this.$message({
message: '代替标准号最多选择20项',
type: 'warning'
})
}
this.selectedListRep.map((item) => {
let texts = ''
if (item.standYear != null && item.standYear !== '') {
texts = item.standSort !== null ? item.standSort + ' ' + item.standNumber + '-' + item.standYear : item.standNumber + '-' + item.standYear
} else {
texts = item.standSort !== null ? item.standSort + ' ' + item.standNumber : item.standNumber
}
textArr.push(texts)
textArr = [...new Set(textArr)]
this.replaceLawsNumModel = false
})
this.$emit('input', textArr.join(','))
this.$refs.selections.clearSelection()
},
// 点击查看
handlePreview (item) {
let routeUrl = this.$router.resolve({
name: 'OtherBussStandardDetails',
params: {
id: item.id,
pageType: 'BUSINESS_STAND'
}
})
window.open(routeUrl.href, '_blank')
},
getResetLawsNumRow () {
this.replaceLawsNumForm = {
standNumber: '', // 政策编号
page: 1,
pageSize: this.$store.getters.userInfo.configContent,
total: 0,
standType: 'ALL',
quoteIdList: '',
validFlag: '0'
}
this.getReplaceLawsNumRow()
}
}
}
</script>
<style scoped>
</style>
@@ -749,7 +749,7 @@ export default {
})
if (this.type2 === '1') {
this.roleForm.dockUserList = idList
this.roleForm.dockUserName = nameList
this.roleForm.dockUserListName = nameList
} else {
this.roleForm.directorUser = idList
this.roleForm.directorUserName = nameList
@@ -301,6 +301,59 @@
</el-input>
</div>
</el-form-item>
<el-form-item label="标准范围" style="width: 100%; margin-right:10px" class="add-form-item" prop="area" :class="DrawerType === 'see' ? 'form-item-disabled' : ''">
<div style="display: flex;justify-content: space-between;align-items: center;">
<el-select v-model="addForm.area" multiple filterable placeholder="请选择标准范围" style="width: 100%;">
<el-option
v-for="item in BZList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</div>
</el-form-item>
<el-form-item label="是否引用标准" style="width: 100%; margin-right:10px" class="add-form-item" prop="isRelate" :class="DrawerType === 'see' ? 'form-item-disabled' : ''">
<div style="display: flex; height: 100%; justify-content: space-between;align-items: center;">
<el-radio-group v-model="addForm.isRelate">
<el-radio label="是" value="是"></el-radio>
<el-radio label="否" value="否"></el-radio>
</el-radio-group>
</div>
</el-form-item>
<template v-if="addForm.isRelate === '是'">
<custom-input-for-all-standards
class="classDisplay"
:config="{attrName: '采用标准'}"
:labelWidth="'180px'"
v-model="addForm.esStandRelations"
></custom-input-for-all-standards>
</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;">
<el-radio-group v-model="addForm.useLevel">
<el-radio label="等同" value="等同"></el-radio>
<el-radio label="修改" value="修改"></el-radio>
<el-radio label="非等效" value="非等效"></el-radio>
</el-radio-group>
</div>
</el-form-item>
<el-form-item v-if="addForm.isRelate === '否'" label="简述技术指标依据" style="width: 100%; margin-right:10px" class="add-form-item" prop="technologic" :class="DrawerType === 'see' ? 'form-item-disabled' : ''">
<div style="display: flex;justify-content: space-between;align-items: center;">
<el-input
v-model="addForm.technologic"
placeholder="请简述技术指标依据">
</el-input>
</div>
</el-form-item>
<template>
<custom-input-for-all-standards2
class="classDisplay"
:config="{attrName: '配套标准'}"
:labelWidth="'180px'"
v-model="addForm.esMatingRelations"
></custom-input-for-all-standards2>
</template>
</el-form>
</el-col>
</el-row>
@@ -385,7 +438,6 @@
type="primary"
size="mini"
class="common-button-primary"
@click="QYBZget">查询
</el-button>
<el-button
@@ -490,11 +542,17 @@
</template>
<script>
import CustomInputForAllStandards from '@/components/CustomFormComponents/InputForAllStandards'
import CustomInputForAllStandards2 from '@/components/CustomFormComponents/InputForAllStandards2'
export default {
name: "enterpriseStandardPlan",
components: {},
components: {
CustomInputForAllStandards,
CustomInputForAllStandards2
},
data() {
return {
BZList: [],
TXJGList: [],
TXJGmodal: false,
standSystemOptions: [],
@@ -533,6 +591,12 @@
DrawerType: '',
ids: [],
addForm: {
esMatingRelations: '',
technologic: '',
useLevel: '',
isRelate: '',
esStandRelations: '',
area: '',
tsJson: '',
tsJsonName: '',
rqbJson: '',
@@ -943,6 +1007,8 @@
}, res => {
this.QCDWList = res.data.QCDW // 起草单位
this.standSystemOptions = res.data.TXLBBUSS // 体系结构
this.BZList = res.data.ENERGYTYPES
console.log(this.BZList);
}, e => {
})
},
@@ -955,6 +1021,14 @@
#enterpriseStandardPlan {
height: 100%;
background: #fff;
.classDisplay {
/deep/.el-form-item__content {
width: calc(~'100% - 180px');
.el-input__inner {
width: calc(~'100% - 80px');
}
}
}
.standardForComments {
height: calc(~'100% - 56px');
background: #fff;
@@ -993,6 +1067,7 @@
.add-form-item {
/deep/.el-form-item__content {
width: calc(~'100% - 180px');
height: 50px;
}
}
display: flex;