Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
zhutianqi
2021-12-16 18:04:31 +08:00
19 changed files with 944 additions and 69 deletions
+7
View File
@@ -282,6 +282,13 @@
menuId: 'asfdew33',
isChildren: true // 判断没有子菜单
},
{
title: '资料中心',
path: '/dataCenter',
'icon-class': 'el-icon-s-order',
menuId: '',
isChildren: true // 判断没有子菜单
},
// {
// title: '技术要求清单',
// path: '/skillReq',
@@ -1124,15 +1124,26 @@ export default {
if (this.dataList.length < 1) {
this.$message.warning("标准不能为空");
} else {
this.listForm.commentText = this.commentText;
this.listForm.fileName = this.fileInfoList;
this.listForm.commentText = this.commentText
this.listForm.fileName = this.fileInfoList
var json = Object.assign(this.listForm, this.roleForm);
this.$refs["qdfbForm"].validate((valid) => {
if (valid) {
this.$refs["Form"].validate((valid) => {
if (valid) {
this.isSubmit = true;
this.$http.get("lawss/activiti/startProcess", { type: "4" }, {
this.isSubmit = true
this.$http.post("lawss/activiti/startProcessRollBack", {
id: this.bpnId || '',
createUser: this.$store.getters.userInfo.userId,
createUserName: this.$store.getters.userInfo.userName,
type: '4',
json: JSON.stringify({
taskInfo: '引入法规标准清单',
form: this.listForm,
roleForm: this.roleForm,
commentText: this.commentText
})
}, {
_this: this
}, res => {
if (res.ok) {
@@ -1145,17 +1156,9 @@ export default {
}, res => {
if (res.success) {
this.$message.success(res.message);
if (this.bpnId !== '') {
let taskId = {
id: this.bpnId
}
taskDel(taskId).then(res=>{
return res
})
}
this.$router.push("/processCenter");
}
this.isSubmit = false;
this.isSubmit = false
});
}
});
@@ -185,7 +185,16 @@ export default {
this.$refs["Form"].validate((valid) => {
if (valid) {
this.isSubmit = true
this.$http.get("lawss/activiti/startProcess", {type: "15"}, {
this.$http.post("lawss/activiti/startProcessRollBack", {
id: this.bpnId || '',
createUser: this.$store.getters.userInfo.userId,
createUserName: this.$store.getters.userInfo.userName,
type: '15',
json: JSON.stringify({
taskInfo: '备案任务下发',
roleForm: this.roleForm,
})
}, {
_this: this
}, res => {
if (res.ok) {
@@ -583,7 +583,17 @@ export default {
this.qbfsForm.fileList = this.fileList
this.qbfsForm.commentText = this.commentText
var json = Object.assign(this.qbfsForm, this.roleForm)
this.$http.get('lawss/activiti/startProcess', {type: '23'}, {
this.$http.post('lawss/activiti/startProcessRollBack', {
id: this.bpnId || '',
createUser: this.$store.getters.userInfo.userId,
createUserName: this.$store.getters.userInfo.userName,
type: '23',
json: JSON.stringify({
roleForm: this.roleForm,
qbfsForm: this.qbfsForm,
commentText: this.commentText
})
}, {
_this: this
}, res => {
if (res.ok) {
@@ -624,7 +624,17 @@ export default {
this.isSubmit = true
this.standardSearch.commentText = this.commentText
var json = Object.assign(this.standardSearch, this.roleForm)
this.$http.get('lawss/activiti/startProcess', {type: '24'}, {
this.$http.post('lawss/activiti/startProcessRollBack', {
id: this.bpnId || '',
createUser: this.$store.getters.userInfo.userId,
createUserName: this.$store.getters.userInfo.userName,
type: '24',
json: JSON.stringify({
roleForm: this.roleForm,
qbfsForm: this.standardSearch,
commentText: this.commentText
})
}, {
_this: this
}, res => {
if (res.ok) {
@@ -474,9 +474,17 @@ export default {
if (valid) {
// this.isSubmit = true;
var json = Object.assign(qbzxdFrom, this.roleForm);
console.log(json);
return
this.$http.get("lawss/activiti/startProcess", { type: "25" }, {
this.$http.post("lawss/activiti/startProcessRollBack", {
id: this.bpnId || '',
createUser: this.$store.getters.userInfo.userId,
createUserName: this.$store.getters.userInfo.userName,
type: '25',
json: JSON.stringify({
roleForm: this.roleForm,
qbfsForm: qbzxdFrom,
commentText: this.commentText
})
}, {
_this: this
}, res => {
if (res.ok) {
@@ -680,7 +680,17 @@ export default {
this.$refs["Form"].validate((valid) => {
if (valid) {
this.isSubmit = true
this.$http.get("lawss/activiti/startProcess", {type: "16"}, {
this.$http.post("lawss/activiti/startProcessRollBack", {
id: this.bpnId || '',
createUser: this.$store.getters.userInfo.userId,
createUserName: this.$store.getters.userInfo.userName,
type: '16',
json: JSON.stringify({
roleForm: this.roleForm,
dataList: this.dataList,
commentText: this.commentText
})
}, {
_this: this
}, res => {
if (res.ok) {
@@ -854,14 +854,14 @@ export default {
if (this.dataList.length < 1) {
this.satisfyFlag = false
this.$message.warning("请添加产品线信息");
}else{
}else {
this.satisfyFlag = true
}
this.dataList.forEach(item => {
if (!item.distributePerson) {
this.satisfyFlag = false
this.$message.warning("请选择分发责任人");
}else{
}else {
this.satisfyFlag = true
}
});
@@ -874,7 +874,18 @@ export default {
if (valid) {
this.$refs["roleForm"].validate((valid) => {
if (valid) {
this.$http.get("lawss/activiti/startProcess", { type: "5" }, {
this.$http.post("lawss/activiti/startProcessRollBack", {
id: this.bpnId || '',
createUser: this.$store.getters.userInfo.userId,
createUserName: this.$store.getters.userInfo.userName,
type: '5',
json: JSON.stringify({
taskInfo: "选择已拆分标准",
form: this.listForm,
roleForm: this.roleForm,
commentText: this.commentText
})
}, {
_this: this
}, res => {
if (res.ok) {
@@ -887,14 +898,6 @@ export default {
}, res => {
if (res.success) {
this.$message.success(res.message);
if (this.bpnId !== '') {
let taskId = {
id: this.bpnId
}
taskDel(taskId).then(res=>{
return res
})
}
this.$router.push("/processCenter");
}
this.isSubmit = false;
@@ -867,7 +867,18 @@ export default {
if (valid) {
this.$refs["roleForm"].validate((valid) => {
if (valid) {
this.$http.get("lawss/activiti/startProcess", { type: "5" }, {
this.$http.post("lawss/activiti/startProcessRollBack", {
id: this.bpnId || '',
createUser: this.$store.getters.userInfo.userId,
createUserName: this.$store.getters.userInfo.userName,
type: '5',
json: JSON.stringify({
taskInfo: "选择已拆分标准",
form: this.listForm,
roleForm: this.roleForm,
commentText: this.commentText
})
}, {
_this: this
}, res => {
if (res.ok) {
@@ -612,7 +612,17 @@ export default {
this.$refs["roleForm"].validate((valid) => {
if (valid) {
this.isSubmit = true;
this.$http.get("lawss/activiti/startProcess", { type: "6" }, {
this.$http.post("lawss/activiti/startProcessRollBack", {
id: this.bpnId || '',
createUser: this.$store.getters.userInfo.userId,
createUserName: this.$store.getters.userInfo.userName,
type: '6',
json: JSON.stringify({
form: this.listForm,
roleForm: this.roleForm,
commentText: this.commentText
})
}, {
_this: this
}, res => {
if (res.ok) {
@@ -625,14 +635,6 @@ export default {
}, res => {
if (res.success) {
this.$message.success(res.message);
if (this.bpnId !== '') {
let taskId = {
id: this.bpnId
}
taskDel(taskId).then(res=>{
return res
})
}
this.$router.push("/processCenter");
}
this.isSubmit = false;
@@ -647,7 +649,7 @@ export default {
return this.$message.warning("请完善基础信息");
}
});
}
}
}
},
choiceZRR(type, title, id) {
@@ -629,7 +629,17 @@ export default {
this.$refs["roleForm"].validate((valid) => {
if (valid) {
this.isSubmit = true;
this.$http.get("lawss/activiti/startProcess", { type: "6" }, {
this.$http.post("lawss/activiti/startProcessRollBack", {
id: this.bpnId || '',
createUser: this.$store.getters.userInfo.userId,
createUserName: this.$store.getters.userInfo.userName,
type: '6',
json: JSON.stringify({
form: this.listForm,
roleForm: this.roleForm,
commentText: this.commentText
})
}, {
_this: this
}, res => {
if (res.ok) {
@@ -655,7 +655,18 @@ export default {
this.$refs["Form"].validate((valid) => {
if (valid) {
this.isSubmit = true;
this.$http.get("lawss/activiti/startProcess", { type: "10" }, {
this.$http.post("lawss/activiti/startProcessRollBack", {
id: this.bpnId || '',
createUser: this.$store.getters.userInfo.userId,
createUserName: this.$store.getters.userInfo.userName,
type: '10',
json: JSON.stringify({
taskInfo: "产品经理分发",
form: this.qdform,
roleForm: this.roleForm,
commentText: this.commentText
})
}, {
_this: this
}, res => {
if (res.ok) {
@@ -668,14 +679,6 @@ export default {
}, res => {
if (res.success) {
this.$message.success(res.message);
if (this.bpnId !== '') {
let taskId = {
id: this.bpnId
}
taskDel(taskId).then(res=>{
return res
})
}
this.$router.push("/processCenter");
}
this.isSubmit = false;
@@ -659,7 +659,18 @@ export default {
this.$refs["Form"].validate((valid) => {
if (valid) {
this.isSubmit = true;
this.$http.get("lawss/activiti/startProcess", { type: "10" }, {
this.$http.post("lawss/activiti/startProcessRollBack", {
id: this.bpnId || '',
createUser: this.$store.getters.userInfo.userId,
createUserName: this.$store.getters.userInfo.userName,
type: '10',
json: JSON.stringify({
taskInfo: "产品经理分发",
form: this.qdform,
roleForm: this.roleForm,
commentText: this.commentText
})
}, {
_this: this
}, res => {
if (res.ok) {
@@ -125,7 +125,7 @@
</el-card>
</div>
<div class="process-name">
<el-card shadow="hover" v-btn-permission="'90c7bae6308595f053c6f6f90167e493'">
<el-card shadow="hover" v-btn-permission="'a5694521151720f41a8b22d550bf435a'">
<div class="card-box" @click="handleCreateProcess('13')">
<div class="card-top">
<div class="card-top-left">
@@ -140,7 +140,7 @@
</el-card>
</div>
<div class="process-name">
<el-card shadow="hover">
<el-card shadow="hover" v-btn-permission="'14f54ef4475d9210b1ee7872ab69eca8'">
<div class="card-box" @click="handleCreateProcess('11')">
<div class="card-top">
<div class="card-top-left">
@@ -155,7 +155,7 @@
</el-card>
</div>
<div class="process-name">
<el-card shadow="hover">
<el-card shadow="hover" v-btn-permission="'9c8cc1b74b1caa16f34a47895b489833'">
<div class="card-box" @click="handleCreateProcess('laws1')">
<div class="card-top">
<div class="card-top-left">
@@ -190,7 +190,7 @@
<el-divider content-position="left"><h2>企业标准相关流程</h2></el-divider>
<div class="process-box">
<div class="process-name">
<el-card shadow="hover" v-btn-permission="''">
<el-card shadow="hover" v-btn-permission="'7a53ef593e5401aab19485b937ce78a0'">
<div class="card-box" @click="handleCreateProcess('buss1')">
<div class="card-top">
<div class="card-top-left">
@@ -205,7 +205,7 @@
</el-card>
</div>
<div class="process-name">
<el-card shadow="hover">
<el-card shadow="hover" v-btn-permission="'5af5073695c2e1d12ca3d5a6afae67b5'">
<div class="card-box" @click="handleCreateProcess('23')">
<div class="card-top">
<div class="card-top-left">
@@ -220,7 +220,7 @@
</el-card>
</div>
<div class="process-name">
<el-card shadow="hover">
<el-card shadow="hover" v-btn-permission="'5104360fd3822e73b45e65d2337cf143'">
<div class="card-box" @click="handleCreateProcess('24')">
<div class="card-top">
<div class="card-top-left">
@@ -235,7 +235,7 @@
</el-card>
</div>
<div class="process-name">
<el-card shadow="hover">
<el-card shadow="hover" v-btn-permission="'afa3d1aee5fd8027b18675621afdeff6'">
<div class="card-box" @click="handleCreateProcess('25')">
<div class="card-top">
<div class="card-top-left">
@@ -256,7 +256,7 @@
<el-divider content-position="left"><h2>标准化活动相关流程</h2></el-divider>
<div class="process-box">
<div class="process-name">
<el-card shadow="hover" v-btn-permission="'2e3f4c0aaf77629755533255f1335801'">
<el-card shadow="hover" v-btn-permission="'b196ef0253cebd1adfc3a8432a28e377'">
<div class="card-box" @click="handleCreateProcess('17')">
<div class="card-top">
<div class="card-top-left">
@@ -271,7 +271,7 @@
</el-card>
</div>
<div class="process-name">
<el-card shadow="hover" v-btn-permission="'d415c764036a02559976b41b9dfe2cf1'">
<el-card shadow="hover" v-btn-permission="'2f2752bc8a37b87d6eaadae3fcfe61c4'">
<div class="card-box" @click="handleCreateProcess('18')">
<div class="card-top">
<div class="card-top-left">
@@ -301,7 +301,7 @@
</el-card>
</div>
<div class="process-name">
<el-card shadow="hover">
<el-card shadow="hover" v-btn-permission="'321e497259b08734941a308960da2bae'">
<div class="card-box" @click="handleCreateProcess('21')">
<div class="card-top">
<div class="card-top-left">
@@ -316,7 +316,7 @@
</el-card>
</div>
<div class="process-name">
<el-card shadow="hover">
<el-card shadow="hover" v-btn-permission="'8f65a365dd67634e29925098162ee8d5'">
<div class="card-box" @click="handleCreateProcess('16')">
<div class="card-top">
<div class="card-top-left">
@@ -331,7 +331,7 @@
</el-card>
</div>
<div class="process-name">
<el-card shadow="hover">
<el-card shadow="hover" v-btn-permission="'e5217a4776525b1ba63511b730a2e02d'">
<div class="card-box" @click="handleCreateProcess('15')">
<div class="card-top">
<div class="card-top-left">
@@ -346,7 +346,7 @@
</el-card>
</div>
<div class="process-name">
<el-card shadow="hover">
<el-card shadow="hover" v-btn-permission="'0efd0f4b7a15fd1b687cc0ac36e9e7d9'">
<div class="card-box" @click="handleCreateProcess('14')">
<div class="card-top">
<div class="card-top-left">
@@ -0,0 +1,306 @@
<template>
<div class="dataCenterDetail">
<div class="contentTitle">
<div class="back" title="返回" @click="back">
<i class="el-icon-back"></i>
</div>
<div class="title">
{{ detailInfoForm.dataTitle + '-详情' }}
</div>
</div>
<transition name="el-zoom-in-top">
<div class="transition-box">
<p class="transition-box-p">
<label class="transition-box-label">类型</label>
<span class="transition-box-span">
{{ detailInfoForm.dataType }}
</span>
</p>
<p class="transition-box-p">
<label class="transition-box-label">资料标题</label>
<span class="transition-box-span">{{ detailInfoForm.dataTitle }}</span>
</p>
<div class="transition-box-p">
<label class="transition-box-label">附件</label>
<div class="file-box" v-if="fileList.length > 0">
<p v-for="item in fileList"
:key="item.id">
<a @click="openFileInPdf(item.id, item.name)" target="_blank">{{ item.name }}</a>
<i
title="下载"
@click="downloadFile(item.id)"
class="icon-download"
v-btn-permission="''"
/>
<!-- <i-->
<!-- title="下载带水印"-->
<!-- @click="downloadFileByWater(item.id,item.name)"-->
<!-- class="icon-download2"-->
<!-- v-btn-permission="''"-->
<!-- />-->
</p>
</div>
</div>
</div>
</transition>
</div>
</template>
<script>
export default {
name: "dataCenterDetail",
data() {
return {
detailInfoForm: {},
detailInfoId: '',
fileList: []
}
},
methods: {
openFileInPdf(attId, oldFileName) {
// 判断是否是图片格式,图片格式不预览,直接下载
let index1 = oldFileName.lastIndexOf('.')
let index2 = oldFileName.length
let fileSuffix = oldFileName.substring(index1, index2)
//把后缀转大写
if (fileSuffix !== undefined && fileSuffix !== null) {
fileSuffix = fileSuffix.toUpperCase()
}
// 判断上传文件格式
if (fileSuffix === '.PNG' || fileSuffix === '.JPG' || fileSuffix === '.JPEG') {
this.downloadFile(attId)
return true
}
// 缺少文件
if (fileSuffix === '.PDG' || fileSuffix === '.pdg') {
this.getBusStandFileByAttId(attId)
.then(res => {
if (res) {
const editFileInfo = res
console.log(editFileInfo)
if (editFileInfo.fileSuffix === 'pdg' || editFileInfo.fileSuffix === 'PDG') {
window.open('book://ssreader/e0?url=' + editFileInfo.downLoadUrl)
} else {
const nowTime = new Date().getTime()
// window.open('http://127.0.0.1:8012/onlinePreview?url='+encodeURIComponent(Base64.encode(editFileInfo.downLoadUrl)));
// window.open('/static/onlyOffice/onlinePreview.html?oldFileName=' + editFileInfo.oldFileName + '&fileType=' + editFileInfo.fileSuffix + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id + nowTime+'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName)
}
// window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + editFileInfo.id))
}
// switch (res.convertState) {
// case 'ERROR':
// this.$message.warning('文档转换失败')
// break
// case 'LODING':
// this.$message.info('文档转换中,请稍后查看')
// break
// case 'SUCCESS':
// const { convertFileInfo } = res
// window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + convertFileInfo.id))
// break
// }
}).catch(e => {
console.log(e)
this.$message.warning('文件不存在,预览失败')
})
} else {
this.$http.get('lawss/sarStandFile/queryConvertAtt', {
attId: attId
}, {
_this: this
}, res => {
console.log("res.data", res.data);
if (res.data) {
let fileObj = {}
fileObj.fileId = res.data.attId
fileObj.fileName = oldFileName
let fileList = []
let repeatData = 0
if (sessionStorage.getItem('fileInfo')) {
fileList = JSON.parse(sessionStorage.getItem('fileInfo'))
if (fileList != null && fileList.length > 0) {
for (let i = 0; i < fileList.length; i++) {
if (fileList[i].fileId === res.data.attId) {
repeatData = 1
break
}
}
if (repeatData === 0) {
fileList.push(fileObj)
fileList = JSON.stringify(fileList)
sessionStorage.setItem('fileInfo', fileList)
}
}
} else {
fileList.push(fileObj)
fileList = JSON.stringify(fileList)
sessionStorage.setItem('fileInfo', fileList)
}
window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + res.data.attId))
} else {
this.$message.error('文档未转换成功或本地读取不到该文档')
}
}, e => {
this.$message.error('文档未转换成功或本地读取不到该文档')
})
}
},
back() {
this.$router.push({name: "dataCenter"});
},
/**
* @Description: 点击下载
* @author zmf
* @date 2021/3/16
*/
downloadFile(attId) {
if (attId != null && attId !== "") {
window.location.href = "/api/att/attFile/downloadFileForSar?fileId=" + attId;
} else {
this.$message.error("请选择要下载的文件");
}
},
downloadFileByWater(attId, fileSuffix) {
let fileExtension = fileSuffix.substring(fileSuffix.lastIndexOf(".") + 1);
if (fileExtension !== "pdf" && fileExtension !== "PDF") {
this.$message.error("水印下载仅支持PDF,pdf格式文件");
} else {
if (attId != null && attId !== "") {
window.location.href = "/api/att/attFile/downloadFileForSarWaterMark?fileId=" + attId;
} else {
this.$message.error("请选择要下载的文件");
}
}
},
// 请求上传的文件信息
getFile(fileId) {
this.$http.get("att/attFile/getMultiFileInfos", {
fileIds: fileId
}, {
_this: this
}, res => {
console.log('64', res)
this.$nextTick(() => {
res.data.map(item => {
// 赋值要回显的上传文件内容
this.fileList.push({
name: item.oldFileName,
uid: item.uid,
status: item.status,
id: item.id
});
});
});
}, e => {
});
},
},
created() {
this.detailInfoId = this.$route.params.id
console.log('13', this.$route.params.id)
},
mounted() {
let fileId
this.$http.get('fileMaterialCenter/file-material', {id: this.detailInfoId}, {
_this: this
}, res => {
this.detailInfoForm = res.data.records[0]
fileId = this.detailInfoForm.attachFileId
this.getFile(fileId)
}, e => {
})
}
}
</script>
<style scoped lang="less">
.dataCenterDetail {
height: 100%;
background-color: white;
.contentTitle {
display: flex;
align-items: center;
padding: 0 10px;
height: 50px;
background: #ffffff;
.title {
flex: 1;
font-weight: bold;
font-size: 20px;
margin-left: 15px;
.el-icon-s-order {
font-size: 22px;
color: #4498F0;
cursor: pointer;
}
}
}
.transition-box {
padding: 0 10px;
background: #ffffff;
font-size: 14px;
.transition-box-p {
line-height: 35px;
.transition-box-label {
display: inline-block;
width: 100px;
vertical-align: top;
}
.transition-box-span {
display: inline-block;
width: calc(~'100% - 100px');
}
.file-box {
display: inline-block;
width: calc(~'100% - 100px');
.transition-box-span {
display: inline;
width: 100%;
cursor: pointer;
color: #4498f0;
}
p {
& > a {
cursor: pointer;
}
& > i {
display: inline-block;
margin-left: 3px;
width: 18px;
height: 16px;
background-repeat: no-repeat;
background-size: 100% 100%;
background-position: center center;
vertical-align: sub;
cursor: pointer;
}
.icon-download {
background-image: url("~assets/images/shangqi/img/download.png");
}
.icon-download2 {
background-image: url("~assets/images/shangqi/img/download2.png");
}
}
}
}
}
}
</style>
@@ -0,0 +1,447 @@
<template>
<div id="dataCenter">
<div class="search-area">
<el-form :modal="dataCenterSearch" :inline="true">
<el-form-item label="类型:">
<el-input
size="small"
v-model="dataCenterSearch.dataType"
placeholder="请输入类型"
></el-input>
</el-form-item>
<el-form-item label="资料标题:">
<el-input
size="small"
v-model="dataCenterSearch.dataTitle"
placeholder="请输入资料标题"
clearable
></el-input>
</el-form-item>
<el-form-item label="上传时间:">
<el-date-picker
v-model="dataCenterSearch.dataUploadTime"
clearable
value-format="yyyy-MM-dd HH:mm:ss"
size="small"
type="datetimerange"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button
type="primary"
size="mini"
@click="searchInfo">
查询
</el-button>
</el-form-item>
<el-form-item>
<el-button
@click="clearSearch"
size="mini">清空
</el-button>
</el-form-item>
</el-form>
</div>
<div class="operate-area" style="margin: 0 0 10px 0">
<el-button
size="mini"
type="primary"
@click="addInfo">新增
</el-button>
</div>
<div class="table-area">
<el-table
:data="dataCenterTable"
tooltip-effect="dark"
style="width: 100%"
border
height="475px"
:header-cell-style="{background: '#f5f1f1', color: '#333333', fontSize: '16px',
fontWeight: 'bold', height: '48px'}"
>
<el-table-column
type="index"
width="55"
label="序号"
align="center">
</el-table-column>
<el-table-column
prop="dataType"
width="250"
label="类型"
align="center">
</el-table-column>
<el-table-column
prop="dataTitle"
min-width="250"
label="资料标题"
align="center">
<template slot-scope="scope">
<span @click.stop="toDetail(scope.row)" style="cursor:pointer;color: #409eff">{{ scope.row.dataTitle }}</span>
</template>
</el-table-column>
<el-table-column
prop="dataUploadTime"
width="250"
label="上传时间"
align="center">
<template slot-scope="scope">
<span>{{ $moment(scope.row.dataUploadTime).format("YYYY-MM-DD HH:mm:ss") }}</span>
</template>
</el-table-column>
<el-table-column
label="操作"
align="center">
<template slot-scope="scope">
<el-button
size="mini"
type="primary"
@click="editInfo(scope.row)"
>编辑
</el-button>
<el-button
size="mini"
type="danger"
@click="deleteInfo(scope.row)"
>删除
</el-button>
</template>
</el-table-column>
</el-table>
<loading :loading="loading">数据获取中</loading>
<pagination :page="dataCenterSearch.page" :total="dataCenterSearch.total" @pageChange="pageChange"
@pageSizeChange="pageSizeChange"></pagination>
</div>
<el-drawer
:title="attributeTitle"
:wrapperClosable="false"
:visible.sync="showInfoModal"
size="800px"
:styles="styles"
:close="cancelModel"
>
<div style="margin-left: 3%">
<el-form
ref="attributeEO"
:model="attributeEO"
:rules="attributeEOFormRules"
class="label-input-form"
label-width="130px"
v-if="showInfoModal"
>
<el-form-item
label="类型"
prop="dataType"
class="add-form-item"
>
<el-input
v-model="attributeEO.dataType"
placeholder="请输入类型"
clearable
/>
</el-form-item>
<el-form-item
label="资料标题"
prop="dataTitle"
class="add-form-item"
>
<el-input
v-model="attributeEO.dataTitle"
placeholder="请输入资料标题"
clearable
/>
</el-form-item>
<el-form-item
label="附件"
prop="attachFileId"
class="add-form-item"
>
<el-upload
class="upload-demo"
action="/api/att/attFile/upload"
:on-preview="handlePreview"
:on-remove="handleRemove"
:before-remove="beforeRemove"
multiple
:limit="3"
:on-exceed="handleExceed"
:on-success="uploadSuccess"
:file-list="fileList">
<el-button size="small" type="primary">点击上传</el-button>
</el-upload>
</el-form-item>
</el-form>
<div style="float: right">
<el-button
type="primary"
class="common-button-primary"
size="mini"
icon="el-icon-check"
@click="saveInfo"
>提交
</el-button
>
<el-button
size="mini"
icon="el-icon-close"
class="common-button-default"
@click="cancelModel"
>取消
</el-button
>
</div>
</div>
</el-drawer>
</div>
</template>
<script>
export default {
name: "dataCenter",
data() {
return {
loading: false,
fileList: [],
attributeTitle: '',
showInfoModal: false,
styles: {
height: 'calc(100% - 55px)',
overflow: 'auto',
paddingBottom: '53px',
position: 'static'
},
attributeEO: {
dataType: '',
dataTitle: '',
attachFileId: '',
},
attributeEOFormRules: {
dataType: [
{required: true, message: '类型不能为空', trigger: 'change'},
],
dataTitle: [
{required: true, message: '资料标题不能为空', trigger: 'change'},
]
},
dataCenterSearch: {
dataType: '',
dataTitle: '',
dataUploadTime: [],
page: 1,
pageSize: this.$store.getters.userInfo.configContent,
total: 0
},
dataCenterTable: []
}
},
methods: {
toDetail(row){
console.log('243',row)
this.$router.push({
name: "dataCenterDetail",
params: {
id: row.id
}
});
},
uploadSuccess(response, file, fileList) {
console.log('240',fileList)
const fileIdList = fileList.map(item => {
if (item.response){
return item.response.data.attId
}else {
return item.id
}
})
this.attributeEO.attachFileId = fileIdList.join(',')
console.log('343',this.fileList)
console.log('349',this.attributeEO.attachFileId)
},
handleRemove(file, fileList) {
const fileIdList = fileList.map(item => {
if (item.response){
return item.response.data.attId
}else {
return item.id
}
})
this.attributeEO.attachFileId = fileIdList.join(',')
},
handlePreview(file) {
},
handleExceed(files, fileList) {
this.$message.warning(`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`);
},
beforeRemove(file, fileList) {
return this.$confirm(`确定移除 ${file.name}`);
},
deleteInfo(row) {
this.$confirm('您是否确定删除该数据?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let deleteId = row.id
this.$http.delete('fileMaterialCenter/file-material', {id: deleteId}, {
_this: this
}, res => {
if (res.ok) {
this.$message.success('删除成功')
this.searchInfo()
}
}, e => {
console.log(e)
})
}).catch(() => {
})
},
pageChange(page) {
this.dataCenterSearch.page = page
this.searchInfo()
},
pageSizeChange(pageSize) {
this.dataCenterSearch.page = 1
this.dataCenterSearch.pageSize = pageSize
this.searchInfo()
},
searchInfo() {
this.dataCenterSearch.startDataUploadTime = this.dataCenterSearch.dataUploadTime[0]
this.dataCenterSearch.endDataUploadTime = this.dataCenterSearch.dataUploadTime[1]
this.$http.get('fileMaterialCenter/file-material', this.dataCenterSearch, {
_this: this
}, res => {
this.dataCenterTable = res.data.records
this.dataCenterSearch.total = res.data.total
}, e => {
console.log(e)
})
},
clearSearch() {
this.dataCenterSearch = {
dataType: '',
dataTitle: '',
dataUploadTime: '',
page: 1,
pageSize: this.$store.getters.userInfo.configContent,
}
this.searchInfo()
},
addInfo() {
this.showInfoModal = true
this.attributeTitle = '新增'
this.attributeEO = {
dataType: '',
dataTitle: '',
attachFileId: '',
}
this.fileList = []
},
editInfo(row) {
this.showInfoModal = true
this.attributeTitle = '编辑'
this.attributeEO = row
this.fileList = []
// 请求上传的文件信息
this.$http.get("att/attFile/getMultiFileInfos", {
fileIds: row.attachFileId
}, {
_this: this
}, res => {
this.$nextTick(() => {
res.data.map(item => {
// 赋值要回显的上传文件内容
this.fileList.push({
name: item.oldFileName,
uid: item.uid,
status: item.status,
id: item.id
});
});
});
}, e => {
});
console.log('343',this.fileList)
console.log('349',this.attributeEO.attachFileId)
// const fileIdList = this.fileList.map(item => {
// return item.id
// })
// this.attributeEO.attachFileId = fileIdList.join(',')
},
saveInfo() {
this.$refs['attributeEO'].validate((valid) => {
if (valid && this.attributeEO.attachFileId !== '') {
if (this.attributeTitle === '新增'){
this.$http.postData(
'fileMaterialCenter/file-material',
this.attributeEO,
{
_this: this,
},
(res) => {
if (res.ok) {
this.$message.success('新增成功')
this.cancelModel()
this.searchInfo()
}
}
)
}else {
this.$http.putData(
'fileMaterialCenter/file-material',
this.attributeEO,
{
_this: this,
},
(res) => {
if (res.ok) {
this.$message.success('修改成功')
this.cancelModel()
this.searchInfo()
}
}
)
}
} else {
this.$message.error('附件不能为空')
}
})
},
cancelModel() {
this.$nextTick(() => {
this.$refs['attributeEO'].resetFields()
this.attributeEO = {
dataType: '',
dataTitle: '',
attachFileId: '',
}
})
this.showInfoModal = false
},
},
mounted() {
this.$http.get('fileMaterialCenter/file-material', this.dataCenterSearch, {
_this: this
}, res => {
this.dataCenterTable = res.data.records
this.dataCenterSearch.total = res.data.total
}, e => {
console.log(e)
})
}
}
</script>
<style scoped lang="less">
#dataCenter {
background-color: white;
height: 100%;
padding: 10px 20px;
}
</style>
@@ -1499,7 +1499,7 @@
<el-form :model="sarStandardsSearch"
:inline="true"
class="label-input-form table-lattice"
label-width="68px"
label-width="300px"
style="display: flex;flex-wrap: wrap">
<ProcessTitle>
<template slot="title">基础信息</template>
@@ -1777,7 +1777,7 @@
@keyup.enter.native="getDomesticStandardTableBtn(sarStandardsSearch)"></el-input>
</el-form-item>
<!-- 采标编号-->
<el-form-item label="采标===编号" prop="nameShow" class="add-form-item form-item-disabled">
<el-form-item label="采标编号" prop="nameShow" class="add-form-item form-item-disabled">
<el-input v-model="advanceSearchMapping.CBBH" clearable placeholder="根据采标编号查找"
@keyup.enter.native="getDomesticStandardTableBtn(sarStandardsSearch)"></el-input>
</el-form-item>
@@ -1338,7 +1338,7 @@
width = "500"
:data="standSystemOptions"
:defaultProps="defaultProps" :checkedKeys="defaultCheckedKeys"
:nodeKey="nodeKey" @popoverHide="popoverHide"></tree-select-new>
:nodeKey="nodeKey" @popoverHide="popoverHide" @popoverHideCancel="popoverHideCancel"></tree-select-new>
<tree-select-new
width = "500"
:lazy=true
@@ -2226,6 +2226,9 @@ export default {
},
popoverHideModelCancel() {
this.modalShowFlag4 = false
},
popoverHideCancel() {
this.modalShowFlag1 = false
},
popoverHide (checkedIds, checkedData,isShow,isLoadChild,topId) {
if(checkedData) {
+22
View File
@@ -2404,6 +2404,28 @@ const routes = [
menuId: 'ABCLRLJUQN44ENBS93CQ'
}
},
{
path: '/dataCenter',
name: 'dataCenter',
component: () =>
import('@/pages/regulatoryRepository/dataCenter'),
meta: {
requireAuth: true,
title: '资料中心',
menuId: ''
}
},
{
path: '/dataCenterDetail',
name: 'dataCenterDetail',
component: () =>
import('@/pages/regulatoryRepository/dataCenter/dataCenterDetail'),
meta: {
requireAuth: true,
title: '资料中心详情',
menuId: ''
}
},
// 技术要求清单
{
path: '/skillReq',