企标库 - 代替企标编号撑开

This commit is contained in:
yanyizhou
2021-12-15 20:42:06 +08:00
parent ec51b30246
commit e1d3700dd8
2 changed files with 154 additions and 117 deletions
+14 -2
View File
@@ -12,6 +12,9 @@
:value="value"
:placeholder="placeholder"
:disabled="disabled"
type="textarea"
resize="none"
:autosize="true"
clearable
@input="handleChange"
></el-input>
@@ -63,6 +66,15 @@ export default {
}
</script>
<style scoped>
<style lang="less" scoped>
.add-form-item{
/deep/.el-form-item__content{
.el-textarea{
width: calc(~'100% - 90px');
}
}
}
/deep/.el-dialog__body{
padding: 15px 20px;
}
</style>
@@ -1,5 +1,5 @@
<template>
<!-- <div>-->
<!-- <div>-->
<el-col :span="span">
<el-form-item
:label="config.attrName"
@@ -9,6 +9,9 @@
:class="{'form-item-disabled': disabled}"
>
<el-input
type="textarea"
resize="none"
:autosize="true"
:value="value"
:placeholder="placeholder"
:disabled="disabled"
@@ -22,7 +25,8 @@
style="position:absolute;top: 10px;right: 0;"
@click="selectLaws"
v-if="(processModel && !disabled) || !processModel"
>手动查找</el-button>
>手动查找
</el-button>
</el-form-item>
<el-dialog
:title="config.attrName"
@@ -34,18 +38,19 @@
>
<div class="search-area">
<div class="left">
<el-form :modal="replaceLawsNumForm" :inline="true" class="label-input-form" @keyup.enter.native="getReplaceLawsNumRowSearch">
<!-- <el-form-item label="数据来源" class="search-item">-->
<!-- <el-select v-model="replaceLawsNumForm.dataSource" filterable>-->
<!-- <el-option-->
<!-- v-for="item in dataSourceOptions"-->
<!-- :key="item.value"-->
<!-- :value="item.value"-->
<!-- :label="item.label"-->
<!-- >-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form :modal="replaceLawsNumForm" :inline="true" class="label-input-form"
@keyup.enter.native="getReplaceLawsNumRowSearch">
<!-- <el-form-item label="数据来源" class="search-item">-->
<!-- <el-select v-model="replaceLawsNumForm.dataSource" filterable>-->
<!-- <el-option-->
<!-- v-for="item in dataSourceOptions"-->
<!-- :key="item.value"-->
<!-- :value="item.value"-->
<!-- :label="item.label"-->
<!-- >-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item label="企标编号/标准名称" class="search-item input-width">
<el-input
v-model="replaceLawsNumForm.numberName"
@@ -89,23 +94,30 @@
width="55"
align="center">
</el-table-column>
<!-- <el-table-column-->
<!-- prop="standSortShow"-->
<!-- label="企标类别"-->
<!-- min-width="130"-->
<!-- >-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="standSortShow"-->
<!-- label="企标类别"-->
<!-- min-width="130"-->
<!-- >-->
<!-- </el-table-column>-->
<el-table-column
label="企标编号"
min-width="130">
<template slot-scope="scope">
<span v-if="dataSource === 'BUSINESS'">
<a v-if="scope.row.standYear" class="table-jump" @click="handlePreview(scope.row)">{{ scope.row.standCode }}-{{ scope.row.standYear }}</a>
<a v-if="scope.row.standYear" class="table-jump" @click="handlePreview(scope.row)">{{
scope.row.standCode
}}-{{ scope.row.standYear }}</a>
<a v-else class="table-jump" @click="handlePreview(scope.row)">{{ scope.row.standCode }}</a>
</span>
<span v-else>
<a v-if="scope.row.standYear" class="table-jump" @click="handlePreview(scope.row)">{{ scope.row.standSortShow }} {{ scope.row.standNumber }}-{{ scope.row.standYear }}</a>
<a v-else @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.standSortShow }} {{ scope.row.standNumber }}</a>
<a v-if="scope.row.standYear" class="table-jump"
@click="handlePreview(scope.row)">{{ scope.row.standSortShow }} {{
scope.row.standNumber
}}-{{ scope.row.standYear }}</a>
<a v-else @click="handlePreview(scope.row)" class="table-jump">{{
scope.row.standSortShow
}} {{ scope.row.standNumber }}</a>
</span>
</template>
</el-table-column>
@@ -130,7 +142,7 @@
width="130">
</el-table-column>
</el-table>
<loading :loading="replaceLoading">{{$t('m.dataAcquisition')}}</loading>
<loading :loading="replaceLoading">{{ $t('m.dataAcquisition') }}</loading>
<!--分页-->
<pagination
style="position: relative;"
@@ -139,13 +151,16 @@
@pageChange="pageChangeReplace"
@pageSizeChange="pageSizeChangeReplace"></pagination>
<div slot="footer" class="demo-drawer-footer">
<el-button class="common-button-default" round 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 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>
</div>
</el-dialog>
</el-col>
<!-- </div>-->
<!-- </div>-->
</template>
@@ -180,7 +195,7 @@ export default {
default: '150px'
}
},
data () {
data() {
return {
replaceLawsNumModel: false,
sarBussionessLawsEO: {
@@ -212,28 +227,28 @@ export default {
}
},
computed: {
placeholder () {
placeholder() {
return `请输入${this.config.attrName}`
},
showMessage () {
showMessage() {
return `${this.config.attrName}不能为空`
},
isRequired () {
isRequired() {
return !!this.config.isMust
}
},
methods: {
getReplaceLawsNumRowSearch () {
getReplaceLawsNumRowSearch() {
this.replaceLawsNumForm.page = 1
this.replacePage = 1
this.getReplaceLawsNumRow()
},
handleChange (event) {
handleChange(event) {
// const value = event.target.value
const value = event
this.$emit('input', value)
},
selectLaws () {
selectLaws() {
// if (this.standNumFlag === 1) {
// this.$refs.selections.selectAll(false)
// }
@@ -242,7 +257,7 @@ export default {
this.getReplaceLawsNumRow()
},
// 代替政策号 请求数据
getReplaceLawsNumRow () {
getReplaceLawsNumRow() {
if (this.sarBussionessLawsEO.replaceLawsNum !== null && this.sarBussionessLawsEO.replaceLawsNum !== '') {
this.replaceLawsNumForm.quoteIdList = this.quoteIdList1.toString() === '' ? '' : this.quoteIdList1
} else {
@@ -277,27 +292,27 @@ export default {
})
},
// 代替政策编号-取消
replaceLawsNumModelCancel () {
replaceLawsNumModelCancel() {
// this.replaceLawsNumModel = false
this.$refs.selections.clearSelection()
},
// 代替政策号 table选择事件
selectReplaceStandNumRowChange (row) {
selectReplaceStandNumRowChange(row) {
this.selectedListRep = row
},
// 代替政策分页
pageChangeReplace (page) {
pageChangeReplace(page) {
this.replacePage = page
this.replaceLawsNumForm.page = page
this.getReplaceLawsNumRow()
},
pageSizeChangeReplace (pageSize) {
pageSizeChangeReplace(pageSize) {
// this.replaceRows = pageSize
this.replaceLawsNumForm.pageSize = pageSize
this.getReplaceLawsNumRow()
},
// 代替政策编号确定
replaceLawsNumModelBt () {
replaceLawsNumModelBt() {
let textArr = []
if (typeof this.value === 'string') {
@@ -342,7 +357,7 @@ export default {
this.$refs.selections.clearSelection()
},
// 点击查看
handlePreview (item) {
handlePreview(item) {
let name = ''
let pageType = ''
switch (this.dataSource) {
@@ -369,7 +384,7 @@ export default {
window.open(routeUrl.href, '_blank')
},
getResetLawsNumRow () {
getResetLawsNumRow() {
this.replaceLawsNumForm = {
dataSource: 'BUSINESS',
numberName: '', // 政策编号
@@ -387,13 +402,23 @@ export default {
</script>
<style scoped lang="less">
/deep/.el-dialog__body {
/deep/ .el-dialog__body {
padding: 0 20px 0;
}
/deep/.el-dialog__footer {
}
/deep/ .el-dialog__footer {
padding: 0 20px 20px;
}
.add-form-item {
/deep/ .el-form-item__content {
.el-textarea {
width: calc(~'100% - 90px');
}
/deep/.input-width input.el-input__inner {
}
}
/deep/ .input-width input.el-input__inner {
width: 220px;
}
}
</style>