|
|
@@ -64,7 +64,7 @@
|
|
|
>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="6">
|
|
|
+ <el-col :span="12">
|
|
|
<el-form-item label="失效时间" prop="failureTime">
|
|
|
<el-date-picker
|
|
|
v-model="form.failureTime"
|
|
|
@@ -72,9 +72,17 @@
|
|
|
placeholder="选择日期时间"
|
|
|
format="yyyy-MM-dd HH:mm:ss"
|
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
- style="width: 100%"
|
|
|
+ style="width: 46%"
|
|
|
+ @change="failureTimeChange"
|
|
|
>
|
|
|
</el-date-picker>
|
|
|
+ <el-checkbox
|
|
|
+ style="margin-left: 5px"
|
|
|
+ v-model="form.isAuthority"
|
|
|
+ :true-label="1"
|
|
|
+ :false-label="0"
|
|
|
+ >到失效时间自动回收权限</el-checkbox
|
|
|
+ >
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<!-- <el-col :span="6">
|
|
|
@@ -82,17 +90,11 @@
|
|
|
<el-input v-model="form.createUserName" disabled></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col> -->
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="创建时间" prop="createTime">
|
|
|
- <el-input v-model="form.createTime" disabled style="width: 46%">
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="创建时间" prop="createTime" v-if="type == 'view'">
|
|
|
+ <el-input v-model="form.createTime" disabled >
|
|
|
</el-input>
|
|
|
- <el-checkbox
|
|
|
- style="margin-left: 5px"
|
|
|
- v-model="form.isAuthority"
|
|
|
- :true-label="1"
|
|
|
- :false-label="0"
|
|
|
- >到失效时间自动回收权限</el-checkbox
|
|
|
- >
|
|
|
+
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="24">
|
|
|
@@ -132,6 +134,7 @@
|
|
|
icon="el-icon-plus"
|
|
|
class="ele-btn-icon"
|
|
|
@click="visible = true"
|
|
|
+ v-if="type != 'view'"
|
|
|
>
|
|
|
添加
|
|
|
</el-button>
|
|
|
@@ -140,6 +143,8 @@
|
|
|
<el-popconfirm
|
|
|
class="ele-action"
|
|
|
title="确定要删除此文档吗?"
|
|
|
+ v-if="type != 'view'"
|
|
|
+
|
|
|
@confirm="remove(row)"
|
|
|
>
|
|
|
<template v-slot:reference>
|
|
|
@@ -152,6 +157,15 @@
|
|
|
</el-link>
|
|
|
</template>
|
|
|
</el-popconfirm>
|
|
|
+ <el-link
|
|
|
+ v-if="type == 'view'"
|
|
|
+ type="primary"
|
|
|
+ :underline="false"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ @click="browseOpen(row)"
|
|
|
+ >
|
|
|
+ 浏览
|
|
|
+ </el-link>
|
|
|
</template>
|
|
|
</ele-pro-table>
|
|
|
</el-form-item>
|
|
|
@@ -171,7 +185,7 @@
|
|
|
height="200px"
|
|
|
:powerArr="powerArr"
|
|
|
:isSave="false"
|
|
|
- :isAdd="type != 'power'"
|
|
|
+ :isAdd="type != 'power'&&type != 'view'"
|
|
|
ref="powerRef"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
@@ -214,7 +228,7 @@
|
|
|
>
|
|
|
<doc_template
|
|
|
:fileType="0"
|
|
|
- lcyStatus="2"
|
|
|
+ lcyStatus="1,2"
|
|
|
:disabledTableList="tableList"
|
|
|
ref="mainRef"
|
|
|
></doc_template>
|
|
|
@@ -225,6 +239,8 @@
|
|
|
</el-button>
|
|
|
</template>
|
|
|
</ele-modal>
|
|
|
+ <browse ref="browseRef"></browse>
|
|
|
+
|
|
|
</ele-modal>
|
|
|
</template>
|
|
|
|
|
|
@@ -239,6 +255,8 @@ import power from '@/views/doc/components/power/index.vue';
|
|
|
import doc_template from '@/views/doc/components/template/doc_template.vue';
|
|
|
import { mapGetters } from 'vuex';
|
|
|
import bpmDetail from '@/views/bpm/processInstance/detail.vue';
|
|
|
+import browse from '@/views/doc/components/browseOpen.vue';
|
|
|
+import { fileStatus } from '@/views/doc/util.js';
|
|
|
|
|
|
const defaultForm = {
|
|
|
name: '', //名称
|
|
|
@@ -251,7 +269,7 @@ const defaultForm = {
|
|
|
releaseUserName: ''
|
|
|
};
|
|
|
export default {
|
|
|
- components: { power, doc_template, bpmDetail },
|
|
|
+ components: { power, doc_template, bpmDetail,browse },
|
|
|
props: {
|
|
|
isAdd: {
|
|
|
default: true
|
|
|
@@ -274,7 +292,6 @@ export default {
|
|
|
rules: {
|
|
|
name: [{ required: true, message: '请输入', trigger: 'blur' }],
|
|
|
releaseTime: [{ required: true, message: '请选择', trigger: 'blur' }],
|
|
|
- failureTime: [{ required: true, message: '请选择', trigger: 'blur' }]
|
|
|
},
|
|
|
// 提交状态
|
|
|
loading: false,
|
|
|
@@ -365,11 +382,14 @@ export default {
|
|
|
minWidth: 100
|
|
|
},
|
|
|
{
|
|
|
- prop: '',
|
|
|
+ prop: 'status',
|
|
|
label: '状态',
|
|
|
align: 'center',
|
|
|
showOverflowTooltip: true,
|
|
|
- minWidth: 100
|
|
|
+ minWidth: 100,
|
|
|
+ formatter: (_row, _column, cellValue) => {
|
|
|
+ return fileStatus(cellValue);
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
columnKey: 'action',
|
|
|
@@ -444,7 +464,7 @@ export default {
|
|
|
this.data = await getDocTreeListAPI(query);
|
|
|
},
|
|
|
methods: {
|
|
|
- open(type, row, list) {
|
|
|
+ open(type, row, list,fileType) {
|
|
|
this.title =
|
|
|
type == 'add'
|
|
|
? '新增'
|
|
|
@@ -467,6 +487,12 @@ export default {
|
|
|
});
|
|
|
} else {
|
|
|
this.form.releaseUserName = this.user.info.name;
|
|
|
+ if(fileType==1){
|
|
|
+ this.tableList=this.tableList.map(item=>{
|
|
|
+ item.directoryId=''
|
|
|
+ return item
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
this.bpmDetailFlag = false;
|
|
|
this.$nextTick(() => {
|
|
|
@@ -477,6 +503,17 @@ export default {
|
|
|
disabledDate() {
|
|
|
return false;
|
|
|
},
|
|
|
+ browseOpen(row) {
|
|
|
+ this.$refs.browseRef.open(row);
|
|
|
+ },
|
|
|
+ failureTimeChange(){
|
|
|
+ if(this.form.failureTime){
|
|
|
+ this.form.isAuthority=1
|
|
|
+ }else{
|
|
|
+ this.form.isAuthority=0
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
save() {
|
|
|
this.$refs.form.validate((valid) => {
|
|
|
if (!valid) {
|
|
|
@@ -490,10 +527,13 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
this.tableList.forEach((item) => {
|
|
|
+ console.log(item,'item')
|
|
|
if (!item.directoryId) {
|
|
|
isDirectory = false;
|
|
|
}
|
|
|
});
|
|
|
+ // console.log(isDirectory,'isDirectory')
|
|
|
+ // return
|
|
|
if (!isDirectory) {
|
|
|
this.$message.error('请选择文档位置');
|
|
|
return;
|