You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
677 lines
24 KiB
677 lines
24 KiB
<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="groupId">
|
|
<el-select v-model="queryParams.groupId" placeholder="请选择组别" @change="handleQuery">
|
|
<el-option
|
|
v-for="item in options"
|
|
:key="item.key"
|
|
:label="item.text"
|
|
:value="item.key">
|
|
</el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item>
|
|
<!-- <el-button type="primary" icon="el-icon-search" size="mini" >搜索</el-button>-->
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
</el-form-item>
|
|
</el-form>
|
|
<div style="width: 100%;height: 100%;display: flex;justify-content: space-around" v-if="this.queryParams.groupId==0">
|
|
<div style="width: 20%;">
|
|
<div style="display: flex; flex-direction: row;justify-content: space-around;margin-bottom: 10px;">
|
|
<div style="text-align: center;font-size: 1.2vw;font-weight: bold;margin-bottom: 4%;">方向</div>
|
|
<el-button style="height: 80%;" type="primary" @click="addZhyDoc('方向')" plain size="mini">新增</el-button>
|
|
</div>
|
|
|
|
<el-table border height="700" v-loading="loading" :data="docmubanList01" >
|
|
|
|
<el-table-column label="内容" align="center" prop="text" />
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
<template slot-scope="scope">
|
|
<el-button
|
|
size="mini"
|
|
type="text"
|
|
icon="el-icon-edit"
|
|
@click="handleUpdate(scope.row)"
|
|
>修改</el-button>
|
|
<el-button
|
|
size="mini"
|
|
type="text"
|
|
icon="el-icon-delete"
|
|
@click="handleDelete(scope.row)"
|
|
>删除</el-button>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</div>
|
|
<div style="width: 20%;margin-left: 5%">
|
|
<div style="display: flex; flex-direction: row;justify-content: space-around;margin-bottom: 10px;">
|
|
<div style="text-align: center;font-size: 1.2vw;font-weight: bold;margin-bottom: 4%;">作战</div>
|
|
<el-button style="height: 80%;" type="primary" @click="addZhyDoc('作战')" plain size="mini">新增</el-button>
|
|
</div>
|
|
<el-table border height="700" v-loading="loading" :data="docmubanList02" >
|
|
|
|
<el-table-column label="内容" align="center" prop="text" />
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
<template slot-scope="scope">
|
|
<el-button
|
|
size="mini"
|
|
type="text"
|
|
icon="el-icon-edit"
|
|
@click="handleUpdate(scope.row)"
|
|
>修改</el-button>
|
|
<el-button
|
|
size="mini"
|
|
type="text"
|
|
icon="el-icon-delete"
|
|
@click="handleDelete(scope.row)"
|
|
>删除</el-button>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</div>
|
|
<div style="width: 20%;margin-left: 5%">
|
|
<div style="display: flex; flex-direction: row;justify-content: space-around;margin-bottom: 10px;">
|
|
<div style="text-align: center;font-size: 1.2vw;font-weight: bold;margin-bottom: 4%;">装备</div>
|
|
<el-button style="height: 80%;" type="primary" @click="addZhyDoc('装备')" plain size="mini">新增</el-button>
|
|
</div>
|
|
<el-table border height="700" v-loading="loading" :data="docmubanList03" >
|
|
|
|
<el-table-column label="内容" align="center" prop="text" />
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
<template slot-scope="scope">
|
|
<el-button
|
|
size="mini"
|
|
type="text"
|
|
icon="el-icon-edit"
|
|
@click="handleUpdate(scope.row)"
|
|
>修改</el-button>
|
|
<el-button
|
|
size="mini"
|
|
type="text"
|
|
icon="el-icon-delete"
|
|
@click="handleDelete(scope.row)"
|
|
>删除</el-button>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</div>
|
|
<div style="width: 20%;margin-left: 5%">
|
|
<div style="display: flex; flex-direction: row;justify-content: space-around;margin-bottom: 10px;">
|
|
<div style="text-align: center;font-size: 1.2vw;font-weight: bold;margin-bottom: 4%;">环境</div>
|
|
<el-button style="height: 80%;" type="primary" @click="addZhyDoc('环境')" plain size="mini">新增</el-button>
|
|
</div>
|
|
<el-table border height="700" v-loading="loading" :data="docmubanList04" >
|
|
|
|
<el-table-column label="内容" align="center" prop="text" />
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
<template slot-scope="scope">
|
|
<el-button
|
|
size="mini"
|
|
type="text"
|
|
icon="el-icon-edit"
|
|
@click="handleUpdate(scope.row)"
|
|
>修改</el-button>
|
|
<el-button
|
|
size="mini"
|
|
type="text"
|
|
icon="el-icon-delete"
|
|
@click="handleDelete(scope.row)"
|
|
>删除</el-button>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
<div style="width: 100%;height: 100%;display: flex;justify-content: space-around" v-if="this.queryParams.groupId==1">
|
|
<div style="width: 20%;">
|
|
<div style="display: flex; flex-direction: row;justify-content: space-around;margin-bottom: 10px;">
|
|
<div style="text-align: center;font-size: 1.2vw;font-weight: bold;margin-bottom: 4%;">业务系统</div>
|
|
<el-button style="height: 80%;" type="primary" @click="addZhyDoc('业务系统')" plain size="mini">新增</el-button>
|
|
</div>
|
|
<el-table border height="700" v-loading="loading" :data="docmubanList11" >
|
|
|
|
<el-table-column label="内容" align="center" prop="text" />
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
<template slot-scope="scope">
|
|
<el-button
|
|
size="mini"
|
|
type="text"
|
|
icon="el-icon-edit"
|
|
@click="handleUpdate(scope.row)"
|
|
>修改</el-button>
|
|
<el-button
|
|
size="mini"
|
|
type="text"
|
|
icon="el-icon-delete"
|
|
@click="handleDelete(scope.row)"
|
|
>删除</el-button>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</div>
|
|
<div style="width: 20%;margin-left: 5%">
|
|
<div style="display: flex; flex-direction: row;justify-content: space-around;margin-bottom: 10px;">
|
|
<div style="text-align: center;font-size: 1.2vw;font-weight: bold;margin-bottom: 4%;">模型库</div>
|
|
<el-button style="height: 80%;" type="primary" @click="addZhyDoc('模型库')" plain size="mini">新增</el-button>
|
|
</div>
|
|
|
|
<el-table border height="700" v-loading="loading" :data="docmubanList12" >
|
|
|
|
<el-table-column label="内容" align="center" prop="text" />
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
<template slot-scope="scope">
|
|
<el-button
|
|
size="mini"
|
|
type="text"
|
|
icon="el-icon-edit"
|
|
@click="handleUpdate(scope.row)"
|
|
>修改</el-button>
|
|
<el-button
|
|
size="mini"
|
|
type="text"
|
|
icon="el-icon-delete"
|
|
@click="handleDelete(scope.row)"
|
|
>删除</el-button>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</div>
|
|
<!-- <div style="width: 15%;margin-left: 5%">-->
|
|
<!-- <div style="text-align: center;font-size: 1.2vw;font-weight: bold;margin-bottom: 4%;">规则库</div>-->
|
|
<!-- <el-table border height="700" v-loading="loading" :data="docmubanList13" >-->
|
|
|
|
<!-- <el-table-column label="内容" align="center" prop="text" />-->
|
|
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
|
|
<!-- <template slot-scope="scope">-->
|
|
<!-- <el-button-->
|
|
<!-- size="mini"-->
|
|
<!-- type="text"-->
|
|
<!-- icon="el-icon-edit"-->
|
|
<!-- @click="handleUpdate(scope.row)"-->
|
|
<!-- >修改</el-button>-->
|
|
<!-- <el-button-->
|
|
<!-- size="mini"-->
|
|
<!-- type="text"-->
|
|
<!-- icon="el-icon-delete"-->
|
|
<!-- @click="handleDelete(scope.row)"-->
|
|
<!-- >删除</el-button>-->
|
|
<!-- </template>-->
|
|
<!-- </el-table-column>-->
|
|
<!-- </el-table>-->
|
|
<!-- </div>-->
|
|
<div style="width: 20%;margin-left: 5%">
|
|
<div style="display: flex; flex-direction: row;justify-content: space-around;margin-bottom: 10px;">
|
|
<div style="text-align: center;font-size: 1.2vw;font-weight: bold;margin-bottom: 4%;">大类</div>
|
|
<el-button style="height: 80%;" type="primary" @click="addZhyDoc('大类')" plain size="mini">新增</el-button>
|
|
</div>
|
|
|
|
<el-table border height="700" v-loading="loading" :data="docmubanList14" >
|
|
|
|
<el-table-column label="内容" align="center" prop="text" />
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
<template slot-scope="scope">
|
|
<el-button
|
|
size="mini"
|
|
type="text"
|
|
icon="el-icon-edit"
|
|
@click="handleUpdate(scope.row)"
|
|
>修改</el-button>
|
|
<el-button
|
|
size="mini"
|
|
type="text"
|
|
icon="el-icon-delete"
|
|
@click="handleDelete(scope.row)"
|
|
>删除</el-button>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</div>
|
|
<div style="width: 20%;margin-left: 5%">
|
|
<div style="display: flex; flex-direction: row;justify-content: space-around;margin-bottom: 10px;">
|
|
<div style="text-align: center;font-size: 1.2vw;font-weight: bold;margin-bottom: 4%;">小类</div>
|
|
<el-button style="height: 80%;" type="primary" @click="addZhyDoc('小类')" plain size="mini">新增</el-button>
|
|
</div>
|
|
|
|
<el-table border height="700" v-loading="loading" :data="docmubanList15" >
|
|
|
|
<el-table-column label="内容" align="center" prop="text" />
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
<template slot-scope="scope">
|
|
<el-button
|
|
size="mini"
|
|
type="text"
|
|
icon="el-icon-edit"
|
|
@click="handleUpdate(scope.row)"
|
|
>修改</el-button>
|
|
<el-button
|
|
size="mini"
|
|
type="text"
|
|
icon="el-icon-delete"
|
|
@click="handleDelete(scope.row)"
|
|
>删除</el-button>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
<div style="width: 100%;height: 100%;display: flex;justify-content: space-around" v-if="this.queryParams.groupId==2">
|
|
<div style="width: 30%;">
|
|
<div style="display: flex; flex-direction: row;justify-content: space-around;margin-bottom: 10px;">
|
|
<div style="text-align: center;font-size: 1.2vw;font-weight: bold;margin-bottom: 4%;">模型</div>
|
|
<el-button style="height: 80%;" type="primary" @click="addZhyDoc('模型')" plain size="mini">新增</el-button>
|
|
</div>
|
|
<el-table border height="700" v-loading="loading" :data="docmubanList21" >
|
|
|
|
<el-table-column label="内容" align="center" prop="text" />
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
<template slot-scope="scope">
|
|
<el-button
|
|
size="mini"
|
|
type="text"
|
|
icon="el-icon-edit"
|
|
@click="handleUpdate(scope.row)"
|
|
>修改</el-button>
|
|
<el-button
|
|
size="mini"
|
|
type="text"
|
|
icon="el-icon-delete"
|
|
@click="handleDelete(scope.row)"
|
|
>删除</el-button>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</div>
|
|
<div style="width: 30%;margin-left: 5%">
|
|
<div style="display: flex; flex-direction: row;justify-content: space-around;margin-bottom: 10px;">
|
|
<div style="text-align: center;font-size: 1.2vw;font-weight: bold;margin-bottom: 4%;">指标</div>
|
|
<el-button style="height: 80%;" type="primary" @click="addZhyDoc('指标')" plain size="mini">新增</el-button>
|
|
</div>
|
|
<el-table border height="700" v-loading="loading" :data="docmubanList22" >
|
|
|
|
<el-table-column label="内容" align="center" prop="text" />
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
<template slot-scope="scope">
|
|
<el-button
|
|
size="mini"
|
|
type="text"
|
|
icon="el-icon-edit"
|
|
@click="handleUpdate(scope.row)"
|
|
>修改</el-button>
|
|
<el-button
|
|
size="mini"
|
|
type="text"
|
|
icon="el-icon-delete"
|
|
@click="handleDelete(scope.row)"
|
|
>删除</el-button>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<!-- 添加ZhyDocmuban对话框 -->
|
|
<el-dialog :title="title" :visible.sync="addZhyDocmubanOpen" width="500px" append-to-body>
|
|
<el-form ref="form" :model="addform" :rules="rules" label-width="80px">
|
|
<el-form-item label="名称">
|
|
<el-input v-model="addform.text"></el-input>
|
|
</el-form-item>
|
|
<el-form-item label="层级">
|
|
<el-input v-model="addform.type" disabled></el-input>
|
|
</el-form-item>
|
|
<!-- <el-form-item label="父级节点">-->
|
|
<!-- <el-select v-model="form.parentId" placeholder="请选择父级节点" :disabled="this.form.type=='方向'|| this.form.type=='业务系统' || this.form.type=='模型'">-->
|
|
<!-- <el-option v-for="item in parentsList" :label="item.text" :value="item.id"></el-option>-->
|
|
<!-- </el-select>-->
|
|
<!-- </el-form-item>-->
|
|
<el-form-item style="position: relative ;" label="内容">
|
|
<Editor v-model="addform.content"></Editor>
|
|
</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="title" :visible.sync="updateZhyDocmubanOpen" width="500px" append-to-body>
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
<el-form-item label="名称">
|
|
<el-input v-model="form.text"></el-input>
|
|
</el-form-item>
|
|
<!-- <el-form-item label="父级节点">-->
|
|
<!-- <el-select v-model="form.parentId" placeholder="请选择父级节点" :disabled="this.form.type=='方向'|| this.form.type=='业务系统' || this.form.type=='模型'">-->
|
|
<!-- <el-option v-for="item in parentsList" :label="item.text" :value="item.id"></el-option>-->
|
|
<!-- </el-select>-->
|
|
<!-- </el-form-item>-->
|
|
<el-form-item style="position: relative ;" label="内容">
|
|
<Editor v-model="form.content"></Editor>
|
|
</el-form-item>
|
|
</el-form>
|
|
<div slot="footer" class="dialog-footer">
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
<el-button @click="cancelUpdate">取 消</el-button>
|
|
</div>
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 添加或修改图谱模板对话框 -->
|
|
<!-- <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>-->
|
|
<!-- <el-form ref="form" :model="form" :rules="rules" label-width="80px">-->
|
|
<!-- </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>-->
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import { listDocmuban, getDocmuban, delDocmuban, addDocmuban, updateDocmuban } from "@/api/system/docmuban";
|
|
import {addList, getParentList} from "../../../api/system/docmuban";
|
|
|
|
export default {
|
|
name: "Docmuban",
|
|
data() {
|
|
return {
|
|
options:[
|
|
{
|
|
key:0,
|
|
text:"方向-作战-装备-环境"
|
|
},
|
|
{
|
|
key:1,
|
|
text:"业务系统-模型库-大类-小类"
|
|
},
|
|
{
|
|
key:2,
|
|
text:"模型-指标"
|
|
}
|
|
],
|
|
// 遮罩层
|
|
loading: true,
|
|
// 选中数组
|
|
ids: [],
|
|
// 非单个禁用
|
|
single: true,
|
|
// 非多个禁用
|
|
multiple: true,
|
|
// 显示搜索条件
|
|
showSearch: true,
|
|
// 总条数
|
|
total: 0,
|
|
// 图谱模板表格数据
|
|
docmubanList: [],
|
|
|
|
docmubanList01: [],
|
|
docmubanList02: [],
|
|
docmubanList03: [],
|
|
docmubanList04: [],
|
|
|
|
|
|
|
|
|
|
docmubanList11: [],
|
|
docmubanList12: [],
|
|
docmubanList13: [],
|
|
docmubanList14: [],
|
|
docmubanList15: [],
|
|
|
|
|
|
docmubanList21: [],
|
|
docmubanList22: [],
|
|
|
|
|
|
// 弹出层标题
|
|
title: "",
|
|
// 是否显示弹出层
|
|
open: false,
|
|
addZhyDocmubanOpen: false,
|
|
addform:{},
|
|
updateZhyDocmubanOpen:false,
|
|
// 查询参数
|
|
queryParams: {
|
|
pageNum: 1,
|
|
pageSize: 10,
|
|
text: null,
|
|
type: null,
|
|
groupId: 0,
|
|
parentId: null,
|
|
relation: null
|
|
},
|
|
// 表单参数
|
|
form: {},
|
|
// 表单校验
|
|
rules: {
|
|
text: [
|
|
{ required: true, message: "内容不能为空", trigger: "blur" }
|
|
],
|
|
type: [
|
|
{ required: true, message: "种类不能为空", trigger: "change" }
|
|
],
|
|
groupId: [
|
|
{ required: true, message: "组别不能为空", trigger: "blur" }
|
|
],
|
|
},
|
|
parentsList:[],
|
|
testInfo:["补给舰航行安全风险指数",
|
|
"导弹艇航行安全风险指数",
|
|
"驱逐舰航行安全风险指数",
|
|
"攻击型潜艇航行安全风险指数",
|
|
"护卫舰航行安全风险指数",
|
|
"舰炮打击效能影响指数",
|
|
"舰射鱼雷打击效能影响指数",
|
|
"舰载反舰导弹打击效能影响指数",
|
|
"舰载防空导弹打击效能影响指数",
|
|
"舰载机飞行安全风险指数",
|
|
"舰载雷达探测效能影响指数",
|
|
"舰载声纳探测效能影响指数",
|
|
"舰载直升机降落安全风险指数",
|
|
"舰载直升机起飞安全风险指数",
|
|
"湿热指数",
|
|
"风寒指数",
|
|
"水面舰艇综合效能影响指数",
|
|
"舰艇机动效能影响指数",
|
|
"舰艇声呐效能影响指数",
|
|
"巡航导弹效能影响指数",
|
|
"防空导弹效能影响指数",
|
|
"水面舰艇航行之环境影响指数",
|
|
"飞机起降与飞行安全影响指数",
|
|
"空载武器打击精度环境影响指数",
|
|
"舰载武器打击精度环境影响指数",
|
|
"两栖登陆作战环境风险指数",
|
|
"岛礁空降作战环境风险指数",
|
|
"蛙人特种作战环境风险指数",
|
|
"岛礁防卫作战环境风险指数"],
|
|
|
|
};
|
|
},
|
|
created() {
|
|
this.getList();
|
|
// this.addListInfo()
|
|
},
|
|
methods: {
|
|
addListInfo(){
|
|
addList(this.testInfo).then((res)=>{
|
|
console.log(res);
|
|
})
|
|
},
|
|
/** 查询图谱模板列表 */
|
|
getList() {
|
|
this.loading = true;
|
|
listDocmuban(this.queryParams).then(response => {
|
|
const grouped = response; // { "合同模板": [...], "报告模板": [...] }
|
|
if(this.queryParams.groupId==0){
|
|
this.docmubanList01 = grouped["方向"] || [];
|
|
this.docmubanList02 = grouped["作战"] || [];
|
|
this.docmubanList03 = grouped["装备"] || [];
|
|
this.docmubanList04 = grouped["环境"] || [];
|
|
}
|
|
if(this.queryParams.groupId==1){
|
|
this.docmubanList11 = grouped["业务系统"] || [];
|
|
this.docmubanList12 = grouped["模型库"] || [];
|
|
this.docmubanList14 = grouped["大类"] || [];
|
|
this.docmubanList15 = grouped["小类"] || [];
|
|
}
|
|
if(this.queryParams.groupId==2){
|
|
this.docmubanList21 = grouped["模型"] || [];
|
|
this.docmubanList22 = grouped["指标"] || [];
|
|
|
|
}
|
|
|
|
|
|
|
|
// this.docmubanList = response;
|
|
this.loading = false;
|
|
});
|
|
},
|
|
addData(){
|
|
addDocmuban().then(response => {
|
|
console.log(response)
|
|
})
|
|
},
|
|
//弹出添加zhyDoc弹窗按钮
|
|
addZhyDoc(type){
|
|
this.addform = {}
|
|
this.handleAdd()
|
|
this.addform.type = type;
|
|
|
|
if(this.addform.type == "方向" || this.addform.type == "作战" || this.addform.type == "装备" || this.addform.type == "环境"){
|
|
|
|
this.addform.groupId = 0;
|
|
}
|
|
if(this.addform.type == "业务系统" || this.addform.type == "模型库" || this.addform.type == "大类" || this.addform.type == "小类"){
|
|
this.addform.groupId = 1;
|
|
}
|
|
if(this.addform.type == "模型" || this.addform.type == "指标"){
|
|
this.addform.groupId = 2;
|
|
|
|
}
|
|
|
|
getParentList( this.addform).then((res)=>{
|
|
console.log(res)
|
|
if(res.data.length!=0){
|
|
this.parentsList = res.data;
|
|
}
|
|
})
|
|
//查询
|
|
this.addZhyDocmubanOpen = true
|
|
},
|
|
// 取消按钮
|
|
cancel() {
|
|
this.addZhyDocmubanOpen = false;
|
|
this.reset();
|
|
},
|
|
cancelUpdate(){
|
|
this.updateZhyDocmubanOpen = false;
|
|
this.reset();
|
|
},
|
|
// 表单重置
|
|
reset() {
|
|
this.form = {
|
|
id: null,
|
|
text: null,
|
|
type: null,
|
|
groupId: null,
|
|
parentId: null,
|
|
relation: 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.id)
|
|
this.single = selection.length!==1
|
|
this.multiple = !selection.length
|
|
},
|
|
/** 新增按钮操作 */
|
|
handleAdd() {
|
|
this.reset();
|
|
this.open = true;
|
|
this.title = "添加图谱模板";
|
|
},
|
|
/** 修改按钮操作 */
|
|
handleUpdate(row) {
|
|
this.reset();
|
|
const id = row.id || this.ids
|
|
getDocmuban(id).then(response => {
|
|
this.form = response.data;
|
|
|
|
getParentList( this.form).then((res)=>{
|
|
if(res.data.length!=0){
|
|
this.parentsList = res.data;
|
|
}
|
|
})
|
|
this.updateZhyDocmubanOpen = true;
|
|
this.title = "修改图谱模板";
|
|
});
|
|
},
|
|
/** 提交按钮 */
|
|
submitForm() {
|
|
this.$refs["form"].validate(valid => {
|
|
if (valid) {
|
|
if (this.form.id != null) {
|
|
updateDocmuban(this.form).then(response => {
|
|
this.$modal.msgSuccess("修改成功");
|
|
this.updateZhyDocmubanOpen = false;
|
|
this.getList();
|
|
});
|
|
} else {
|
|
addDocmuban(this.addform).then(response => {
|
|
this.$modal.msgSuccess("新增成功");
|
|
this.addZhyDocmubanOpen = false;
|
|
this.getList();
|
|
|
|
});
|
|
}
|
|
}
|
|
});
|
|
},
|
|
/** 删除按钮操作 */
|
|
handleDelete(row) {
|
|
const ids = row.id || this.ids;
|
|
this.$modal.confirm('是否确认删除图谱模板编号为"' + ids + '"的数据项?').then(function() {
|
|
return delDocmuban(ids);
|
|
}).then(() => {
|
|
this.getList();
|
|
this.$modal.msgSuccess("删除成功");
|
|
}).catch(() => {});
|
|
},
|
|
/** 导出按钮操作 */
|
|
handleExport() {
|
|
this.download('system/docmuban/export', {
|
|
...this.queryParams
|
|
}, `docmuban_${new Date().getTime()}.xlsx`)
|
|
}
|
|
}
|
|
};
|
|
</script>
|
|
|