|
|
@@ -0,0 +1,351 @@
|
|
|
+<!-- 用户编辑弹窗 -->
|
|
|
+<template>
|
|
|
+ <ele-modal
|
|
|
+ width="70%"
|
|
|
+ :visible.sync="showEditFlag"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ custom-class="ele-dialog-form"
|
|
|
+ append-to-body
|
|
|
+ @close="cancel"
|
|
|
+ :title="title"
|
|
|
+ >
|
|
|
+
|
|
|
+ <div class="switch" v-if="type == 'view'" style="margin-bottom: 10px">
|
|
|
+ <div class="switch_left">
|
|
|
+ <ul>
|
|
|
+ <li
|
|
|
+ v-for="item in tabOptions"
|
|
|
+ :key="item.key"
|
|
|
+ :class="{ active: activeComp == item.key }"
|
|
|
+ @click="activeComp = item.key"
|
|
|
+ >
|
|
|
+ {{ item.name }}
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <el-form ref="form" :model="form" :rules="rules" label-width="82px" :disabled="type == 'view'">
|
|
|
+ <el-row :gutter="15">
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="主题" prop="name">
|
|
|
+ <el-input v-model="form.name" placeholder="请输入主题"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="回收人" prop="recycleUserName">
|
|
|
+ <el-input v-model="form.recycleUserName" disabled></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="回收时间" prop="recycleTime">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="form.recycleTime"
|
|
|
+ type="datetime"
|
|
|
+ placeholder="选择日期时间"
|
|
|
+ format="yyyy-MM-dd HH:mm:ss"
|
|
|
+ value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
+ </el-date-picker>
|
|
|
+ <!-- <el-checkbox
|
|
|
+ style="margin-left: 5px"
|
|
|
+ v-model="form.isTimeRelease"
|
|
|
+ :true-label="1"
|
|
|
+ :false-label="0"
|
|
|
+ >按照发布时间进行计划发布</el-checkbox
|
|
|
+ > -->
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <!-- <el-col :span="6">
|
|
|
+ <el-form-item label="失效时间" prop="failureTime">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="form.failureTime"
|
|
|
+ type="datetime"
|
|
|
+ placeholder="选择日期时间"
|
|
|
+ format="yyyy-MM-dd HH:mm:ss"
|
|
|
+ value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col> -->
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="创建人" prop="createUserName">
|
|
|
+ <el-input v-model="form.createUserName" disabled></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="创建时间" prop="createTime">
|
|
|
+ <el-input v-model="form.createTime" disabled style="width: 100%">
|
|
|
+ </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">
|
|
|
+ <el-form-item label="回收说明" prop="remark">
|
|
|
+ <el-input v-model="form.remark" type="textarea"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="回收信息" prop="releaseList">
|
|
|
+ <ele-pro-table
|
|
|
+ ref="table"
|
|
|
+ :columns="columns"
|
|
|
+ :datasource="form.releaseList"
|
|
|
+ tool-class="ele-toolbar-form"
|
|
|
+ cache-key="systemOrgUserTable"
|
|
|
+ :needPage="false"
|
|
|
+ >
|
|
|
+ <template v-slot:toolbar>
|
|
|
+ <el-button
|
|
|
+ size="small"
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-plus"
|
|
|
+ class="ele-btn-icon"
|
|
|
+ @click="visible = true"
|
|
|
+ >
|
|
|
+ 添加
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ <template v-slot:action="{ row }">
|
|
|
+ <el-popconfirm
|
|
|
+ class="ele-action"
|
|
|
+ title="确定要删除此信息吗?"
|
|
|
+ @confirm="remove(row)"
|
|
|
+ >
|
|
|
+ <template v-slot:reference>
|
|
|
+ <el-link
|
|
|
+ type="danger"
|
|
|
+ :underline="false"
|
|
|
+ icon="el-icon-delete"
|
|
|
+ >
|
|
|
+ 删除
|
|
|
+ </el-link>
|
|
|
+ </template>
|
|
|
+ </el-popconfirm>
|
|
|
+ </template>
|
|
|
+ </ele-pro-table>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <!-- <el-col :span="24">
|
|
|
+ <el-form-item label="通知用户" prop="storagePath">
|
|
|
+ <power
|
|
|
+ :powerArr="powerArr"
|
|
|
+ :isSave="false"
|
|
|
+ :isAdd="false"
|
|
|
+ ref="powerRef"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col> -->
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ <template v-slot:footer>
|
|
|
+ <el-button @click="cancel">取消</el-button>
|
|
|
+ <el-button type="primary" :loading="loading" @click="save" v-if="type != 'view'">
|
|
|
+ 确认
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ <ele-modal
|
|
|
+ width="70%"
|
|
|
+ :visible.sync="visible"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ custom-class="ele-dialog-form"
|
|
|
+ append-to-body
|
|
|
+ @close="sendCancel"
|
|
|
+ >
|
|
|
+ <send :isPop="true" :disabledList="form.releaseList" ref="sendRef" v-if="visible"></send>
|
|
|
+ <template v-slot:footer>
|
|
|
+ <el-button @click="sendCancel">取消</el-button>
|
|
|
+ <el-button type="primary" :loading="loading" @click="getTableList" >
|
|
|
+ 确认
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </ele-modal>
|
|
|
+ </ele-modal>
|
|
|
+</template>
|
|
|
+
|
|
|
+ <script>
|
|
|
+import { receiveSave } from '@/api/doc-manage';
|
|
|
+import power from '@/views/doc/components/power/index.vue';
|
|
|
+import send from '@/views/doc/sendReceive/send/send.vue';
|
|
|
+const defaultForm = {
|
|
|
+ name: '',
|
|
|
+ releaseList: [], //回收信息集合
|
|
|
+ recycleTime: '', //回收时间
|
|
|
+ recycleUserId: '', //回收人id
|
|
|
+ recycleUserName: '', //回收人名称
|
|
|
+ remark: '', //描述
|
|
|
+ status: '',
|
|
|
+ type: ''
|
|
|
+};
|
|
|
+export default {
|
|
|
+ components: { power,send },
|
|
|
+
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ // 表单数据
|
|
|
+ form: { ...defaultForm },
|
|
|
+ userAuthority: [],
|
|
|
+ // 表单验证规则
|
|
|
+ rules: {
|
|
|
+ name: [{ required: true, message: '请输入', trigger: 'blur' }],
|
|
|
+ recycleTime: [{ required: true, message: '请选择', trigger: 'blur' }],
|
|
|
+ },
|
|
|
+ // 提交状态
|
|
|
+ loading: false,
|
|
|
+ title: '',
|
|
|
+ type: '',
|
|
|
+ showEditFlag: false,
|
|
|
+ visible: false,
|
|
|
+ columns: [
|
|
|
+ {
|
|
|
+ width: 45,
|
|
|
+ type: 'index',
|
|
|
+ columnKey: 'index',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ label: '主题',
|
|
|
+ align: 'center',
|
|
|
+ prop: 'name',
|
|
|
+ width: 220,
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+
|
|
|
+ // {
|
|
|
+ // align: 'center',
|
|
|
+ // label: '是否回收权限',
|
|
|
+ // prop: 'isAuthority',
|
|
|
+ // width: 120,
|
|
|
+ // formatter: (_row, _column, cellValue) => {
|
|
|
+ // return cellValue == 1 ? '是' : '否';
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ {
|
|
|
+ align: 'center',
|
|
|
+ label: '回收权限时间',
|
|
|
+ prop: 'isAuthorityTime',
|
|
|
+ width: 180,
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ align: 'center',
|
|
|
+ label: '失效时间',
|
|
|
+ prop: 'failureTime',
|
|
|
+ width: 180,
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ prop: 'userAuthority',
|
|
|
+ label: '通知用户',
|
|
|
+ align: 'center',
|
|
|
+ formatter: (_row, _column, cellValue) => {
|
|
|
+ return cellValue.map((item) => item.name).toString();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ align: 'center',
|
|
|
+ label: '发布人',
|
|
|
+ prop: 'releaseUserName',
|
|
|
+ width: 180
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ prop: 'releaseTime',
|
|
|
+ align: 'center',
|
|
|
+ label: '发布时间',
|
|
|
+ width: 180
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ columnKey: 'action',
|
|
|
+ label: '操作',
|
|
|
+ width: 200,
|
|
|
+ align: 'center',
|
|
|
+ resizable: false,
|
|
|
+ slot: 'action',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ fixed: 'right'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ powerArr: [
|
|
|
+ // { name: 'visible', label: '可见' },
|
|
|
+ // { name: 'check', label: '查看' },
|
|
|
+ // { name: 'browse', label: '浏览' },
|
|
|
+ // { name: 'download', label: '下载' },
|
|
|
+ // { name: 'print', label: '打印' }
|
|
|
+ ]
|
|
|
+ };
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ // 是否开启响应式布局
|
|
|
+ styleResponsive() {
|
|
|
+ return this.$store.state.theme.styleResponsive;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {},
|
|
|
+ methods: {
|
|
|
+ open(type, row) {
|
|
|
+ this.title = type == 'add' ? '新增' : '详情';
|
|
|
+ this.type = type;
|
|
|
+ if (this.type != 'add') {
|
|
|
+ this.form = row;
|
|
|
+ }else{
|
|
|
+ if(row){
|
|
|
+ this.form.releaseList=row
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.showEditFlag = true;
|
|
|
+ },
|
|
|
+ save() {
|
|
|
+ this.$refs.form.validate((valid) => {
|
|
|
+ if (!valid) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if (this.releaseList.length == 0) {
|
|
|
+ this.$message.error('请选择回收信息');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ this.loading = true;
|
|
|
+ receiveSave(this.form)
|
|
|
+ .then((msg) => {
|
|
|
+ this.loading = false;
|
|
|
+ this.$emit('done');
|
|
|
+ this.cancel();
|
|
|
+ })
|
|
|
+ .catch((e) => {
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ cancel() {
|
|
|
+ this.form = { ...defaultForm };
|
|
|
+ this.showEditFlag = false;
|
|
|
+ },
|
|
|
+ sendCancel() {
|
|
|
+ this.visible = false;
|
|
|
+ },
|
|
|
+ remove(row) {
|
|
|
+ this.form.releaseList = this.form.releaseList.filter((item) => item.id != row.id);
|
|
|
+ },
|
|
|
+
|
|
|
+ getTableList() {
|
|
|
+ this.form.releaseList.push(...this.$refs.sendRef.getTableList())
|
|
|
+ this.sendCancel();
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+</script>
|
|
|
+ <style scoped lang="scss">
|
|
|
+</style>
|
|
|
+
|