|
|
|
@ -20,7 +20,11 @@ |
|
|
|
</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="text-align: center;font-size: 1.2vw;font-weight: bold;margin-bottom: 4%;">方向</div> |
|
|
|
<div style="display: flex; flex-direction: row;justify-content: space-around;"> |
|
|
|
<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>新增</el-button> |
|
|
|
</div> |
|
|
|
|
|
|
|
<el-table border height="700" v-loading="loading" :data="docmubanList01" > |
|
|
|
|
|
|
|
<el-table-column label="内容" align="center" prop="text" /> |
|
|
|
@ -43,7 +47,10 @@ |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
<div style="width: 20%;margin-left: 5%"> |
|
|
|
<div style="text-align: center;font-size: 1.2vw;font-weight: bold;margin-bottom: 4%;">作战</div> |
|
|
|
<div style="display: flex; flex-direction: row;justify-content: space-around;"> |
|
|
|
<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>新增</el-button> |
|
|
|
</div> |
|
|
|
<el-table border height="700" v-loading="loading" :data="docmubanList02" > |
|
|
|
|
|
|
|
<el-table-column label="内容" align="center" prop="text" /> |
|
|
|
@ -66,7 +73,10 @@ |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
<div style="width: 20%;margin-left: 5%"> |
|
|
|
<div style="text-align: center;font-size: 1.2vw;font-weight: bold;margin-bottom: 4%;">装备</div> |
|
|
|
<div style="display: flex; flex-direction: row;justify-content: space-around"> |
|
|
|
<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>新增</el-button> |
|
|
|
</div> |
|
|
|
<el-table border height="700" v-loading="loading" :data="docmubanList03" > |
|
|
|
|
|
|
|
<el-table-column label="内容" align="center" prop="text" /> |
|
|
|
@ -89,7 +99,10 @@ |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
<div style="width: 20%;margin-left: 5%"> |
|
|
|
<div style="text-align: center;font-size: 1.2vw;font-weight: bold;margin-bottom: 4%;">环境</div> |
|
|
|
<div style="display: flex; flex-direction: row;justify-content: space-around"> |
|
|
|
<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>新增</el-button> |
|
|
|
</div> |
|
|
|
<el-table border height="700" v-loading="loading" :data="docmubanList04" > |
|
|
|
|
|
|
|
<el-table-column label="内容" align="center" prop="text" /> |
|
|
|
@ -286,29 +299,74 @@ |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 添加ZhyDocmuban对话框 --> |
|
|
|
<el-dialog :title="title" :visible.sync="addZhyDocmubanOpen" 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-input v-model="form.type"></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="cancel">取 消</el-button> |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 添加或修改图谱模板对话框 --> |
|
|
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
|
|
|
<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="cancel">取 消</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} from "../../../api/system/docmuban"; |
|
|
|
import {addList, getParentList} from "../../../api/system/docmuban"; |
|
|
|
|
|
|
|
export default { |
|
|
|
name: "Docmuban", |
|
|
|
@ -366,6 +424,8 @@ export default { |
|
|
|
title: "", |
|
|
|
// 是否显示弹出层 |
|
|
|
open: false, |
|
|
|
addZhyDocmubanOpen: false, |
|
|
|
updateZhyDocmubanOpen:false, |
|
|
|
// 查询参数 |
|
|
|
queryParams: { |
|
|
|
pageNum: 1, |
|
|
|
@ -390,6 +450,7 @@ export default { |
|
|
|
{ required: true, message: "组别不能为空", trigger: "blur" } |
|
|
|
], |
|
|
|
}, |
|
|
|
parentsList:[], |
|
|
|
testInfo:["补给舰航行安全风险指数", |
|
|
|
"导弹艇航行安全风险指数", |
|
|
|
"驱逐舰航行安全风险指数", |
|
|
|
@ -462,9 +523,44 @@ export default { |
|
|
|
this.loading = false; |
|
|
|
}); |
|
|
|
}, |
|
|
|
addData(){ |
|
|
|
addDocmuban().then(response => { |
|
|
|
console.log(response) |
|
|
|
}) |
|
|
|
}, |
|
|
|
//弹出添加zhyDoc弹窗按钮 |
|
|
|
addZhyDoc(type){ |
|
|
|
this.form.type = type; |
|
|
|
|
|
|
|
if(this.form.type == "方向" || this.form.type == "作战" || this.form.type == "装备" || this.form.type == "环境"){ |
|
|
|
|
|
|
|
this.form.groupId = 0; |
|
|
|
} |
|
|
|
if(this.form.type == "业务系统" || this.form.type == "模型库" || this.form.type == "规则库" || this.form.type == "大类" || this.form.type == "小类"){ |
|
|
|
this.form.groupId = 1; |
|
|
|
} |
|
|
|
if(this.form.type == "模型" || this.form.type == "指标"){ |
|
|
|
this.form.groupId = 2; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
getParentList( this.form).then((res)=>{ |
|
|
|
console.log(res) |
|
|
|
if(res.data.length!=0){ |
|
|
|
this.parentsList = res.data; |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
//查询 |
|
|
|
this.addZhyDocmubanOpen = true |
|
|
|
}, |
|
|
|
// 取消按钮 |
|
|
|
cancel() { |
|
|
|
this.open = false; |
|
|
|
this.addZhyDocmubanOpen = false; |
|
|
|
this.reset(); |
|
|
|
}, |
|
|
|
cancelUpdate(){ |
|
|
|
this.updateZhyDocmubanOpen = false; |
|
|
|
this.reset(); |
|
|
|
}, |
|
|
|
// 表单重置 |
|
|
|
@ -507,7 +603,19 @@ export default { |
|
|
|
const id = row.id || this.ids |
|
|
|
getDocmuban(id).then(response => { |
|
|
|
this.form = response.data; |
|
|
|
this.open = true; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getParentList( this.form).then((res)=>{ |
|
|
|
console.log(res) |
|
|
|
if(res.data.length!=0){ |
|
|
|
this.parentsList = res.data; |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
this.updateZhyDocmubanOpen = true; |
|
|
|
this.title = "修改图谱模板"; |
|
|
|
}); |
|
|
|
}, |
|
|
|
@ -518,13 +626,13 @@ export default { |
|
|
|
if (this.form.id != null) { |
|
|
|
updateDocmuban(this.form).then(response => { |
|
|
|
this.$modal.msgSuccess("修改成功"); |
|
|
|
this.open = false; |
|
|
|
this.addZhyDocmubanOpen = false; |
|
|
|
this.getList(); |
|
|
|
}); |
|
|
|
} else { |
|
|
|
addDocmuban(this.form).then(response => { |
|
|
|
this.$modal.msgSuccess("新增成功"); |
|
|
|
this.open = false; |
|
|
|
this.addZhyDocmubanOpen = false; |
|
|
|
this.getList(); |
|
|
|
}); |
|
|
|
} |
|
|
|
|