Commit 5ade4e10 by 刘玉帅

sf

parent ac8b465b
/*
* @Author: your name
* @Date: 2021-08-31 14:40:49
* @LastEditTime: 2021-10-27 14:29:12
* @LastEditTime: 2021-11-22 17:04:36
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \founder_vue\src\router\index.js
......@@ -10,6 +10,7 @@ import Vue from "vue";
import VueRouter from "vue-router";
import indexRoutes from "./modules/index";
import zdxxRoutes from "./modules/zdxx";
import sfRoutes from "./modules/sf";
import xxtkRoutes from "./modules/xxtk";
import kyxsRoutes from "./modules/kyxs";
import bbkwtxxRoutes from "./modules/bbkwtxx";
......@@ -55,6 +56,7 @@ Vue.use(VueRouter);
const mainRouters = [
...indexRoutes,
zdxxRoutes,
sfRoutes,
xxtkRoutes,
kyxsRoutes,
bbkwtxxRoutes,
......
/*
* @Author: your name
* @Date: 2021-11-22 16:47:01
* @LastEditTime: 2021-11-22 17:24:20
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \刑侦二期(1)\founder_vue\src\router\modules\sf.js
*/
import menuLayout from "@/layout/menuLayout.vue";
const menuLayouts = [
{
path: "/sfgl",
name: "sfgl",
meta: {
title: '算法管理'
},
component: () => import("@/views/sf/sfgl.vue")
},
{
path: "/sfmn",
name: "sfmn",
meta: {
title: '算法管理'
},
component: () => import("@/views/sf/sfmn.vue")
},
]
export default {
path: "/right",
component: menuLayout,
children: [...menuLayouts]
};
// export default menuLayouts;
\ No newline at end of file
<!--
* @Author: your name
* @Date: 2021-11-22 16:46:06
* @LastEditTime: 2021-11-23 15:00:33
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \刑侦二期(1)\founder_vue\src\views\sf\sfgl.vue
-->
<template>
<div>
<right-content
:pageBs="pageBs"
:header="header"
:cxFormData="cxFormData"
:cxQueryField="cxQueryField"
:cxDefaultFormThead="cxDefaultFormThead"
:cxListForm="cxListForm"
:tableDataLengthList="tableDataLength"
@add="add"
@fb="fb"
@xx="xx"
@search="search"
></right-content>
<el-dialog title="新增" :visible.sync="dialogFormVisible" @close="close">
<el-form :model="sfForm" :rules="rules" ref="ruleForm" style="margin-top:25px">
<el-form-item
label="算法名称"
:label-width="formLabelWidth"
prop="sfmc"
>
<el-input v-model="sfForm.sfmc" autocomplete="off"></el-input>
</el-form-item>
<el-form-item
label="算法路径"
:label-width="formLabelWidth"
prop="sflj"
>
<el-input v-model="sfForm.sflj" autocomplete="off"></el-input>
</el-form-item>
<el-form-item
label="算法参数"
:label-width="formLabelWidth"
prop="sfcs"
>
<el-input
type="textarea"
:rows="2"
placeholder="请输入内容"
v-model="sfForm.sfcs"
>
</el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false">取 消</el-button>
<el-button type="primary" @click="handleSure('ruleForm')"
>确 定</el-button
>
</div>
</el-dialog>
</div>
</template>
<script>
import rightContent from "@c/SfptCxForm_components.vue";
import utils from "@/utils/util.js";
export default {
name: "sfgl",
components: {
rightContent,
},
data() {
return {
rules: {
sfmc: [{ required: true, message: "请输入算法 名称", trigger: "blur" }],
sflj: [{ required: true, message: "请输入算法 名称", trigger: "blur" }],
sfcs: [{ required: true, message: "请输入算法 名称", trigger: "blur" }],
},
formLabelWidth: "120px",
tableDataLength: 0,
dialogFormVisible: false,
sfForm: {
sfmc: "",
sflj: "",
sfcs: "",
},
cxListForm: [
// {
// sfmc: "66",
// sflj: "77",
// sfcs: "88",
// sffb: "是",
// },
],
pageBs: "sfgl",
header: "算法信息管理",
cxFormData: {
sfmc: "",
sflj: "",
sfcs: "",
rows: 10,
page: 1,
},
cxQueryField: [
/*立案信息 侦查终结信息 立案信息审批 侦查终结审批通用开始*/
{
name: "算法名称",
id: "sfmc",
type: "text",
value: "",
placeholder: "",
col: "3",
},
{
name: "算法路径",
id: "sflj",
type: "text",
value: "",
placeholder: "",
col: "3",
},
],
leftMenus: [
//左侧导航(模块第一个页面需要)
{
id: "sfgl",
label: "算法管理",
newAuth: "M01",
index: "sfgl",
className: "iconfont icongongnengfuwu",
hasChildren: false,
},
{
id: "sfmn",
label: "算法模拟",
index: "sfmn",
auth: "M0102",
className: "iconfont icongongnengfuwu",
hasChildren: false,
},
],
Menu: [
{
id: "sfgl",
label: "算法管理",
index: "sfgl",
auth: "M0101",
className: "iconfont iconrizhi",
disabled: false,
},
// {
// id: "sfmn",
// label: "算法模拟",
// index: "sfmn",
// auth: "M0102",
// className: "iconfont icongongnengfuwu",
// hasChildren: false,
// },
],
cxDefaultFormThead: [
{
label: "算法名称",
prop: "sfmc",
toInfor: true,
width: "200",
},
{
label: "算法路径",
prop: "sflj",
width: "200",
},
{
/*table默认得表头*/
label: "算法参数",
prop: "sfcs",
width: "200",
},
{
/*table默认得表头*/
label: "是否发布",
prop: "sffb",
width: "200",
},
],
};
},
created() {
this.$store.commit("user/SET_Menu", this.Menu);
this.$store.commit("user/SET_LeftMenu", this.leftMenus);
this.$store.commit("user/SET_Header", this.header);
// this.cxListForm = JSON.parse(sessionStorage.getItem("cxListForm"));
},
mounted() {
if (JSON.parse(sessionStorage.getItem("cxListForm"))) {
this.cxListForm = JSON.parse(sessionStorage.getItem("cxListForm"));
this.tableDataLength = this.cxListForm.length;
console.log(this.tableDataLength);
}
},
methods: {
/**
* @description: 弹框关闭
* @param {*}
* @return {*}
*/
close() {
this.sfForm = {};
},
/**
* @description: 新增
* @param {*}
* @return {*}
*/
add() {
console.log("111");
this.dialogFormVisible = true;
},
/**
* @description: 发布
* @param {*} msg 一行的信息
* @return {*}
*/
fb(msg) {
let self = this;
console.log(msg);
this.cxListForm.forEach((item) => {
if (
msg.row.sflj == item.sflj &&
msg.row.sfmc == item.sfmc &&
msg.row.sfcs == item.sfcs
) {
self.$set(item, "sffb", "是");
}
});
sessionStorage.setItem("cxListForm", JSON.stringify(self.cxListForm));
},
/**
* @description: 下线
* @param {*} msg 一行的信息
* @return {*}
*/
xx(msg) {
console.log(msg);
let self = this;
console.log(msg);
this.cxListForm.forEach((item) => {
if (
msg.row.sflj == item.sflj &&
msg.row.sfmc == item.sfmc &&
msg.row.sfcs == item.sfcs
) {
self.$set(item, "sffb", "否");
}
});
sessionStorage.setItem("cxListForm", JSON.stringify(self.cxListForm));
},
/**
* @description: 新增确定
* @param {*} formName
* @return {*}
*/
handleSure(formName) {
let self = this;
self.$refs[formName].validate((valid) => {
if (valid) {
self.cxListForm.push({
sfmc: self.sfForm.sfmc,
sflj: self.sfForm.sflj,
sfcs: self.sfForm.sfcs,
sffb: "否",
res: {
success: true,
code: 200,
message: "成功",
data: {
mrRwSize: Math.round(Math.random()*100),
mpRwList: [],
},
},
});
this.tableDataLength = this.cxListForm.length;
console.log(self.cxListForm);
sessionStorage.setItem("cxListForm", JSON.stringify(self.cxListForm));
self.dialogFormVisible = false;
} else {
console.log("error submit!!");
return false;
}
});
},
/**
* @description: 搜索
* @param {*} msg 信息
* @return {*}
*/
search(msg) {
// debugger
let arr = JSON.parse(sessionStorage.getItem("cxListForm"));
if (msg.sfmc || msg.sflj) {
let newarr = [];
console.log("222", msg);
for (var key in arr) {
if (msg.sfmc == arr[key].sfmc || msg.sflj == arr[key].sflj) {
newarr.push(arr[key]);
}
}
this.cxListForm = newarr;
} else {
debugger;
this.cxListForm = JSON.parse(sessionStorage.getItem("cxListForm"));
}
},
},
};
</script>
<style>
</style>
<!--
* @Author: your name
* @Date: 2021-11-22 17:23:43
* @LastEditTime: 2021-11-23 14:33:50
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \刑侦二期(1)\founder_vue\src\views\sf\ssfmn.vue
-->
<template>
<div>
<div class="boxsf" v-for="(item, idx) in list" :key="idx">
<div class="rybq">
<span> {{ item.sfmc }}</span>
<!-- <span> Server-Naotu</span> -->
<span style="margin-left: 10px; color: rgb(75, 72, 72)">
{{ item.sflj }}</span
>
</div>
<div>
<el-input
v-model="item.sfcs"
placeholder="请输入内容"
style="width: 50%"
></el-input>
<el-button size="medium" type="success" style="margin-left: 25px"
>发送参数</el-button
>
<el-input
v-model="input"
placeholder="请输入内容"
style="width: 10%; margin-left: 15px"
:disabled="true"
></el-input>
<el-button
size="medium"
type="success"
style="margin-left: 15px"
@click="information(item)"
>详细信息</el-button
>
</div>
</div>
<el-dialog
title="提示"
:visible.sync="centerDialogVisible"
width="30%"
center
>
<el-card class="box-card" style="margin: 10px 0 10px 0">
<div>
{{ row.res ? row.res : "空" }}
</div>
</el-card>
<span slot="footer" class="dialog-footer">
<el-button @click="centerDialogVisible = false">取 消</el-button>
<el-button type="primary" @click="centerDialogVisible = false"
>确 定</el-button
>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
data() {
return {
inputcs: "",
input: "正常",
list: [],
centerDialogVisible: false,
row: "",
Menu: [
// {
// id: "sfgl",
// label: "算法管理",
// index: "sfgl",
// auth: "M0101",
// className: "iconfont iconrizhi",
// disabled: false,
// },
{
id: "sfmn",
label: "算法模拟",
index: "sfmn",
auth: "M0102",
className: "iconfont icongongnengfuwu",
hasChildren: false,
},
],
};
},
created() {
this.$store.commit("user/SET_Menu", this.Menu);
// this.$store.commit("user/SET_LeftMenu", this.leftMenus);
// this.$store.commit("user/SET_Header", this.header);
// this.cxListForm = JSON.parse(sessionStorage.getItem("cxListForm"));
},
mounted() {
let self = this;
let array = JSON.parse(sessionStorage.getItem("cxListForm"));
array.forEach((item) => {
if (item.sffb == "是") {
self.list.push(item);
}
});
},
methods: {
/**
* @description: 详细信息
* @param {*}
* @return {*}
*/
information(msg) {
this.centerDialogVisible = true;
this.row = msg;
},
},
};
</script>
<style lang="scss" scoped>
.boxsf {
margin: 5px;
padding: 10px;
box-sizing: border-box;
background: #ffffff;
border: 1px solid #eaeaea;
box-shadow: none;
opacity: 1;
border-radius: 4px;
.rybq {
font-size: 18px;
}
}
</style>>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment