|
|
@@ -3,6 +3,7 @@
|
|
|
<!-- 外部 -->
|
|
|
<div slot="west">
|
|
|
<div class="box">
|
|
|
+ <!-- 选择内外部文件的侧边栏 -->
|
|
|
<ibps-type-tree
|
|
|
:width="width"
|
|
|
:height="height"
|
|
|
@@ -24,6 +25,7 @@
|
|
|
show-icon
|
|
|
style="height:50px;"
|
|
|
/>
|
|
|
+ <!-- 选择文件,展示在右边 -->
|
|
|
<template v-else>
|
|
|
<ibps-crud
|
|
|
key="istree"
|
|
|
@@ -41,6 +43,7 @@
|
|
|
@action-event="handleAction"
|
|
|
@pagination-change="handlePaginationChange"
|
|
|
>
|
|
|
+ <!-- 查阅具名插槽 -->
|
|
|
<template
|
|
|
slot="wenjinachayue"
|
|
|
slot-scope="scope"
|
|
|
@@ -59,6 +62,7 @@
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
+ <!-- 阅览/收藏具名插槽 -->
|
|
|
<template
|
|
|
slot="readStatus"
|
|
|
slot-scope="scope"
|
|
|
@@ -72,6 +76,12 @@
|
|
|
style="vertical-align: middle; height: 30px;"
|
|
|
>
|
|
|
</template>
|
|
|
+ <template v-if="showCaoZuoColumn" slot="caozuo" slot-scope="scope">
|
|
|
+ <div style="color:#1E90FF; " @click="updateDate(scope)" class="hover-hand">
|
|
|
+ <i class="el-icon-edit-outline" style="cursor: pointer;" />
|
|
|
+ <span style="cursor: pointer;"> 更新</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
</ibps-crud>
|
|
|
</template>
|
|
|
</ibps-container>
|
|
|
@@ -108,7 +118,106 @@
|
|
|
:file-infos="fileInfos"
|
|
|
/>
|
|
|
</div>
|
|
|
+ <el-dialog
|
|
|
+ :visible.sync="dialogVisible1"
|
|
|
+ width="55%"
|
|
|
+ >
|
|
|
+ <template #title>
|
|
|
+ <div style="width:100%;color:#555;text-align:center; font-size:20px;font-weight:600;">更新文件信息</div>
|
|
|
+ </template>
|
|
|
+ <div class="motaikuan">
|
|
|
+ <el-form ref="dialogForm" :model="dialogForm" :rules="rules">
|
|
|
+ <el-row :gutter="80" label-width="80" style="margin:2% 0">
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="5"><div class="grid-content bg-purple">文件类型</div></el-col>
|
|
|
+ <el-col :span="19"><div class="grid-content bg-purple">{{ dialogForm.wen_jian_lei_xing?dialogForm.wen_jian_lei_xing:'/' }}</div></el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="5"><div class="grid-content bg-purple">文件编号</div></el-col>
|
|
|
+ <el-col :span="19"><div class="grid-content bg-purple">{{ dialogForm.wen_jian_bian_hao?dialogForm.wen_jian_bian_hao:'/' }}</div></el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ <!-- <el-form-item label="文件编号"> {{ dialogForm.wen_jian_bian_hao }}</el-form-item> -->
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="80" label-width="80" style="margin:2% 0">
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="5" style="margin-top:1%"><div class="grid-content bg-purple">原文件名称</div></el-col>
|
|
|
+ <el-col :span="19" style="margin-top:1%"><div class="grid-content bg-purple">{{ dialogForm.yuan_wen_jian_min?dialogForm.yuan_wen_jian_min:'/' }}</div></el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="5" style="margin-top:1%"><div class="grid-content bg-purple">新文件名称</div></el-col>
|
|
|
+ <el-col :span="19"><div class="grid-content bg-purple"><el-input v-model="dialogForm.xin_wen_jian_ming" placeholder="请输入内容" /></div></el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="80" label-width="80" style="margin:2% 0">
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="5" style="margin-top:1%"><div class="grid-content bg-purple">发布时间</div></el-col>
|
|
|
+ <el-col :span="19"><div class="grid-content bg-purple"> <el-date-picker v-model="dialogForm.fa_bu_shi_jian_" value-format="timestamp" type="date" placeholder="选择日期" :picker-options="{ disabledDate(time) { return time.getTime() > Date.now(); } }" style="width:100%" /></div></el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="5" style="margin-top:1%"><div class="grid-content bg-purple">生效时间</div></el-col>
|
|
|
+ <el-col :span="19"><div class="grid-content bg-purple"> <el-date-picker v-model="dialogForm.sheng_xiao_shi_" value-format="timestamp" type="date" placeholder="选择日期" :picker-options="{ disabledDate(time) { return time.getTime() <= Date.now(); } }" style="width:100%" /></div></el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="80" label-width="80" style="margin:2% 0">
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="5" style="margin-top:1%"><div class="grid-content bg-purple"><span style="color:red">*</span>上传文件</div></el-col>
|
|
|
+ <el-col :span="19"><div class="grid-content bg-purple"> <ibps-attachment
|
|
|
+ v-model="dialogForm.wen_jian_fu_jian_"
|
|
|
+ allow-download
|
|
|
+ download
|
|
|
+ multiple
|
|
|
+ accept="*"
|
|
|
+ store="id"
|
|
|
+ :readonly="false"
|
|
|
+ /></div></el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="80" label-width="80" style="margin:2% 0">
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="5" style="margin-top:1%"><div class="grid-content bg-purple">更新内容</div></el-col>
|
|
|
+ <el-col :span="19"><div class="grid-content bg-purple"> <el-input v-model="dialogForm.geng_xin_nei_rong" placeholder="请输入内容" /></div></el-col>
|
|
|
+ </el-row>
|
|
|
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="80" label-width="80" style="margin:2% 0">
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="5" style="margin-top:1%"><div class="grid-content bg-purple">更新原因</div></el-col>
|
|
|
+ <el-col :span="19"><div class="grid-content bg-purple"> <el-input v-model="dialogForm.geng_xin_yuan_yin" placeholder="请输入内容" /></div></el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+ <div slot="footer" class="dialog-footer" style="width:100%;text-align:center;">
|
|
|
+ <el-button @click="dialogVisible1 = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="dialogVisibleClick()">确 定</el-button>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
@@ -126,13 +235,15 @@ import hadColetcPng from '@/assets/images/icons/hadColetc.png'
|
|
|
import noColectPng from '@/assets/images/icons/noColect.png'
|
|
|
import wordPng from '@/assets/images/icons/word.png'
|
|
|
import fileTraining from '@/views/component/fileTraining'
|
|
|
+import column from '@/components/ibps-crud/mixin/column'
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
|
IbpsTypeTree,
|
|
|
BpmnFormrender,
|
|
|
'ibps-attachment': IbpsAttachment,
|
|
|
- 'file-lookup': fileTraining
|
|
|
+ 'file-lookup': fileTraining,
|
|
|
+ IbpsAttachment: () => import('@/business/platform/file/attachment/selector')
|
|
|
},
|
|
|
mixins: [FixHeight],
|
|
|
data () {
|
|
|
@@ -150,6 +261,22 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
return {
|
|
|
+ rules: { name: [] },
|
|
|
+ dialogVisible1: false,
|
|
|
+ showCaoZuoColumn: false,
|
|
|
+ dialogForm: {
|
|
|
+ yuan_wen_jian_id_: '',
|
|
|
+ wen_jian_lei_xing: '',
|
|
|
+ wen_jian_bian_hao: '',
|
|
|
+ yuan_wen_jian_min: '',
|
|
|
+ xin_wen_jian_ming: '',
|
|
|
+ fa_bu_shi_jian_: '',
|
|
|
+ sheng_xiao_shi_: '',
|
|
|
+ wen_jian_fu_jian_: '',
|
|
|
+ geng_xin_nei_rong: '',
|
|
|
+ geng_xin_yuan_yin: '',
|
|
|
+ ji_lu_id_: ''
|
|
|
+ },
|
|
|
// treeData: [],
|
|
|
show: '',
|
|
|
// rightsArr: ['join', 'delete'],
|
|
|
@@ -229,7 +356,11 @@ export default {
|
|
|
watch: {
|
|
|
filterText (val) {
|
|
|
this.$refs.tree.filter(val)
|
|
|
+ },
|
|
|
+ showCaoZuoColumn (val) {
|
|
|
+ this.showCaoZuoColumn = val
|
|
|
}
|
|
|
+
|
|
|
},
|
|
|
created () {
|
|
|
this.pageKey = this.$route.name
|
|
|
@@ -281,6 +412,57 @@ export default {
|
|
|
},
|
|
|
mounted () { },
|
|
|
methods: {
|
|
|
+ dataShow (times) {
|
|
|
+ const timeDate = new Date(times)
|
|
|
+ const year = timeDate.getFullYear()
|
|
|
+ const month = ('0' + (timeDate.getMonth() + 1)).slice(-2) // 月份从0开始,所以加1
|
|
|
+ const day = ('0' + timeDate.getDate()).slice(-2)
|
|
|
+ return `${year}-${month}-${day}`
|
|
|
+ },
|
|
|
+ dialogVisibleClick () {
|
|
|
+ // console.log('点击确定', this.dataShow(this.dialogForm.sheng_xiao_shi_))
|
|
|
+ this.dialogForm.sheng_xiao_shi_ = this.dataShow(this.dialogForm.sheng_xiao_shi_)
|
|
|
+ this.dialogForm.fa_bu_shi_jian_ = this.dataShow(this.dialogForm.fa_bu_shi_jian_)
|
|
|
+ const params = {
|
|
|
+ tableName: 't_wjxxgxb',
|
|
|
+ paramWhere: [this.dialogForm]
|
|
|
+ }
|
|
|
+ if (this.dialogForm.wen_jian_fu_jian_ === '') {
|
|
|
+ this.$message.warning('请先上传文件')
|
|
|
+ } else {
|
|
|
+ this.$common.request('add', params).then(res => {
|
|
|
+ // console.log('新增数据成功', res)
|
|
|
+ this.$message.success('添加成功!')
|
|
|
+ this.dialogVisible1 = false
|
|
|
+ }).catch(err => {
|
|
|
+ console.log(err)
|
|
|
+ this.$message.error('添加失败')
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 外部文件更新
|
|
|
+ updateDate (data) {
|
|
|
+ this.dialogVisible1 = true
|
|
|
+ console.log('data', data)
|
|
|
+ const sql = 'select * from t_wjxxb WHERE id_=' + data.row.id
|
|
|
+ this.$common.request('sql', sql).then(res => {
|
|
|
+ console.log('res', res.variables.data[0])
|
|
|
+ this.dialogForm.wen_jian_lei_xing = res.variables.data[0].wen_jian_lei_xing
|
|
|
+ this.dialogForm.wen_jian_bian_hao = res.variables.data[0].wen_jian_bian_hao
|
|
|
+ this.dialogForm.yuan_wen_jian_min = res.variables.data[0].wen_jian_ming_che
|
|
|
+ this.dialogForm.fa_bu_shi_jian_ = res.variables.data[0].fa_bu_shi_jian_
|
|
|
+ // this.dialogForm.wen_jian_fu_jian = res.variables.data[0].wen_jian_fu_jian_
|
|
|
+ this.dialogForm.ji_lu_id_ = res.variables.data[0].id_
|
|
|
+ this.dialogForm.yuan_wen_jian_id_ = res.variables.data[0].wen_jian_fu_jian_
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleClose (done) {
|
|
|
+ this.$confirm('确认关闭?')
|
|
|
+ .then(_ => {
|
|
|
+ done()
|
|
|
+ })
|
|
|
+ .catch(_ => {})
|
|
|
+ },
|
|
|
handleExpandCollapse (isExpand, readonly = false) {
|
|
|
this.width = isExpand ? 200 : 50
|
|
|
},
|
|
|
@@ -436,8 +618,23 @@ export default {
|
|
|
this.getSearcFormData()
|
|
|
this.getDatas()
|
|
|
},
|
|
|
+ hasColumnByProp (columns, prop) {
|
|
|
+ return columns.some(column => column.prop === prop)
|
|
|
+ },
|
|
|
+ removeColumnByProp (columns, prop) {
|
|
|
+ return columns.filter(column => column.prop !== prop)
|
|
|
+ },
|
|
|
handleNodeClick (nodeId, nodeData, treeDatas) {
|
|
|
- this.tableTitle = nodeData.name
|
|
|
+ if ((nodeData.id === '1174299180374425600' || nodeData.parentId === '1174299180374425600') && this.$store.getters.isSuper) {
|
|
|
+ this.showCaoZuoColumn = true
|
|
|
+ if (!this.hasColumnByProp(this.listConfig.columns, 'cao_zuo')) {
|
|
|
+ this.listConfig.columns.push({ prop: 'cao_zuo', label: '操作', slotName: 'caozuo', width: 100 })
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.showCaoZuoColumn = false
|
|
|
+ this.listConfig.columns = this.removeColumnByProp(this.listConfig.columns, 'cao_zuo')
|
|
|
+ }
|
|
|
+
|
|
|
this.show = 'detail'
|
|
|
this.addDataCont = { fenLei: nodeData.name, fenLeiId: nodeId }
|
|
|
const fileTypes = []
|
|
|
@@ -676,5 +873,12 @@ export default {
|
|
|
/deep/ .el-tree-node__content {
|
|
|
display: block;
|
|
|
}
|
|
|
+.motaikuan{
|
|
|
+padding:1% 3%;
|
|
|
+.el-row{
|
|
|
+ text-align: left;
|
|
|
+}
|
|
|
+}
|
|
|
+
|
|
|
</style>
|
|
|
|