Browse Source

周报后台管理优化

master
wanggongfeng 5 years ago
parent
commit
7d0804120f
  1. 8
      src/views/modules/workRecord/weekrecordinfo.vue
  2. 26
      src/views/modules/workRecord/weekrecordinfoDetail.vue

8
src/views/modules/workRecord/weekrecordinfo.vue

@ -66,8 +66,8 @@
</el-table-column>
<el-table-column prop="nickName" label="发布人" header-align="center" align="center"></el-table-column>
<el-table-column prop="deptName" label="部门名称" header-align="center" align="center"></el-table-column>
<el-table-column prop="startDate" label="统计开始时间" header-align="center" align="center"></el-table-column>
<el-table-column prop="endDate" label="统计结束时间" header-align="center" align="center"></el-table-column>
<el-table-column prop="startDate" label="统计开始时间" header-align="center" align="center" :formatter="dateFormat"></el-table-column>
<el-table-column prop="endDate" label="统计结束时间" header-align="center" align="center" :formatter="dateFormat"></el-table-column>
<el-table-column prop="content" label="内容" header-align="center" align="center" show-overflow-tooltip></el-table-column>
<el-table-column prop="state" label="周报状态" header-align="center" align="center"></el-table-column>
<el-table-column prop="createdTime" label="发布时间" header-align="center" align="center"></el-table-column>
@ -149,6 +149,10 @@ export default {
}
},
methods: {
dateFormat (row, column) {
let date = row[column.property]
return date.length >= 10 ? date.substring(0, 10) : date
},
addHandle (id, disabled, isAdd) {
this.$parent.selectComponent = 'WeekrecordinfoDetail'
this.$router.push({ path: '/workRecord-weekrecordinforoute', query: { id: id, disabled: disabled, isAdd: isAdd } })

26
src/views/modules/workRecord/weekrecordinfoDetail.vue

@ -188,8 +188,8 @@ export default {
},
// --------------------
handleFileCardPreview (file) {
window.location.href = `${window.SITE_CONFIG['apiURL']}/oss/file/download?fileUrl=${file.url}`
// window.location.href = `http://219.146.91.110:10000/epdc-api/oss/file/download?fileUrl=${file.url}`
// window.location.href = `${window.SITE_CONFIG['apiURL']}/oss/file/download?fileUrl=${file.url}`
window.location.href = `http://219.146.91.110:10000/epdc-api/oss/file/download?fileUrl=${file.url}`
},
beforeFileRemove (file, fileList) {
return this.$confirm(`确定移除${file.name}`)
@ -243,6 +243,28 @@ export default {
},
//
dataFormSubmitHandle: debounce(function () {
// 0
let remindInfo = ''
for (var i = 0; i < this.dataForm.totalConfigList.length; i++) {
for (var j = 0; j < this.dataForm.totalConfigList[i].configList.length; j++) {
if (this.dataForm.totalConfigList[i].configList[j].total <= 0 && this.dataForm.totalConfigList[i].showFlag === '1') {
remindInfo += '第' + (i + 1) + '项、'
break
}
}
}
if (remindInfo.length > 0) {
remindInfo = remindInfo.substring(0, remindInfo.length - 1)
this.$confirm(remindInfo + '存在未完善信息,请完善后提交!', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
//
}).catch(() => {})
return false
}
//
this.$refs['dataForm'].validate((valid) => {
if (!valid) {
return false

Loading…
Cancel
Save