@@ -149,7 +146,7 @@
@@ -204,32 +201,32 @@ export default {
title: this.$t('workCenter.enStandardRevision.draftingUnit'),
align: 'center',
width: 180,
- dataIndex: 'draftingUnit_dictText',
+ dataIndex: 'dept_dictText',
scopedSlots: { customRender: 'text' }
},
{ // 起草人
title: this.$t('workCenter.enStandardRevision.drafter'),
align: 'center',
width: 180,
- dataIndex: 'drafter_dictText',
+ dataIndex: 'user_dictText',
scopedSlots: { customRender: 'text' }
},
{ // 起草范围
title: this.$t('workCenter.enStandardRevision.draftingScope'),
align: 'center',
width: 180,
- dataIndex: 'draftingScope',
+ dataIndex: 'scope',
scopedSlots: { customRender: 'text' }
},
{ // 截止日期
title: this.$t('expirationDate'),
align: 'center',
width: 180,
- dataIndex: 'expirationDate',
+ dataIndex: 'deadline',
scopedSlots: { customRender: 'text' }
},
{ // 企标文本
- dataIndex: 'standardFile_dictText',
+ dataIndex: 'fileId_dictText',
title: this.$t('workCenter.enStandardRevision.enterpriseStandardText'),
scopedSlots: { customRender: 'standardFile' },
align: 'center',
@@ -237,12 +234,12 @@ export default {
}
],
// 起草人表格数据
- drafterDataSource: [{id: 1, standardFile: '1715299701232504833', standardFile_dictText: '测试上传excel测试测试测试测试.xls'}],
+ drafterDataSource: [],
drafterLoading: false,
formInline: {},
rules: {
// 参会人员
- conferee: [
+ meetingUsers: [
{
required: true,
message: this.$t('workCenter.enStandardRevision.conferee') + this.$t('cannotEmpty'),
@@ -257,8 +254,16 @@ export default {
trigger: 'change'
}
],
+ // 编制说明
+ compIllustration: [
+ {
+ required: true,
+ message: this.$t('workCenter.enStandardRevision.compilationIllustration') + this.$t('cannotEmpty'),
+ trigger: 'change'
+ }
+ ],
// 是否需要稽查
- isNeedAudit: [
+ inspectFlag: [
{
required: true,
message: this.$t('workCenter.enStandardRevision.isNeedAudit') + this.$t('cannotEmpty'),
@@ -268,25 +273,35 @@ export default {
},
// 稽查内容表格列
columns: [
- {
+ { // 条款
title: this.$t('enterpriseStandardLibrary.standard.subjectToClause'),
align: 'center',
width: 180,
dataIndex: 'clause',
scopedSlots: { customRender: 'text' }
},
- {
+ { // 标准内容和要求
title: this.$t('enterpriseStandardLibrary.standard.standardContentOrRequirements'),
align: 'center',
width: 180,
dataIndex: 'requirement',
scopedSlots: { customRender: 'text' }
},
+ { // 整改部门
+ title: this.$t('enterpriseStandardLibrary.standard.rectificationDepartment'),
+ align: 'center',
+ width: 200,
+ dataIndex: 'rectificationDepartment',
+ customRender: (value, row, index) => {
+ return
+ }
+ },
{
title: this.$t('operation'),
scopedSlots: { customRender: 'action' },
align: 'center',
- width: 200
+ width: 150
}
],
// 稽查内容表格数据
@@ -294,27 +309,27 @@ export default {
loading: false,
fileMaxSize: undefined,
image: false,
- imageUrl: ''
+ imageUrl: '',
+ uploadName: ''
}
},
methods: {
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
initData (data) {
// 给表格赋值,在线编辑不知道要怎么赋值?
- // this.drafterDataSource =
- // this.dataSource =
- // this.formInline =
+ this.drafterDataSource = data.otherDraftUserVOS
+ this.dataSource = data.inspectContents || []
+ this.formInline = Object.assign({}, data)
// 给表单赋值
- // this.$nextTick(() => {
- // this.$refs.baseInfoForm.formInline =
- // })
+ this.$nextTick(() => {
+ this.$refs.baseInfoForm.initData(data)
+ })
},
// 外层要获取数据
getData () {
// 把数据抛出,在线编辑不知道要不要抛
- const data = {}
- data.dataSource = this.dataSource
- data.formInline = this.formInline
+ const data = Object.assign({}, this.formInline)
+ data.inspectContents = this.dataSource || []
return data
},
// 外层获取数据要过校验,返回false表示没有通过校验
@@ -322,10 +337,19 @@ export default {
let data = {}
await this.$refs.ruleForm.validate(valid => {
if (valid) {
- if (this.dataSource && this.dataSource.length > 0) {
+ if (this.formInline.inspectFlag === '1' && this.dataSource && this.dataSource.length > 0) {
+ if (this.dataSource.map(item => item.rectificationDepartment).every(item => !!item)) {
+ // 每一个的整改部门都填了
+ // 有数据可以抛出
+ data = Object.assign({}, this.formInline)
+ data.inspectContents = this.dataSource || []
+ } else {
+ this.$message.warning(this.$t('pleaseCompleteTableInfo'))
+ data = false
+ }
+ } else if (this.formInline.inspectFlag === '0') {
// 有数据可以抛出
- data.dataSource = this.dataSource
- data.formInline = this.formInline
+ data = Object.assign({}, this.formInline)
} else {
this.$message.warning(this.$t('addAtLeastOneRowOfData'))
data = false
@@ -339,7 +363,7 @@ export default {
// 查看企标文本
handleLookUploadStandard (record) {
// 截取文件后缀名
- const fileSuffix = record.standardFile_dictText ? record.standardFile_dictText.split('.')[record.standardFile_dictText.split('.').length - 1].toLowerCase() : ''
+ const fileSuffix = record.fileId_dictText ? record.fileId_dictText.split('.')[record.fileId_dictText.split('.').length - 1].toLowerCase() : ''
const canPreview = CAN_PREVIEW_FILE_SUFFIX.some(tt => fileSuffix.toLowerCase() === tt)
// 判断是否为可预览格式的文件
if (!canPreview) {
@@ -348,10 +372,10 @@ export default {
})
return
}
- const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${record.standardFile}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${record.standardFile_dictText}`
+ const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${record.fileId}?at=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${record.fileId_dictText}`
// 图片预览,使用自己添加的组件
if (canPreview && FILE_TYPE_IMGS.includes(fileSuffix)) {
- this.imageUrl = getFileAccessHttpUrl(record.standardFile)
+ this.imageUrl = getFileAccessHttpUrl(record.fileId)
// 获取viewer实例
const viewer = this.$el.querySelector('.image').$viewer
// 调用show方法进行显示预览图
@@ -361,22 +385,17 @@ export default {
}
// pdf预览
if (canPreview && FILE_TYPE_PDF.includes(fileSuffix)) {
- const url = previewPdf(record.standardFile)
+ const url = previewPdf(record.fileId)
window.open(url)
return
}
- // word用KKfile预览
- if (canPreview && (fileSuffix === 'doc' || fileSuffix === 'docx')) {
- kkFilePreview(fileFullUrl)
- return
- }
- // 如果都不能预览就下载
- downloadFile(`/sys/common/download/${record.standardFile}`, record.standardFile_dictText)
+ // 其余可预览文件仍使用KKFile进行预览
+ kkFilePreview(fileFullUrl)
},
// 下载企标文本
handleDownloadUploadStandard (record) {
// 下载文件
- downloadFile(`/sys/common/download/${record.standardFile}`, record.standardFile_dictText)
+ downloadFile(`/sys/common/download/${record.fileId}`, record.fileId_dictText)
},
// 选择用户得到用户名
userSelectNameChange (value, fieldName) {
@@ -384,11 +403,6 @@ export default {
},
// 点击文件上传
clickButtonToUpload (fieldName) {
- if (fieldName === 'uploadAttachment') {
- this.fileMaxSize = 10
- } else {
- this.fileMaxSize = undefined
- }
this.$refs.uploadFile.open(this.formInline[fieldName])
this.uploadName = fieldName
},
@@ -420,7 +434,13 @@ export default {
},
// 稽查内容的删除
handleDelete (index) {
- this.dataSource.splice(index, 1)
+ this.$confirm({
+ title: this.$t('confirmDeletion'),
+ content: this.$t('areYouSure'),
+ onOk: () => {
+ this.dataSource.splice(index, 1)
+ }
+ })
},
// 稽查内容新增编辑完成
checkContentOk (value, index) {
@@ -439,9 +459,10 @@ export default {
From b1d4ba176049388e1be0d3c372cfccefe81d24f4 Mon Sep 17 00:00:00 2001
From: fengchenchen
Date: Fri, 26 Jan 2024 15:04:23 +0800
Subject: [PATCH 07/11] =?UTF-8?q?=E3=80=90update=E3=80=91=E5=9B=BD?=
=?UTF-8?q?=E5=86=85=E6=A0=87=E5=87=86-=E5=A2=9E=E5=8A=A0=E8=AF=A6?=
=?UTF-8?q?=E6=83=85=E6=8C=89=E9=92=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../domesticStandard/DomesticStandardList.vue | 136 ++++++++++++++++--
1 file changed, 126 insertions(+), 10 deletions(-)
diff --git a/src/views/standardRegulationLibrary/domesticStandard/DomesticStandardList.vue b/src/views/standardRegulationLibrary/domesticStandard/DomesticStandardList.vue
index 9341495a..aa194041 100644
--- a/src/views/standardRegulationLibrary/domesticStandard/DomesticStandardList.vue
+++ b/src/views/standardRegulationLibrary/domesticStandard/DomesticStandardList.vue
@@ -137,7 +137,7 @@
{{ text || text === 0 ? text : global.emptyLine }}
- {{
+
{{
text
}}
@@ -149,7 +149,7 @@
{{ text || text === 0 ? text : global.emptyLine }}
- {{
+
{{
text
}}
@@ -170,6 +170,8 @@
+
+
@@ -201,28 +203,34 @@