Merge remote-tracking branch 'origin/dev_20231201_feizhi' into dev_20231201_feizhi
This commit is contained in:
@@ -0,0 +1,127 @@
|
||||
<template>
|
||||
<div>
|
||||
<!-- 导入模态窗 -->
|
||||
<el-dialog width='400px'
|
||||
v-if="visible"
|
||||
:visible="visible"
|
||||
@close="onClose"
|
||||
title="导入文件"
|
||||
v-dragDialogWidth
|
||||
:close-on-click-modal="false"
|
||||
append-to-body>
|
||||
<el-upload
|
||||
multiple
|
||||
drag
|
||||
:action="action"
|
||||
ref="importfile"
|
||||
:headers="headers"
|
||||
name="file"
|
||||
:accept="accept"
|
||||
:before-upload="beforeUpload"
|
||||
:on-success="onSuccess"
|
||||
:show-file-list="true"
|
||||
>
|
||||
<i class="el-icon-upload" style="color: #3399ff"></i>
|
||||
<div class="el-upload__text">点击或拖拽上传文件</div>
|
||||
</el-upload>
|
||||
</el-dialog>
|
||||
<!-- 导入失败-->
|
||||
<el-dialog :visible.sync="importFailed" :close-on-click-modal="false" width="400px">
|
||||
<p slot="title" style="color:#f60">
|
||||
<span>导入失败</span>
|
||||
</p>
|
||||
<div style="max-height: 300px;overflow: auto;padding: 10px 0;">
|
||||
<p v-html="importForm.content"></p>
|
||||
</div>
|
||||
<div slot="footer" class="demo-drawer-footer">
|
||||
<el-button type="primary" round class="common-button-default" icon="el-icon-check" @click="importFailed = false">
|
||||
确认
|
||||
</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "import",
|
||||
data () {
|
||||
return {
|
||||
headers:{
|
||||
token: JSON.parse(localStorage.getItem('userInfo')).token
|
||||
},
|
||||
importFailed: false,
|
||||
importForm: {}
|
||||
}
|
||||
},
|
||||
props: {
|
||||
accept: {
|
||||
type: String,
|
||||
default: '.pdf, .PDF, .doc, .DOC, .docx, .DOCX, .ppt, .PPT, .pptx, .PPTX, .xls, .XLS, .xlsx, .XLSX, .pdg, .PDG'
|
||||
},
|
||||
action: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
visible: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
size: {
|
||||
type: Number,
|
||||
default: 200
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
onClose () {
|
||||
this.$emit('update:visible', false)
|
||||
},
|
||||
// 导入按钮 上传之前的钩子
|
||||
beforeUpload (file) {
|
||||
const fileName = file.name
|
||||
const fileSuffix = fileName.slice(fileName.lastIndexOf('.') + 1)
|
||||
// 判断上传文件格式
|
||||
const acceptArr = this.accept.split(',').map(type => type.slice(type.lastIndexOf('.') + 1))
|
||||
// 判断上传文件格式
|
||||
if (!acceptArr.includes(fileSuffix)) {
|
||||
this.$message({
|
||||
dangerouslyUseHTMLString: true,
|
||||
message: <div style="word-break: break-all;;color: #F56C6C">文件{file.name}格式不正确,请上传{acceptArr.join('、')}文件</div>,
|
||||
type: 'error'
|
||||
})
|
||||
return false
|
||||
}
|
||||
// 判断文件上传大小
|
||||
if (file.size / 1024 / 1024 > this.size) {// eslint-disable-line
|
||||
this.$message.error('文件' + file.name + `超过${ this.size }M`)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
},
|
||||
// 导入标准数据成功后执行
|
||||
onSuccess(response, file) {
|
||||
if (response.ok) {
|
||||
this.$emit('update:visible', false)
|
||||
this.$emit('onSuccess')
|
||||
this.$message({
|
||||
message: response.message || response.data,
|
||||
type: 'success'
|
||||
})
|
||||
} else {
|
||||
this.importFailed = true
|
||||
this.importForm.content = response.message
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
/deep/ .el-upload-dragger{
|
||||
width: 100% !important;
|
||||
}
|
||||
/deep/ .el-upload{
|
||||
width: 100% !important;
|
||||
|
||||
}
|
||||
</style>
|
||||
+1
-1
@@ -162,7 +162,7 @@ export default {
|
||||
},
|
||||
filterNode(value, data) {
|
||||
if (!value) return true;
|
||||
return data.menuName.indexOf(value) !== -1;
|
||||
return data.name.indexOf(value) !== -1;
|
||||
},
|
||||
treeClick (treeNode) {
|
||||
this.$emit('treeClick', treeNode)
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="lawCode"
|
||||
label="标准编号/政策编号"
|
||||
label="标准编号/政策文号"
|
||||
show-overflow-tooltip
|
||||
align="center"
|
||||
width="180"
|
||||
|
||||
+3
-3
@@ -33,7 +33,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="标准编号/政策编号"
|
||||
label="标准编号/政策文号"
|
||||
show-overflow-tooltip
|
||||
prop="lawCode"
|
||||
align="center"
|
||||
@@ -80,7 +80,7 @@
|
||||
<div class="content">
|
||||
<div class="standard-table-search">
|
||||
<el-form :model="standardSearchForm" inline class="label-input-form search-area">
|
||||
<el-form-item label="标准编号/政策编号" style="margin-right:10px" prop="lawsNumber"
|
||||
<el-form-item label="标准编号/政策文号" style="margin-right:10px" prop="lawsNumber"
|
||||
class="search-item">
|
||||
<el-input v-model="standardSearchForm.lawCode"
|
||||
clearable placeholder="根据编号查找"
|
||||
@@ -150,7 +150,7 @@
|
||||
prop="lawCode"
|
||||
width="200"
|
||||
show-overflow-tooltip
|
||||
label="标准编号/政策编号"
|
||||
label="标准编号/政策文号"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
|
||||
+4
-4
@@ -9,9 +9,9 @@
|
||||
<div class="content">
|
||||
<div class="standard-table-search">
|
||||
<el-form :model="standardSearchForm" inline class="label-input-form search-area">
|
||||
<el-form-item label="政策编号" style="margin-right:10px" prop="lawsNumber" class="search-item">
|
||||
<el-form-item label="政策文号" style="margin-right:10px" prop="lawsNumber" class="search-item">
|
||||
<el-input :disabled="disabledXX"
|
||||
v-model="standardSearchForm.lawsNumber"
|
||||
v-model="standardSearchForm.lawsNo"
|
||||
clearable placeholder="根据编号查找"
|
||||
:maxlength="100"
|
||||
@keyup.enter.native="handleSearchStandard"/>
|
||||
@@ -63,12 +63,12 @@
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="政策编号"
|
||||
label="政策文号"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<a @click="handlePreview(scope.row)" style="color: #409eff;cursor: pointer">{{
|
||||
scope.row.lawsNumber }}</a>
|
||||
scope.row.lawsNo }}</a>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
|
||||
@@ -28,13 +28,13 @@
|
||||
<div class="prc-content-border">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="政策编号"
|
||||
:prop="!disabledXX ? 'lawsNumber':''"
|
||||
<el-form-item label="政策文号"
|
||||
:prop="!disabledXX ? 'lawsNo':''"
|
||||
class="add-form-item form-item-disabled">
|
||||
<el-input :disabled="true"
|
||||
class="formInput"
|
||||
v-model="dataForm.lawsNumber"
|
||||
placeholder="请输入政策编号"
|
||||
v-model="dataForm.lawsNo"
|
||||
placeholder="请输入政策文号"
|
||||
clearable
|
||||
/>
|
||||
<div v-if="!disabledXX" class="addButton" style="padding-left: 10px">
|
||||
@@ -296,8 +296,8 @@
|
||||
drawerModal: false,
|
||||
nodeList: [],
|
||||
formRules: {
|
||||
lawsNumber: [
|
||||
{required: true, message: '请输入政策编号', trigger: 'change'},
|
||||
lawsNo: [
|
||||
{required: true, message: '请输入政策文号', trigger: 'change'},
|
||||
],
|
||||
lawsName: [
|
||||
{required: true, message: '请输入政策名称', trigger: 'change'},
|
||||
@@ -491,7 +491,7 @@
|
||||
this.active = type;
|
||||
},
|
||||
policySolicitingOpinionsForm(row) {
|
||||
this.dataForm.lawsNumber = row.lawsNumber
|
||||
this.dataForm.lawsNo = row.lawsNo
|
||||
this.dataForm.lawsName = row.lawsName
|
||||
this.dataForm.lawsId = row.id
|
||||
this.dataForm = {...this.dataForm}
|
||||
|
||||
@@ -511,7 +511,7 @@ export default {
|
||||
this.qbfsForm.area = this.selectList[0].area.split(',')
|
||||
}
|
||||
if(this.selectList[0].bussSort){
|
||||
this.qbfsForm.bussSort = this.selectList[0].bussSort.split(',')
|
||||
this.qbfsForm.bussSort = this.selectList[0].bussSort
|
||||
}
|
||||
this.qbfsForm.rqbName = this.selectList[0].rqbName
|
||||
this.qbfsForm.tsJsonName = this.selectList[0].tsJsonName
|
||||
|
||||
@@ -531,7 +531,7 @@ export default {
|
||||
this.qbfsForm.area = this.selectList[0].area.split(',')
|
||||
}
|
||||
if(this.selectList[0].bussSort){
|
||||
this.qbfsForm.bussSort = this.selectList[0].bussSort.split(',')
|
||||
this.qbfsForm.bussSort = this.selectList[0].bussSort
|
||||
}
|
||||
this.qbfsForm.rqbName = this.selectList[0].rqbName
|
||||
this.qbfsForm.tsJsonName = this.selectList[0].tsJsonName
|
||||
|
||||
@@ -375,7 +375,7 @@ export default {
|
||||
formLoading:false,
|
||||
formRules: {
|
||||
bussSort: [
|
||||
{ required: true, message: "请选择企标类别", trigger: "blur" }
|
||||
{ required: true, message: "请选择企标类别", trigger: "change" }
|
||||
],
|
||||
renameEs: [
|
||||
{required: true, message: '请输入更名后企标名称', trigger:'blur'},
|
||||
@@ -527,7 +527,7 @@ export default {
|
||||
this.qbfsForm.area = this.selectList[0].area.split(',')
|
||||
}
|
||||
if(this.selectList[0].bussSort){
|
||||
this.qbfsForm.bussSort = this.selectList[0].bussSort.split(',')
|
||||
this.qbfsForm.bussSort = this.selectList[0].bussSort
|
||||
}
|
||||
this.qbfsForm.rqbName = this.selectList[0].rqbName
|
||||
this.qbfsForm.tsJsonName = this.selectList[0].tsJsonName
|
||||
|
||||
@@ -422,24 +422,24 @@ export default {
|
||||
break
|
||||
}
|
||||
this.qbfsForm = item.qbfsForm || item;
|
||||
if (this.qbfsForm.bussSort) {
|
||||
if(this.qbfsForm.bussSort instanceof Array){
|
||||
this.qbfsForm.bussSort = this.qbfsForm.bussSort[0]
|
||||
}else {
|
||||
let val = this.qbfsForm.bussSort.replace('//',"").replace('["',"").replace('"]',"").toString()
|
||||
if (val !== '' && val !== null && typeof (val) !== 'undefined') {
|
||||
if (val instanceof Array) {
|
||||
this.qbfsForm.bussSort = this.form.bussSort.join(",")[0];
|
||||
} else {
|
||||
this.qbfsForm.bussSort = val
|
||||
}
|
||||
} else if (val === '') {
|
||||
this.qbfsForm.bussSort = ""
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.qbfsForm.bussSort = ""
|
||||
}
|
||||
// if (this.qbfsForm.bussSort) {
|
||||
// if(this.qbfsForm.bussSort instanceof Array){
|
||||
// this.qbfsForm.bussSort = this.qbfsForm.bussSort[0]
|
||||
// }else {
|
||||
// let val = this.qbfsForm.bussSort.replace('//',"").replace('["',"").replace('"]',"").toString()
|
||||
// if (val !== '' && val !== null && typeof (val) !== 'undefined') {
|
||||
// if (val instanceof Array) {
|
||||
// this.qbfsForm.bussSort = this.form.bussSort.join(",")[0];
|
||||
// } else {
|
||||
// this.qbfsForm.bussSort = val
|
||||
// }
|
||||
// } else if (val === '') {
|
||||
// this.qbfsForm.bussSort = ""
|
||||
// }
|
||||
// }
|
||||
// } else {
|
||||
// this.qbfsForm.bussSort = ""
|
||||
// }
|
||||
this.formLoading = false;
|
||||
// this.commentText = item.commentText
|
||||
this.roleForm.dockUser = item.dockUser || item.roleForm.dockUser;
|
||||
|
||||
@@ -550,7 +550,7 @@ export default {
|
||||
if(this.type !== '5'){
|
||||
let params = {
|
||||
json,
|
||||
sort:this.qbfsForm.bussSort[0],
|
||||
sort:this.qbfsForm.bussSort,
|
||||
prcName:this.qbfsForm.esName
|
||||
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<div class="search-area">
|
||||
<div class="left">
|
||||
<el-form :modal="sarSarAccessEOSearch" :inline="true" class="label-input-form" >
|
||||
<el-form-item label="标准编号/政策编号:" class="search-item search-item-last">
|
||||
<el-form-item label="标准编号/政策文号:" class="search-item search-item-last">
|
||||
<el-input
|
||||
v-model="sarSarAccessEOSearch.lawCode"
|
||||
placeholder="请输入"
|
||||
@@ -90,7 +90,7 @@
|
||||
<el-table-column
|
||||
prop="lawCode"
|
||||
width="250"
|
||||
label="标准编号/政策编号"
|
||||
label="标准编号/政策文号"
|
||||
align="center">
|
||||
<template slot-scope="scope">
|
||||
<a @click="handlePreviewAA(scope.row)" style="cursor: pointer">{{ scope.row.lawCode }}</a>
|
||||
@@ -172,7 +172,7 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="标准编号/政策编号"
|
||||
label="标准编号/政策文号"
|
||||
prop="lawCode"
|
||||
class="add-form-item"
|
||||
>
|
||||
@@ -295,7 +295,7 @@
|
||||
<el-option value="BUSINESS_STAND" label="企业标准库"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="标准编号/政策编号" class="search-item">
|
||||
<el-form-item label="标准编号/政策文号" class="search-item">
|
||||
<el-input
|
||||
v-model="handleSelectForm.lawNumber"
|
||||
@change="lawNumberSearch"
|
||||
@@ -806,7 +806,7 @@ export default {
|
||||
addOrEdit: '',
|
||||
attributeEOFormRules: {
|
||||
lawCode: [
|
||||
{ required: true, message: '标准编号/政策编号不能为空', trigger: 'change' },
|
||||
{ required: true, message: '标准编号/政策文号不能为空', trigger: 'change' },
|
||||
],
|
||||
lawName: [
|
||||
{ required: true, message: '标准名称/政策名称不能为空', trigger: 'change' },
|
||||
|
||||
@@ -63,18 +63,21 @@
|
||||
v-btn-permission="'66ae947771821e3bd064c5594a14d145'"
|
||||
@click="addData"><i class="el-icon-plus"></i>新增
|
||||
</el-button>
|
||||
<!-- <el-button class="common-button-default in-button"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- @click=""><i class="iconfont"></i>导入-->
|
||||
<!-- </el-button>-->
|
||||
<el-button class="common-button-default in-button"
|
||||
size="mini"
|
||||
v-btn-permission="'666603f1e48c944a0188d6c6e725033a'"
|
||||
@click="addImportModal"><i class="iconfont"></i>导入
|
||||
</el-button>
|
||||
<el-button class="common-button-default export-button"
|
||||
size="mini"
|
||||
v-btn-permission="'f919276a703d3c9062f6a69f6f0400cc'"
|
||||
@click="exportData"><i class="iconfont"></i>导出
|
||||
</el-button>
|
||||
<!-- <el-button class="common-button-default"-->
|
||||
<!-- size="mini" @click=""><i class="iconfont"></i>下载-->
|
||||
<!-- </el-button>-->
|
||||
<el-button class="common-button-default in-button"
|
||||
size="mini"
|
||||
v-btn-permission="'0a1b99b3c9d88c4390dfd6f54fe85801'"
|
||||
@click="handleMoudel"><i class="iconfont"></i>模板下载
|
||||
</el-button>
|
||||
<el-button class="common-button-default"
|
||||
size="mini"
|
||||
v-btn-permission="'74c437f9bfce7198144aa08e9a52950e'"
|
||||
@@ -752,20 +755,27 @@
|
||||
</div>
|
||||
<!--导出文件改名字模态框-->
|
||||
<exportDialog ref="exportDialogRef" @exportName="handleExport" />
|
||||
<Import :visible.sync="importModalShowFlag" :action="importExcelUrl" accept=".xls, .XLS, .xlsx, .XLSX" @onSuccess="getData"></Import>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CustomInputForAllStandards2 from '@/components/CustomFormComponents/InputForAllStandards2'
|
||||
import exportDialog from './components/exportDialog'
|
||||
import Import from '@/components/hzwlComponents/Import'
|
||||
|
||||
export default {
|
||||
name: "enterpriseStandardPlan",
|
||||
components: {
|
||||
exportDialog,
|
||||
Import,
|
||||
CustomInputForAllStandards2
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 导入
|
||||
importModalShowFlag: false,
|
||||
importExcelUrl: '',
|
||||
workData: [],
|
||||
workGroupLoading: false,
|
||||
workTotal: 0,
|
||||
@@ -918,6 +928,15 @@
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
// 导入
|
||||
addImportModal() {
|
||||
this.importModalShowFlag = true
|
||||
this.importExcelUrl = '/api/esRevisePlan/es-revise-plan/importEsRevisePlan'
|
||||
},
|
||||
// 模板下载
|
||||
handleMoudel(){
|
||||
window.open('/api/esRevisePlan/es-revise-plan/exportTemplateFile?fileName=企标计划模板')
|
||||
},
|
||||
exportData () {
|
||||
this.$refs.exportDialogRef.openModel()
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user