|
@@ -0,0 +1,516 @@
|
|
|
|
+<template>
|
|
|
|
+ <div class="app-container">
|
|
|
|
+ <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
|
|
|
+ <el-form-item label="事项名称" prop="title">
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="queryParams.title"
|
|
|
|
+ placeholder="请输入事项名称"
|
|
|
|
+ clearable
|
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
|
+ />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="审核状态" prop="examine">
|
|
|
|
+ <el-select v-model="queryParams.examine" placeholder="请选择审核状态" clearable>
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="dict in dict.type.examine_state"
|
|
|
|
+ :key="dict.value"
|
|
|
|
+ :label="dict.label"
|
|
|
|
+ :value="dict.value"
|
|
|
|
+ />
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item>
|
|
|
|
+ <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
|
|
+ <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
|
|
+
|
|
|
|
+ <el-row :gutter="10" class="mb8">
|
|
|
|
+ <el-col :span="1.5">
|
|
|
|
+ <el-button
|
|
|
|
+ type="primary"
|
|
|
|
+ plain
|
|
|
|
+ icon="el-icon-plus"
|
|
|
|
+ size="mini"
|
|
|
|
+ @click="handleAdd"
|
|
|
|
+ >新增</el-button>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="1.5">
|
|
|
|
+ <el-button
|
|
|
|
+ type="success"
|
|
|
|
+ plain
|
|
|
|
+ icon="el-icon-edit"
|
|
|
|
+ size="mini"
|
|
|
|
+ :disabled="single"
|
|
|
|
+ @click="handleUpdate"
|
|
|
|
+ >修改</el-button>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="1.5">
|
|
|
|
+ <el-button
|
|
|
|
+ type="danger"
|
|
|
|
+ plain
|
|
|
|
+ icon="el-icon-delete"
|
|
|
|
+ size="mini"
|
|
|
|
+ :disabled="multiple"
|
|
|
|
+ @click="handleDelete"
|
|
|
|
+ >删除</el-button>
|
|
|
|
+ </el-col>
|
|
|
|
+
|
|
|
|
+ <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-table v-loading="loading" :data="deptList" @selection-change="handleSelectionChange">
|
|
|
|
+ <el-table-column label="事项标题" align="center" prop="title" />
|
|
|
|
+ <el-table-column label="主题类型" align="center" prop="type" />
|
|
|
|
+ <el-table-column label="所属部门" align="center" prop="department" />
|
|
|
|
+
|
|
|
|
+ <el-table-column label="是否展示" align="center" key="operation">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-switch
|
|
|
|
+ v-model="scope.row.operation"
|
|
|
|
+ :active-value="0"
|
|
|
|
+ :inactive-value="1"
|
|
|
|
+ @change="handleStatusChange(scope.row)"
|
|
|
|
+ ></el-switch>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="电话" align="center" prop="address" />
|
|
|
|
+ <el-table-column label="地址" align="center" prop="phone" />
|
|
|
|
+ <el-table-column label="图片" align="center" prop="picture" width="100">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <image-preview :src="scope.row.picture" :width="50" :height="50"/>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="审核状态" align="center" prop="examine" width="90" >
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <dict-tag :options="dict.type.examine_state" :value="scope.row.examine"/>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-button
|
|
|
|
+ v-if="scope.row.examine != 1"
|
|
|
|
+ size="mini"
|
|
|
|
+ type="text"
|
|
|
|
+ icon="el-icon-edit"
|
|
|
|
+ @click="handleUpdate(scope.row)"
|
|
|
|
+ >修改</el-button>
|
|
|
|
+
|
|
|
|
+ <el-button
|
|
|
|
+ v-if="scope.row.examine != 1"
|
|
|
|
+ size="mini"
|
|
|
|
+ type="text"
|
|
|
|
+ icon="el-icon-delete"
|
|
|
|
+ @click="handleDelete(scope.row)"
|
|
|
|
+ >删除</el-button>
|
|
|
|
+ <el-button
|
|
|
|
+ v-if="scope.row.examine != 1"
|
|
|
|
+ size="mini"
|
|
|
|
+ type="text"
|
|
|
|
+ icon="el-icon-delete"
|
|
|
|
+ @click="handleExamine(scope.row)"
|
|
|
|
+ >审核</el-button>
|
|
|
|
+
|
|
|
|
+ <el-button
|
|
|
|
+ size="mini"
|
|
|
|
+ type="text"
|
|
|
|
+ icon="el-icon-delete"
|
|
|
|
+ @click="handleview(scope.row)"
|
|
|
|
+ >查看</el-button>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+
|
|
|
|
+ <pagination
|
|
|
|
+ v-show="total>0"
|
|
|
|
+ :total="total"
|
|
|
|
+ :page.sync="queryParams.pageNum"
|
|
|
|
+ :limit.sync="queryParams.pageSize"
|
|
|
|
+ @pagination="getList"
|
|
|
|
+ />
|
|
|
|
+
|
|
|
|
+ <!-- 添加或修改部门对话框 -->
|
|
|
|
+ <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
|
|
|
+ <el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
|
+ <el-form-item label="事项标题" prop="title">
|
|
|
|
+ <el-input v-model="form.title" placeholder="请输入事项标题" style="width: 230px;" />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="正文" prop="content">
|
|
|
|
+ <editor v-model="form.content" :min-height="122" v-if="open" />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="主题类型" prop="type">
|
|
|
|
+ <el-select v-model="form.type" placeholder="请选择主题类型">
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in deptLists"
|
|
|
|
+ :key="item.id"
|
|
|
|
+ :label="item.deptName"
|
|
|
|
+ :value="item.deptName"
|
|
|
|
+ />
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="所属部门" prop="department">
|
|
|
|
+ <el-select v-model="form.department" placeholder="请输入所属部门">
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in departmentList"
|
|
|
|
+ :key="item.id"
|
|
|
|
+ :label="item.name"
|
|
|
|
+ :value="item.name"
|
|
|
|
+ />
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="是否常办">
|
|
|
|
+ <el-radio-group v-model="form.operation">
|
|
|
|
+ <el-radio
|
|
|
|
+ v-for="dict in dict.type.sys_normal_disable"
|
|
|
|
+ :key="dict.value"
|
|
|
|
+ :label="dict.value"
|
|
|
|
+ >{{dict.label}}</el-radio>
|
|
|
|
+ </el-radio-group>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="电话" prop="address" style="width: 300px;">
|
|
|
|
+ <el-input v-model="form.address" placeholder="请输入电话" />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="地址" prop="phone" style="width: 300px;">
|
|
|
|
+ <el-input v-model="form.phone" placeholder="请输入地址" />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="图片" prop="picture">
|
|
|
|
+ <image-upload v-model="form.picture" :fileSize="10" :limit="1"/>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
|
+ <el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
|
+ <el-button @click="cancel">取 消</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </el-dialog>
|
|
|
|
+ <!-- 审核对话框 -->
|
|
|
|
+ <el-dialog title="审核" :visible.sync="dialogVisible" width="20%" :before-close="handleDialogClose">
|
|
|
|
+ <el-form ref="form" :model="form" :rules="rules" label-width="50px">
|
|
|
|
+ <el-form-item label="审核" prop="examine">
|
|
|
|
+ <el-select v-model="form.examine" placeholder="请选择此事项审核状态">
|
|
|
|
+ <el-option v-for="dict in dict.type.examine_state" :key="dict.value" :label="dict.label" :value="dict.value" />
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
|
+ <el-button type="primary" @click="confirmExamine">确认</el-button>
|
|
|
|
+ <el-button @click="cancelExamine">取消</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </el-dialog>
|
|
|
|
+
|
|
|
|
+ <!-- 详情 -->
|
|
|
|
+ <el-dialog :title="title" :visible.sync="openSee" width="600px" append-to-body>
|
|
|
|
+
|
|
|
|
+ <el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
|
+
|
|
|
|
+ <el-form-item label="事项标题" prop="title" >
|
|
|
|
+ <el-input v-model="form.title" placeholder="请输入事项标题" style="width: 230px;" :readonly="true" />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="正文" prop="content" >
|
|
|
|
+ <editor v-model="form.content" :min-height="122" :readonly="true" />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="主体类型" prop="type" >
|
|
|
|
+ <el-select v-model="form.type" placeholder="请选择主体类型" :disabled="true">
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in deptLists"
|
|
|
|
+ :readonly="true"
|
|
|
|
+ :key="item.id"
|
|
|
|
+ :label="item.deptName"
|
|
|
|
+ :value="item.deptName"
|
|
|
|
+ />
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="所属部门" prop="department" >
|
|
|
|
+ <el-select v-model="form.department" placeholder="请输入所属部门":disabled="true">
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in departmentList"
|
|
|
|
+ :key="item.id"
|
|
|
|
+ :label="item.name"
|
|
|
|
+ :value="item.name"
|
|
|
|
+ />
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="是否常办" >
|
|
|
|
+ <el-radio-group v-model="form.operation">
|
|
|
|
+ <el-radio
|
|
|
|
+ v-for="dict in dict.type.sys_normal_disable"
|
|
|
|
+ :key="dict.value"
|
|
|
|
+ :disabled="true"
|
|
|
|
+ :label="dict.value"
|
|
|
|
+ >{{dict.label}}</el-radio>
|
|
|
|
+ </el-radio-group>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="电话" prop="address" style="width: 300px;" >
|
|
|
|
+ <el-input v-model="form.address" placeholder="请输入电话" :readonly="true" />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="地址" prop="phone" style="width: 300px;" >
|
|
|
|
+ <el-input v-model="form.phone" placeholder="请输入地址" :readonly="true" />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="图片" prop="picture" >
|
|
|
|
+ <image-upload v-model="form.picture" :fileSize="10" :limit="1" />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
|
+ <el-button @click="cancel">取 消</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </el-dialog>
|
|
|
|
+ </div>
|
|
|
|
+</template>
|
|
|
|
+
|
|
|
|
+<script>
|
|
|
|
+ import { listDept, getDept, delDept, addDept, updateDept,examine } from "@/api/matter/matter";
|
|
|
|
+ import { listTopicType } from "@/api/handleAffairs/topicType";
|
|
|
|
+ import { listDepts } from "@/api/department/department";
|
|
|
|
+ export default {
|
|
|
|
+ name: "Dept",
|
|
|
|
+ dicts: ['object_application','sys_normal_disable','examine_state'],
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ // 遮罩层
|
|
|
|
+ loading: true,
|
|
|
|
+ // 选中数组
|
|
|
|
+ ids: [],
|
|
|
|
+ // 非单个禁用
|
|
|
|
+ single: true,
|
|
|
|
+ // 非多个禁用
|
|
|
|
+ multiple: true,
|
|
|
|
+ // 显示搜索条件
|
|
|
|
+ showSearch: true,
|
|
|
|
+ // 是否显示详情弹出层
|
|
|
|
+ openSee: false,
|
|
|
|
+ // 总条数
|
|
|
|
+ dialogVisible: false,
|
|
|
|
+ total: 0,
|
|
|
|
+ // 部门表格数据
|
|
|
|
+ deptList: [],
|
|
|
|
+ deptLists:[],
|
|
|
|
+ departmentList:[],
|
|
|
|
+ // 弹出层标题
|
|
|
|
+ title: "",
|
|
|
|
+ // 是否显示弹出层
|
|
|
|
+ open: false,
|
|
|
|
+ // 查询参数
|
|
|
|
+ queryParams: {
|
|
|
|
+ id:null,
|
|
|
|
+ title: null,
|
|
|
|
+ type: null,
|
|
|
|
+ department: null,
|
|
|
|
+ operation: null,
|
|
|
|
+ address: null,
|
|
|
|
+ phone: null,
|
|
|
|
+ picture: null,
|
|
|
|
+ pageNum: 1,
|
|
|
|
+ pageSize: 10,
|
|
|
|
+ email: null,
|
|
|
|
+ content:null,
|
|
|
|
+ examine:null,
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ queryParamss: {
|
|
|
|
+ id:null,
|
|
|
|
+ deptName: null,
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ queryParamsss: {
|
|
|
|
+ id:null,
|
|
|
|
+ name: null,
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ // 表单参数
|
|
|
|
+ form: {},
|
|
|
|
+ // 表单校验
|
|
|
|
+ rules: {
|
|
|
|
+ title: [
|
|
|
|
+ { required: true, message: "事项标题不能为空", trigger: "blur" }
|
|
|
|
+ ],
|
|
|
|
+ type: [
|
|
|
|
+ { required: true, message: "主题类型不能为空", trigger: "blur" }
|
|
|
|
+ ],
|
|
|
|
+ department: [
|
|
|
|
+ { required: true, message: "所属部门不能为空", trigger: "blur" }
|
|
|
|
+ ],
|
|
|
|
+ operation: [
|
|
|
|
+ { required: true, message: "请选择是否常办", trigger: "blur" }
|
|
|
|
+ ],
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
+ },
|
|
|
|
+ created() {
|
|
|
|
+ this.getList();
|
|
|
|
+ this.getgrid();
|
|
|
|
+ this.getdepartment();
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ /** 查询部门列表 */
|
|
|
|
+ getList() {
|
|
|
|
+ this.loading = true;
|
|
|
|
+ listDept(this.queryParams).then(response => {
|
|
|
|
+ this.deptList = response.rows;
|
|
|
|
+ this.total = response.total;
|
|
|
|
+ this.loading = false;
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ getgrid() {
|
|
|
|
+ this.loading = true;
|
|
|
|
+ listTopicType(this.queryParamss).then(response => {
|
|
|
|
+ this.deptLists = response.rows;
|
|
|
|
+ this.total = response.total;
|
|
|
|
+ this.loading = false;
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ getdepartment() {
|
|
|
|
+ this.loading = true;
|
|
|
|
+ listDepts(this.queryParamss).then(response => {
|
|
|
|
+ this.departmentList = response.rows;
|
|
|
|
+ this.total = response.total;
|
|
|
|
+ this.loading = false;
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ /** 查询事项详情 */
|
|
|
|
+ handleview(row) {
|
|
|
|
+ this.reset();
|
|
|
|
+ console.log("999999999999",row)
|
|
|
|
+ getDept(row.id).then(response => {
|
|
|
|
+ this.form = response.data;
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ this.form.operation = this.form.operation.toString();
|
|
|
|
+ });
|
|
|
|
+ this.openSee = true;
|
|
|
|
+ this.title = "详情";
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ // getDept(row.id).then(response => {
|
|
|
|
+ // this.form = response.data;
|
|
|
|
+ // this.$nextTick(() => {
|
|
|
|
+ // this.form.operation = this.form.operation.toString();
|
|
|
|
+ // });
|
|
|
|
+ // this.open = true;
|
|
|
|
+ // this.title = "修改事项";
|
|
|
|
+ // });
|
|
|
|
+ // 取消按钮
|
|
|
|
+ cancel() {
|
|
|
|
+ this.open = false;
|
|
|
|
+ this.reset();
|
|
|
|
+ this.openSee = false;
|
|
|
|
+ },
|
|
|
|
+ // 表单重置
|
|
|
|
+ reset() {
|
|
|
|
+ this.form = {
|
|
|
|
+ name: null,
|
|
|
|
+ operation: null,
|
|
|
|
+ application: null,
|
|
|
|
+ content:null,
|
|
|
|
+ };
|
|
|
|
+ this.resetForm("form");
|
|
|
|
+ },
|
|
|
|
+ /** 搜索按钮操作 */
|
|
|
|
+ handleQuery() {
|
|
|
|
+ this.queryParams.pageNum = 1;
|
|
|
|
+ this.getList();
|
|
|
|
+ },
|
|
|
|
+ /** 重置按钮操作 */
|
|
|
|
+ resetQuery() {
|
|
|
|
+ this.resetForm("queryForm");
|
|
|
|
+ this.handleQuery();
|
|
|
|
+ },
|
|
|
|
+ // 多选框选中数据
|
|
|
|
+ handleSelectionChange(selection) {
|
|
|
|
+ this.ids = selection.map(item => item.deptId)
|
|
|
|
+ this.single = selection.length!==1
|
|
|
|
+ this.multiple = !selection.length
|
|
|
|
+ },
|
|
|
|
+ /** 新增按钮操作 */
|
|
|
|
+ handleAdd() {
|
|
|
|
+ this.reset();
|
|
|
|
+ this.open = true;
|
|
|
|
+ this.title = "添加事项";
|
|
|
|
+ },
|
|
|
|
+ /** 修改按钮操作 */
|
|
|
|
+ handleUpdate(row) {
|
|
|
|
+ if (row.examine != 3) {
|
|
|
|
+ this.$message.error('禁止修改:此事项不符合修改条件!');
|
|
|
|
+ } else {
|
|
|
|
+ this.reset();
|
|
|
|
+ const id = row.id || this.id;
|
|
|
|
+ getDept(row.id).then(response => {
|
|
|
|
+ this.form = response.data;
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ this.form.operation = this.form.operation.toString();
|
|
|
|
+ });
|
|
|
|
+ this.open = true;
|
|
|
|
+ this.title = "修改事项";
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ /** 提交按钮 */
|
|
|
|
+ submitForm() {
|
|
|
|
+ this.$refs["form"].validate(valid => {
|
|
|
|
+ if (valid) {
|
|
|
|
+ if (this.form.id != null ) {
|
|
|
|
+ updateDept(this.form).then(response => {
|
|
|
|
+ this.$modal.msgSuccess("修改成功");
|
|
|
|
+ this.open = false;
|
|
|
|
+ this.getList();
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ addDept(this.form).then(response => {
|
|
|
|
+ this.$modal.msgSuccess("新增成功");
|
|
|
|
+ this.open = false;
|
|
|
|
+ this.getList();
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ handleExamine(row) {
|
|
|
|
+ this.dialogVisible = true;
|
|
|
|
+ this.form=row
|
|
|
|
+ },
|
|
|
|
+ confirmExamine() {
|
|
|
|
+ // 提交审核后关闭弹窗
|
|
|
|
+ this.$refs["form"].validate(valid => {
|
|
|
|
+ if (valid) {
|
|
|
|
+ examine(this.form).then(response => {
|
|
|
|
+ this.$modal.msgSuccess("修改成功");
|
|
|
|
+ this.getList();
|
|
|
|
+ this.dialogVisible = false;
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ cancelExamine() {
|
|
|
|
+ // 关闭弹窗
|
|
|
|
+ this.dialogVisible = false;
|
|
|
|
+ },
|
|
|
|
+ handleDialogClose(done) {
|
|
|
|
+ done(); // 关闭弹窗
|
|
|
|
+ },
|
|
|
|
+ // 用户状态修改
|
|
|
|
+ handleStatusChange(row) {
|
|
|
|
+ let text = row.operation === "0" ? "启用" : "停用";
|
|
|
|
+ this.$modal.confirm('确认要"' + text + '""' + row.userName + '"用户吗?').then(function() {
|
|
|
|
+ return updateDept(row);
|
|
|
|
+ }).then(() => {
|
|
|
|
+ this.$modal.msgSuccess(text + "成功");
|
|
|
|
+ }).catch(function() {
|
|
|
|
+ row.operation = row.operation === "0" ? "1" : "0";
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ /** 删除按钮操作 */
|
|
|
|
+ handleDelete(row) {
|
|
|
|
+ if (row.examine != 3) {
|
|
|
|
+ this.$message.error('禁止删除:此事项不允许删除!');
|
|
|
|
+ } else {
|
|
|
|
+ const id = row.id || this.id;
|
|
|
|
+ this.$modal.confirm('是否确认删除此事项?').then(function() {
|
|
|
|
+ return delDept(id);
|
|
|
|
+ }).then(() => {
|
|
|
|
+ this.getList();
|
|
|
|
+ this.$modal.msgSuccess("删除成功");
|
|
|
|
+ }).catch(() => {
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
+</script>
|