Commit 30b4a47c by liupeng

Merge branch 'dev_xzeq' of http://47.92.108.28/changchao/founder_vue into dev_xzeq

parents fdd6174f d8d000c2
...@@ -525,7 +525,7 @@ ...@@ -525,7 +525,7 @@
:disabled="item4.disabled" :disabled="item4.disabled"
@focus="item4.focus || ''" @focus="item4.focus || ''"
> >
<template slot="append" <template slot="append"
><span ><span
@click=" @click="
messageTq(formLabelAlign[item2.id][0]) messageTq(formLabelAlign[item2.id][0])
...@@ -881,6 +881,14 @@ export default { ...@@ -881,6 +881,14 @@ export default {
type: Object, type: Object,
default: () => {}, default: () => {},
}, },
fileBase64: {
type: Object,
default: () => {},
},
base64Transform: {
type: Boolean,
default: false,
},
propTitle: String, propTitle: String,
pageBs: String, pageBs: String,
}, },
...@@ -890,7 +898,6 @@ export default { ...@@ -890,7 +898,6 @@ export default {
rules: {}, rules: {},
propFormField: this.formField, propFormField: this.formField,
formLabelAlign: this.formLabelAligns, formLabelAlign: this.formLabelAligns,
rules: {},
fileLists: {}, fileLists: {},
imageUrl: {}, imageUrl: {},
shade: false, shade: false,
...@@ -901,6 +908,22 @@ export default { ...@@ -901,6 +908,22 @@ export default {
self.initFields(); self.initFields();
}, },
methods: { methods: {
getBase64(file) {
return new Promise((resolve, reject) => {
let reader = new FileReader();
let fileResult = "";
reader.readAsDataURL(file); //开始转
reader.onload = function () {
fileResult = reader.result;
}; //转 失败
reader.onerror = function (error) {
reject(error);
}; //转 结束 咱就 resolve 出去
reader.onloadend = function () {
resolve(fileResult);
};
});
},
examine() { examine() {
this.$emit("examine"); this.$emit("examine");
}, },
...@@ -909,12 +932,12 @@ export default { ...@@ -909,12 +932,12 @@ export default {
}, },
messageTq(item) { messageTq(item) {
console.log(item); console.log(item);
var itemSend = {} var itemSend = {};
if(item.xm && item.xm != "") { if (item.xm && item.xm != "") {
itemSend.xm = item.xm itemSend.xm = item.xm;
} }
if(item.zjhm && item.zjhm != "") { if (item.zjhm && item.zjhm != "") {
itemSend.zjhm = item.zjhm itemSend.zjhm = item.zjhm;
} }
this.$emit("messageTq", itemSend); this.$emit("messageTq", itemSend);
}, },
...@@ -1388,6 +1411,12 @@ export default { ...@@ -1388,6 +1411,12 @@ export default {
); );
// debugger; // debugger;
if (item.type == "photo") { if (item.type == "photo") {
if(this.base64Transform){
this.getBase64(file.raw).then((resBase64) => {
this.fileBase64[item.id] = resBase64.split(",")[1]; //直接拿到base64信息
this.$emit("onBase64Transform", this.fileBase64);
});
}
if (isJPG) { if (isJPG) {
this.$set(self.imageUrl, item.id, file.raw); this.$set(self.imageUrl, item.id, file.raw);
this.$set( this.$set(
...@@ -1521,7 +1550,7 @@ export default { ...@@ -1521,7 +1550,7 @@ export default {
if (val.childrenAsAdd) { if (val.childrenAsAdd) {
val.childrenAsAdd.forEach((val2, index2) => { val.childrenAsAdd.forEach((val2, index2) => {
//遍历list数组 //遍历list数组
debugger debugger;
if (val2 == obj) { if (val2 == obj) {
//通过比较两个对象是否相等 将formLabelAlign里绑定的数据复制了一份 //通过比较两个对象是否相等 将formLabelAlign里绑定的数据复制了一份
addObj = JSON.parse( addObj = JSON.parse(
...@@ -1670,15 +1699,15 @@ export default { ...@@ -1670,15 +1699,15 @@ export default {
} }
}, },
"formLabelAlign.sffs"(val) { "formLabelAlign.sffs"(val) {
var boo = false var boo = false;
if(val == 1) { if (val == 1) {
boo = true boo = true;
this.$emit("insertMessage",boo) this.$emit("insertMessage", boo);
}else { } else {
boo = false boo = false;
this.$emit("insertMessage",boo) this.$emit("insertMessage", boo);
} }
} },
}, },
computed: {}, computed: {},
}; };
......
...@@ -369,6 +369,7 @@ ...@@ -369,6 +369,7 @@
pageBs != 'queryfzxyr' && pageBs != 'queryfzxyr' &&
pageBs != 'qyeryrlqbxsfs' && pageBs != 'qyeryrlqbxsfs' &&
pageBs != 'qyeryrlqbxsBJ' && pageBs != 'qyeryrlqbxsBJ' &&
pageBs != 'queryYpcp' &&
pageBs != 'qzdjs' && pageBs != 'qzdjs' &&
pageBs != 'queryAjzc' && pageBs != 'queryAjzc' &&
pageBs != 'qyeryrlqbxsBJ' pageBs != 'qyeryrlqbxsBJ'
...@@ -1018,6 +1019,7 @@ ...@@ -1018,6 +1019,7 @@
pageBs == 'qyeryrlqbxsfs' || pageBs == 'qyeryrlqbxsfs' ||
pageBs == 'qyeryrlqbxsBJ' || pageBs == 'qyeryrlqbxsBJ' ||
pageBs == 'queryMyyhz' || pageBs == 'queryMyyhz' ||
pageBs == 'queryYpcp' ||
pageBs == 'wfqdzczl' pageBs == 'wfqdzczl'
) )
" "
...@@ -1129,6 +1131,7 @@ ...@@ -1129,6 +1131,7 @@
pageBs != 'qyeryrlqbxsfs' && pageBs != 'qyeryrlqbxsfs' &&
pageBs != 'qyeryrlqbxsBJ' && pageBs != 'qyeryrlqbxsBJ' &&
pageBs != 'queryMyyhz' && pageBs != 'queryMyyhz' &&
pageBs != 'queryYpcp' &&
pageBs != 'queryfzxyr' pageBs != 'queryfzxyr'
" "
>删除</span >删除</span
......
/* /*
* @Author: your name * @Author: your name
* @Date: 2021-08-31 14:40:49 * @Date: 2021-08-31 14:40:49
* @LastEditTime: 2021-10-27 14:29:12 * @LastEditTime: 2021-11-23 18:47:24
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: \founder_vue\src\router\index.js * @FilePath: \founder_vue\src\router\index.js
...@@ -10,6 +10,7 @@ import Vue from "vue"; ...@@ -10,6 +10,7 @@ import Vue from "vue";
import VueRouter from "vue-router"; import VueRouter from "vue-router";
import indexRoutes from "./modules/index"; import indexRoutes from "./modules/index";
import zdxxRoutes from "./modules/zdxx"; import zdxxRoutes from "./modules/zdxx";
import sfRoutes from "./modules/sf";
import xxtkRoutes from "./modules/xxtk"; import xxtkRoutes from "./modules/xxtk";
import kyxsRoutes from "./modules/kyxs"; import kyxsRoutes from "./modules/kyxs";
import bbkwtxxRoutes from "./modules/bbkwtxx"; import bbkwtxxRoutes from "./modules/bbkwtxx";
...@@ -39,6 +40,7 @@ import rlxnpgRoutes from "./modules/rlxnpg"; ...@@ -39,6 +40,7 @@ import rlxnpgRoutes from "./modules/rlxnpg";
import zdxnpgRoutes from "./modules/zdxnpg"; import zdxnpgRoutes from "./modules/zdxnpg";
import brainPhotoRoutes from "./modules/brainPhoto"; import brainPhotoRoutes from "./modules/brainPhoto";
import rwddRoutes from "./modules/rwddzx";
const originalPush = VueRouter.prototype.push; const originalPush = VueRouter.prototype.push;
VueRouter.prototype.push = function push(location) { VueRouter.prototype.push = function push(location) {
...@@ -60,7 +62,9 @@ Vue.use(VueRouter); ...@@ -60,7 +62,9 @@ Vue.use(VueRouter);
const mainRouters = [ const mainRouters = [
...indexRoutes, ...indexRoutes,
rwddRoutes,
zdxxRoutes, zdxxRoutes,
sfRoutes,
xxtkRoutes, xxtkRoutes,
hxgcRoutes, hxgcRoutes,
kyxsRoutes, kyxsRoutes,
......
...@@ -9,6 +9,30 @@ const menuLayouts = [ ...@@ -9,6 +9,30 @@ const menuLayouts = [
component: () => import("@/views/hbyprw/hbyprw/queryHbyp.vue") component: () => import("@/views/hbyprw/hbyprw/queryHbyp.vue")
}, },
{ {
path: "/queryXswj",
name: "queryXswj",
meta: {
title: '线索挖掘'
},
component: () => import("@/views/hbyprw/xswj/xswj.vue")
},
{
path: "/queryYpzl",
name: "queryYpzl",
meta: {
title: '研判指令'
},
component: () => import("@/views/hbyprw/queryYpzl/queryYpzl.vue")
},
{
path: "/queryYpcp",
name: "queryYpcp",
meta: {
title: '研判产品'
},
component: () => import("@/views/hbyprw/queryYpcp/queryYpcp.vue")
},
{
path: "/queryHbyptj", path: "/queryHbyptj",
name: "queryHbypTj", name: "queryHbypTj",
meta: { meta: {
......
/*
* @Author: your name
* @Date: 2021-11-22 18:11:14
* @LastEditTime: 2021-11-23 13:28:50
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \founder_vue\src\router\modules\rwddzx.js
*/
import menuLayout from "@/layout/menuLayout.vue";
const menuLayouts = [
{
path: "/yxbb",
name: "yxbb",
meta: {
title: '运行报表'
},
component: () => import("@/views/rwddzx/yxbb/index.vue")
},
{
path: "/rwgl",
name: "rwgl",
meta: {
title: '任务管理'
},
component: () => import("@/views/rwddzx/rwgl/index.vue")
},
{
path: "/editRwglrwxx",
name: "editRwglrwxx",
meta: {
title: '任务管理信息',
isAdd: true,
},
component: () => import("@/views/rwddzx/rwgl/editRwglrwxx.vue")
},
{
path: "/ddrz",
name: "ddrz",
meta: {
title: '调度日志'
},
component: () => import("@/views/rwddzx/ddrz/index.vue")
},
{
path: "/zxqgl",
name: "zxqgl",
meta: {
title: '执行器管理'
},
component: () => import("@/views/rwddzx/zxqgl/index.vue")
},
];
export default {
path: "/right",
component: menuLayout,
children: [...menuLayouts]
};
\ No newline at end of file
/*
* @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
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<script> <script>
import formCompontent from "@c/form.vue"; import formCompontent from "@c/form.vue";
import { insertRyxx,selectRyxxById, selectRyzpList, updateRyxx} from "@/api/dswtzxx.js"; import { selectRyxxById, selectRyzpList, updateRyxx} from "@/api/dswtzxx.js";
import { import {
insertDna, insertDna,
} from "@/api/dswtz/dnaxx.js"; } from "@/api/dswtz/dnaxx.js";
...@@ -75,16 +75,6 @@ ...@@ -75,16 +75,6 @@
placeholder: "请输入", placeholder: "请输入",
col: "2", col: "2",
}, },
/* {
name: "宗教信仰:",
id: "zjxydm",
type: "codeTree",
codeTree: "CODE_ZJXY",
codeOptions: [],
value: "",
placeholder: "请输入",
col: "2",
},*/
], ],
}, },
], ],
...@@ -103,8 +93,6 @@ ...@@ -103,8 +93,6 @@
updateRyxx(params) updateRyxx(params)
} }
else { else {
let sd = 'R5400000000002021110009'
params.append('rybh',sd)
insertDna(params) insertDna(params)
} }
...@@ -131,7 +119,6 @@ ...@@ -131,7 +119,6 @@
let rows = res.data.rows let rows = res.data.rows
for(let i of rows.values()){ for(let i of rows.values()){
let zpbw = i.zpbw let zpbw = i.zpbw
let ryzpDzwjmc = i.ryzpDzwjmc.split('.')[1]
let arr = [ let arr = [
{ {
name: i.ryzpDzwjmc, name: i.ryzpDzwjmc,
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
:cxQueryField="cxQueryField" :cxQueryField="cxQueryField"
:pageObject="pageObject" :pageObject="pageObject"
:pageFooterProps="pageFooterProps" :pageFooterProps="pageFooterProps"
labelWidth="110px" labelWidth="130px"
title="合成研判产品详情" title="合成研判产品详情"
> >
</right-content> </right-content>
......
...@@ -48,12 +48,8 @@ ...@@ -48,12 +48,8 @@
@click="toFk(scope.scope)" @click="toFk(scope.scope)"
>反馈合并研判</span >反馈合并研判</span
> >
<span <span class="hbyp" @click="toCbyp(scope.scope)">串并研判</span>
v-if="scope.scope.row.sfbjPdbz == 1" <span class="hbyp" @click="toXdzl(scope.scope)">下达指令</span>
class="hbyp"
@click="tohqhcp(scope.scope)"
>获取合成研判产品</span
>
<span <span
v-if="scope.scope.row.sfkxg == 1" v-if="scope.scope.row.sfkxg == 1"
class="hbyp" class="hbyp"
...@@ -775,7 +771,7 @@ export default { ...@@ -775,7 +771,7 @@ export default {
className: "iconfont iconrizhi", className: "iconfont iconrizhi",
disabled: false, disabled: false,
}, },
{ {
id: "zyyppg", id: "zyyppg",
label: "专业研判结果评估", label: "专业研判结果评估",
index: "zyyppg", index: "zyyppg",
...@@ -785,6 +781,30 @@ export default { ...@@ -785,6 +781,30 @@ export default {
}, },
], ],
}, },
{
id: "queryXswj",
label: "线索挖掘",
newAuth: "M01",
index: "queryXswj",
className: "iconfont icongongnengfuwu",
hasChildren: false,
},
{
id: "queryYpzl",
label: "研判指令",
newAuth: "M01",
index: "queryYpzl",
className: "iconfont icongongnengfuwu",
hasChildren: false,
},
{
id: "queryYpcp",
label: "研判产品",
newAuth: "M01",
index: "queryYpcp",
className: "iconfont icongongnengfuwu",
hasChildren: false,
},
], ],
selectArr: [], selectArr: [],
revokeVisiable: false, revokeVisiable: false,
...@@ -982,15 +1002,6 @@ export default { ...@@ -982,15 +1002,6 @@ export default {
}, },
}); });
}, },
tohqhcp(scope) {
debugger;
this.$router.push({
path: "/detailHcypcp",
query: {
xxzjbh: scope.row.xxzjbh,
},
});
},
fileOnchange(file, fileList) { fileOnchange(file, fileList) {
if (fileList.length > 0) { if (fileList.length > 0) {
this.fileArr = [fileList[0]]; // 这一步,是 展示最后一次选择的csv文件 this.fileArr = [fileList[0]]; // 这一步,是 展示最后一次选择的csv文件
...@@ -1046,6 +1057,12 @@ export default { ...@@ -1046,6 +1057,12 @@ export default {
this.revokeVisiable = true; this.revokeVisiable = true;
} }
}, },
toCbyp(scoped) {
this.$router.push({
path: "/bshcb",
});
},
toXdzl(scoped) {},
}, },
watch: { watch: {
"examineInfoRl.sfrlPdbz": { "examineInfoRl.sfrlPdbz": {
......
<template>
<div>
<SearchGraph
:formProp="formProp"
:formData="form"
childrenXhrStr="/apialy/ksh/getAjRwGxXx"
:nodeClickBoo="true"
placeholder="请输入案件编号"
:params="params"
:nodedata="nodedata"
:unfoldParams="unfoldParams"
/>
</div>
</template>
<script>
import SearchGraph from "@c/SearchGraph.vue";
export default {
components: { SearchGraph },
data() {
return {
formProp: [
{
id: "objectValue",
type: "text",
placeholder: "请输入案件编号",
col: "3",
rules: [
{ required: true, message: "请输入案件编号", trigger: "blur" },
],
},
],
form: {
objectValue:""
},
nodedata: {
type: "lawcase",
id: 0,
name: "objectValue",
children: true,
},
params: {
objectType: "lawcase",
objectValue: "objectValue",
parentId: 0,
},
unfoldParams: {
objectValue: "name",
objectType: "type",
parentId: "parentId",
},
Menu: [
{
id: "queryXswj",
label: "线索挖掘",
index: "queryXswj",
auth: "M0101",
className: "iconfont iconrizhi",
disabled: false,
},
],
};
},
created(){
this.$store.commit("user/SET_Menu", this.Menu);
},
};
</script>
<template>
<el-popover
ref="popover"
placement="bottom-start"
trigger="click"
@show="onShowPopover"
@hide="onHidePopover"
>
<el-tree
ref="tree"
class="select-tree"
:style="{ 'min-width': treeWidth }"
highlight-current
:data="data"
:props="props"
:expand-on-click-node="false"
:filter-node-method="filterNode"
:default-expand-all="false"
@node-click="onClickNode"
/>
<el-input
slot="reference"
ref="input"
v-model="labelModel"
clearable
@clear="clearSeleted"
:class="{ rotate: showStatus }"
:placeholder="placeholder"
suffix-icon="el-icon-arrow-down"
>
<!--<i slot="suffix" class="iconfont iconzidianmaxuanze"></i>-->
</el-input>
</el-popover>
</template>
<script>
export default {
name: "ElSelectTree",
// 设置绑定参数
model: {
prop: "value",
event: "selected"
},
props: {
sendId: String,
// 接收绑定参数
value: String,
// 输入框宽度
width: String,
// 选项数据
options: {
type: Array,
required: true
},
// 输入框占位符
placeholder: {
type: String,
required: false,
default: "请选择"
},
// 树节点配置选项
props: {
type: Object,
required: false,
default: () => ({
parent: "parentId",
value: "id",
label: "label",
children: "children"
})
}
},
data() {
return {
// 树状菜单显示状态
showStatus: false,
// 菜单宽度
treeWidth: "auto",
// 输入框显示值
labelModel: "",
// 实际请求传值
valueModel: ""
};
},
computed: {
// 是否为树状结构数据
dataType() {
const jsonStr = JSON.stringify(this.options);
/*if (process.client) {*/
return jsonStr.indexOf(this.props.children) !== -1;
/* }*/
},
// 若非树状结构,则转化为树状结构数据
data() {
return this.dataType ? this.options : this.switchTree();
}
},
watch: {
labelModel(val) {
if (!val) {
this.valueModel = "";
}
/* if (process.client) {*/
this.$refs.tree.filter(val);
this.$emit("getSeleted", this.labelModel);
/* }*/
},
value(val) {
if (this.sendId && val == "") {
this.$emit("emitQkValue", this.sendId, val);
}
this.labelModel = this.queryTree(this.data, val);
this.$emit("getSeleted", this.labelModel);
}
},
created() {
// 检测输入框原有值并显示对应 label
if (this.value) {
this.labelModel = this.queryTree(this.data, this.value);
}
// 获取输入框宽度同步至树状菜单宽度
this.$nextTick(() => {
/* if (process.client) {*/
this.treeWidth = `${(this.width ||
this.$refs.input.$refs.input.clientWidth) - 24}px`;
/* }*/
});
},
methods: {
clearSearchValue(){
this.labelModel='';
},
clearSeleted() {
this.$emit("getSeleted", this.labelModel);
},
// 单击节点
onClickNode(node) {
this.labelModel = node[this.props.label];
this.valueModel = node[this.props.value];
if (this.sendId) {
this.$emit("emitValue", this.sendId, node.id, node.parentId);
}
this.onCloseTree();
this.$emit("getSeleted", this.labelModel);
},
// 偏平数组转化为树状层级结构
switchTree() {
return this.cleanChildren(this.buildTree(this.options, "0"));
},
// 隐藏树状菜单
onCloseTree() {
/*if (process.client) {
this.$refs.popover.showPopper = false;
}*/
this.$refs.popover.showPopper = false;
},
// 显示时触发
onShowPopover() {
this.showStatus = true;
/* if (process.client) {
this.$refs.tree.filter(false);
}*/
this.$refs.tree.filter(false);
},
// 隐藏时触发
onHidePopover() {
this.showStatus = false;
this.$emit("selected", this.valueModel);
},
// 树节点过滤方法
filterNode(query, data) {
if (!query) return true;
/*if (process.client) {*/
return data[this.props.label].indexOf(query) !== -1;
/* }*/
},
// 搜索树状数据中的 ID
queryTree(tree, id) {
let stark = [];
stark = stark.concat(tree);
/* if (process.client) {*/
while (stark.length) {
const temp = stark.shift();
if (temp[this.props.children]) {
stark = stark.concat(temp[this.props.children]);
}
if (temp[this.props.value] === id) {
return temp[this.props.label];
}
}
/* }*/
return "";
},
// 将一维的扁平数组转换为多层级对象
buildTree(data, id = "0") {
const fa = parentId => {
const temp = [];
/*if (process.client) {*/
for (let i = 0; i < data.length; i++) {
const n = data[i];
if (n[this.props.parent] === parentId) {
n.children = fa(n.rowGuid);
temp.push(n);
}
}
/* }*/
return temp;
};
return fa(id);
},
// 清除空 children项
cleanChildren(data) {
const fa = list => {
list.map(e => {
/*if (process.client) {*/
if (e.children.length) {
fa(e.children);
} else {
delete e.children;
}
/* }*/
return e;
});
return list;
};
return fa(data);
}
}
};
</script>
<style>
.el-input.el-input--suffix {
cursor: pointer;
overflow: hidden;
}
.el-input.el-input--suffix.rotate .el-input__suffix {
transform: rotate(180deg);
}
.select-tree {
max-height: 350px;
overflow-y: scroll;
}
/* 菜单滚动条 */
.select-tree::-webkit-scrollbar {
z-index: 11;
width: 6px;
}
.select-tree::-webkit-scrollbar-track,
.select-tree::-webkit-scrollbar-corner {
background: #fff;
}
.select-tree::-webkit-scrollbar-thumb {
border-radius: 5px;
width: 6px;
background: #b4bccc;
}
.select-tree::-webkit-scrollbar-track-piece {
background: #fff;
width: 6px;
}
</style>
<!--
* @Author: your name
* @Date: 2021-11-22 18:28:56
* @LastEditTime: 2021-11-23 16:47:21
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \founder_vue\src\views\rwddzx\ddrz\index.vue
-->
<template>
<div class="Content">
<right-content
ref="rightContent"
:pageBs="pageBs"
:header="header"
:cxFormData="cxFormData"
:cxQueryField="cxQueryField"
:cxDefaultFormThead="cxDefaultFormThead"
:tableData1="tableData"
@add="add"
@dele="dele"
@toZxbz="toZxbz"
@toDdbz="toDdbz"
@toZxrz="toZxrz"
@edit="edit"
></right-content>
</div>
</template>
<script>
import rightContent from "../components/ptCxForm_components.vue";
export default {
name: "ddrz",
components: {
rightContent,
},
data() {
return {
header: "任务调度中心",
pageBs: "ddrz",
cxFormData: {
rows: 10,
page: 1,
zxq: "",
rw: "",
status: "",
ddStart: "",
ddEnd: "",
},
cxQueryField: [
{
name: "执行器",
id: "zxq",
type: "select",
value: "",
selectData:[
{
name:'生成数据执行器',
value:'1'
},
{
name:'生成数据执行器',
value:'2'
},
],
placeholder: "请选择",
col: "3",
},
{
name: "任务",
id: "rw",
type: "select",
value: "",
selectData:[
{
name:'全部',
value:'1'
},
{
name:'生成数据执行器',
value:'2'
},
],
placeholder: "请选择",
col: "3",
},
{
name: "状态",
id: "status",
type: "select",
value: "",
selectData:[
{
name:'全部',
value:'1'
},
{
name:'生成数据执行器',
value:'2'
},
],
placeholder: "请选择",
col: "3",
},
{
name: "调度时间",
id: "ddStart",
id2: "ddEnd",
type: "zdyDate",
value: "",
col: "3",
},
],
cxDefaultFormThead: [
{
label: "任务ID",
prop: "rwid",
},
{
label: "调度时间",
prop: "ddsj",
},
{
label: "调度结果",
prop: "ddjg",
},
{
label: "调度备注",
prop: "ddbz",
toDdbz: true,
},
{
label: "执行时间",
prop: "zxsj",
},
{
label: "执行结果",
prop: "zxjg",
},
{
label: "执行备注",
prop: "zxbz",
toZxbz:true,
},
],
Menu: [
{
id: "ddrz",
label: "调度日志",
index: "ddrz",
auth: "r01",
className: "iconfont iconrizhi",
disabled: false,
},
],
tableData:[
{
rwid:'0',
ddsj:'2021-11-23 14:29:20',
ddjg:'0',
ddbz:'',
zxsj:'2021-11-23 14:29:20',
zxjg:'0',
zxbz:'adasdfas',
},
{
rwid:'1',
ddsj:'2021-11-23 14:29:20',
ddjg:'1',
ddbz:'调度成功',
zxsj:'2021-11-23 14:29:20',
zxjg:'0',
zxbz:'',
},
]
};
},
created() {
this.$store.commit("user/SET_Menu", this.Menu);
},
methods: {
add() {
this.$router.push("adjustZdxsxx");
},
dele(scope) {
this.$confirm("此操作将永久删除该文件, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
deleteZdxsxx({
xxzjbh: scope.row.xxzjbh,
}).then((res) => {
if (res.success && res.code == 200) {
this.$message({
type: "success",
message: "删除成功",
});
this.$refs.rightContent.doQuery("yes");
}
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除",
});
});
console.log(scope.row.xxzjbh);
},
//调度结果查看
toDdbz(data) {
this.$alert(data.ddbz, '调度备注', {
confirmButtonText: '确定',
type: 'info'
// callback: action => {
// this.$message({
// type: 'info',
// message: `action: ${ action }`
// });
// }
});
},
//执行结果查看
toZxbz(data) {
this.$alert(data.zxbz, '执行备注', {
confirmButtonText: '确定',
type: 'info'
// callback: action => {
// this.$message({
// type: 'info',
// message: `action: ${ action }`
// });
// }
});
},
edit(data) {
this.$router.push({
path: "/adjustZdxsxx",
query: {
xxzjbh: data.row.xxzjbh,
},
});
console.log(data.row);
},
//执行日志
toZxrz(data){
// console.log(data)
var domStr = ''
let str = data.row.zxjg == '0'?'失败':'成功'
var obj = {
zxsj:'执行时间:'+ data.row.zxsj,
zxjg:'执行结果:'+ str,
zxbz:'执行备注:'+ data.row.zxbz,
}
for(var i=0;i<Object.keys(obj).length;i++){
domStr += `<div style='text-align:left;'>${obj[Object.keys(obj)[i]]}</div>`
}
this.$alert(domStr, '执行日志', {
confirmButtonText: '确定',
dangerouslyUseHTMLString: true
});
}
},
};
</script>
<style>
.el-dialog__body {
padding: 10px 15px !important;
}
.rightContent .el-input__inner,
#formCommonPage .el-input__inner {
height: 32px;
line-height: 32px;
font-family: inherit;
}
.el-table__header-wrapper th,
.el-table__header-wrapper tr {
background: #f4f6f7;
}
.rightContent .el-input__icon,
#formCommonPage .el-input__icon,
.el-input__suffix-inner {
line-height: 36px;
}
.rightContent .el-range-separator {
position: relative;
top: -4px;
}
.rightContent .el-textarea__inner,
#formCommonPage .el-textarea__inner {
width: 100%;
font-family: inherit;
}
.rightContent .el-range-input,
#formCommonPage .el-range-input {
vertical-align: top;
}
.rightContent .el-date-editor .el-range__close-icon {
margin-top: -4px;
}
.rightContent .el-form-item__error {
left: calc(66% - 27px);
top: 12px;
}
.success-row {
background-color: #fbf9f4 !important;
}
.Content .el-input,
.Content .el-date-editor--daterange.el-input__inner {
width: 100% !important;
}
</style>
<style scoped lang="scss">
@import "@/assets/styles/rightContent.scss";
</style>
<!--
* @Author: your name
* @Date: 2021-11-22 23:00:03
* @LastEditTime: 2021-11-22 23:00:04
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \founder_vue\src\views\rwddzx\index.vue
-->
<!--
* @Author: your name
* @Date: 2021-11-23 13:19:12
* @LastEditTime: 2021-11-23 14:12:27
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \founder_vue\src\views\rwddzx\rwgl\editRwglrwxx.vue
-->
<template>
<div>
<form-compontent
:formField="propFormField"
:formLabelAligns="formLabelAlign"
@submit="submit"
:propTitle="title"
>
</form-compontent>
</div>
</template>
<script>
import formCompontent from "../components/form.vue";
export default {
name: "editRwglrwxx",
components: {
formCompontent,
},
data() {
return {
title: "更新任务",
propFormField: [
//基本信息
{
title: "",
id: 1,
objStr: "",
index: 0,
data: [
{
name: "执行器:",
id: "zxq",
type: "setValue",
codeOptions: [
{
label:'生成数据执行器',
value:'1'
},
{
label:'生成字典执行器',
value:'2'
},
],
value: "",
placeholder: "请输入",
col: "2",
},
{
name: "任务描述:",
id: "rwms",
type: "text",
value: "",
prop: "checkEmpty",
placeholder: "请输入",
col: "2",
},
{
name: "路由策略:",
id: "lycl",
type: "setValue",
codeTree: "",
codeOptions: [
{
label:'轮询',
value:'01'
},
{
label:'生成字典执行器',
value:'02'
},
],
value: "",
placeholder: "请选择",
col: "2",
},
{
name: "Cron:",
id: "cron",
type: "text",
value: "",
prop: "checkEmpty",
placeholder: "请输入",
col: "2",
},
{
name: "运行模式:",
id: "yxms",
type: "setValue",
codeTree: "",
codeOptions: [
{
label:'BEAN',
value:'01'
},
{
label:'生成字典执行器',
value:'02'
},
],
value: "",
placeholder: "请输入",
col: "2",
},
{
name: "JobHanlder:",
id: "jobhanlder",
type: "text",
value: "",
prop: "checkEmpty",
placeholder: "请输入",
col: "2",
},
{
name: "阻塞处理策略:",
id: "zscl",
type: "setValue",
codeTree: "",
codeOptions: [
{
label:'丢弃后续调度',
value:'01'
},
{
label:'生成字典执行器',
value:'02'
},
],
value: "",
placeholder: "请输入",
col: "2",
},
{
name: "子任务ID:",
id: "zrw",
type: "text",
value: "",
prop: "checkEmpty",
placeholder: "请输入",
col: "2",
},
{
name: "任务超时时间:",
id: "rwcssj",
type: "text",
value: "",
prop: "checkEmpty",
placeholder: "请输入",
col: "2",
},
{
name: "失败重试次数:",
id: "sbcscs",
type: "text",
value: "",
prop: "checkEmpty",
placeholder: "请输入",
col: "2",
},
{
name: "负责人:",
id: "fzr",
type: "text",
value: "",
prop: "checkEmpty",
placeholder: "请输入",
col: "2",
},
{
name: "报警邮件:",
id: "cjyj",
type: "text",
value: "",
prop: "checkEmpty",
placeholder: "请输入",
col: "2",
},
{
name: "任务参数:",
id: "rwcs",
type: "textarea",
value: "",
prop: "checkEmpty",
placeholder: "请输入",
col: "2",
},
],
},
],
formLabelAlign: {},
stepList: [
{
title: "基本信息",
active: true,
},
{
title: "人员信息",
active: false,
},
{
title: "社会信息",
active: false,
},
],
Menu: [
{
id: "rwgl",
label: "任务管理",
index: "rwgl",
auth: "r01",
className: "iconfont iconrizhi",
disabled: false,
},
],
xxzjbh: "",
glxxzjbh: "",
};
},
methods: {
submit(params) {
console.log(params);
let loading = this.$loading({
lock: true,
text: "正在保存...",
spinner: "el-icon-loading",
background: "rgba(255, 255, 255, 0.7)",
});
if (!this.xxzjbh) {
this.addSubmit(params, loading);
} else {
this.editSubmit(params, loading);
}
},
addSubmit(params, loading) {
params.append("glzdxxzjbh", this.glxxzjbh);
insertZdcyryxx(params).then((res) => {
if (res.success && res.code == 200) {
this.$alert("保存成功!", "提示", {
confirmButtonText: "确定",
type: "success",
callback: () => {
this.$router.push("/queryZdcyryxx");
loading.close();
sessionStorage.setItem("routerPath", "queryZdcyryxx");
setTimeout(() => {
this.$bus.$emit("routerPath");
}, 20);
},
});
} else {
loading.close();
}
});
},
editSubmit(params, loading) {
params.append("xxzjbh", this.xxzjbh);
updateZdcyryxx(params).then((res) => {
if (res.success && res.code == 200) {
this.$alert("修改成功!", "提示", {
confirmButtonText: "确定",
type: "success",
callback: () => {
this.$router.push("/queryZdcyryxx");
loading.close();
},
});
} else {
loading.close();
}
});
},
// 搜索树状数据中的 ID
queryTree(tree, id) {
let stark = [];
stark = stark.concat(tree);
while (stark.length) {
const temp = stark.shift();
if (temp[this.defaultProps.children]) {
stark = stark.concat(temp[this.defaultProps.children]);
}
if (temp[this.defaultProps.value] === id) {
return temp[this.defaultProps.label];
}
}
return "";
},
getshuju() {
var self = this;
let loading = this.$loading({
lock: true,
text: "正在加载...",
spinner: "el-icon-loading",
background: "rgba(255, 255, 255, 0.7)",
});
infoZdcyryxx({
xxzjbh: this.xxzjbh,
}).then((res) => {
var result = res.data.rows;
self.propFormField.forEach((i, iIndex) => {
if (i.data && i.data.length > 0) {
i.data.forEach((j, jIndex) => {
if (j.childrenAsAdd) {
j.childrenAsAdd.forEach((m, mIndex) => {
self.$set(self.formLabelAlign, m.id, result[m.id] || []);
if (result[m.id].length > 0) {
//如果集合有值,则让显示
self.$set(
self.propFormField[iIndex].data[jIndex].childrenAsAdd[
mIndex
],
"flag",
true
);
}
});
} else {
self.$set(
self.formLabelAlign,
j.id,
i.objStr ? result[i.objStr][j.id] : result[j.id]
);
}
});
}
});
self.$forceUpdate();
setTimeout(() => {
loading.close();
}, 500);
});
},
},
created() {
this.$store.commit("user/SET_Breadcrumb", this.Menu);
if (this.$route.query.glxxzjbh) {
this.glxxzjbh = this.$route.query.glxxzjbh;
}
if (this.$route.query.xxzjbh) {
this.title = "修改阵地从业人员信息";
this.xxzjbh = this.$route.query.xxzjbh;
this.getshuju();
}
},
};
</script>
<style scoped lang="scss">
</style>
<!--
* @Author: your name
* @Date: 2021-11-22 18:28:51
* @LastEditTime: 2021-11-23 18:42:42
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \founder_vue\src\views\rwddzx\rwgl\index.vue
-->
<template>
<div class="Content">
<right-content
ref="rightContent"
:pageBs="pageBs"
:header="header"
:cxFormData="cxFormData"
:cxQueryField="cxQueryField"
:cxDefaultFormThead="cxDefaultFormThead"
:tableData1="tableData"
@dele="dele"
@carry="carry"
@run="run"
@adds="adds"
@queryLog="queryLog"
@registerDot="registerDot"
@nextCarry="nextCarry"
@edit="edit"
></right-content>
</div>
</template>
<script>
import rightContent from "../components/ptCxForm_components.vue";
export default {
name: "rwgl",
components: {
rightContent,
},
data() {
return {
header: "任务调度中心",
pageBs: "rwgl",
cxFormData: {
zxq:'',
jobhlander:'',
fzr:'',
rwms:'',
rows: 10,
page: 1,
},
Menu: [
{
id: "rwgl",
label: "任务管理",
index: "rwgl",
auth: "r01",
className: "iconfont iconrizhi",
disabled: false,
},
],
cxQueryField: [
{
name: "执行器",
id: "zxq",
type: "select",
value: "",
selectData:[
{
name:'生成数据执行器',
value:'1'
},
{
name:'生成数据执行器',
value:'2'
},
],
placeholder: "请选择",
col: "3",
},
{
name: "任务描述",
id: "rwms",
type: "text",
value: "",
placeholder: "请输入任务描述",
col: "3",
},
{
name: "JobHlander",
id: "jobhlander",
type: "text",
value: "",
placeholder: "请输入JobHlander",
col: "3",
},
{
name: "负责人",
id: "fzr",
type: "text",
value: "",
placeholder: "请输入负责人",
col: "3",
},
],
cxDefaultFormThead: [
{
label: "任务ID",
prop: "rwid",
},
{
label: "任务描述",
prop: "rwms",
},
{
label: "运行模式",
prop: "yxms",
},
{
label: "Cron",
prop: "cron",
width: "200",
},
{
label: "负责人",
prop: "fzr",
},
{
label: "状态",
prop: "status",
},
],
tableData:[
{
rwid:1,
rwms:'122121',
yxms:'BAEN:fwefer',
cron:'0/01?*****',
fzr:'admin',
status:'0'
},
{
rwid:2,
rwms:'122121',
yxms:'BAEN:fadfasdff',
cron:'0/01?*****',
fzr:'admin',
status:'1'
},
{
rwid:3,
rwms:'122121',
yxms:'BAEN:fadfasdff',
cron:'0/01?*****',
fzr:'admin',
status:'0'
},
{
rwid:4,
rwms:'122121',
yxms:'BAEN:fadfasdff',
cron:'0/01?*****',
fzr:'admin',
status:'1'
},
],
ckForm:{
zxq:'',
rwms:'',
rwcssj:'',
sbcscs:'',
fzr:'',
cjyj:'',
rwcs:'',
zrw:'',
zscl:'',
jobhanlder:'',
yxms:'',
cron:'',
lycl:'',
yxms:'',
},
};
},
created() {
this.$store.commit("user/SET_Menu", this.Menu);
},
methods: {
//删除
dele(data) {
var self = this;
this.$confirm("此操作将永久删除该文件, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
self.tableData = self.tableData.filter(el=>el.rwid != data.row.rwid)
console.log( self.tableData,' self.tableData self.tableData')
this.$message({
type: "success",
message: "已成功删除",
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除",
});
});
},
//执行一次
carry(data) {
console.log(data,'runrunrunrun')
this.$alert('执行完成', '执行一次', {
confirmButtonText: '确定',
type: 'success'
// callback: action => {
// this.$message({
// type: 'info',
// message: `action: ${ action }`
// });
// }
});
},
//编辑
edit(data) {
this.$router.push({
path: "/editRwglrwxx",
// query: {
// xxzjbh: data.row.xxzjbh,
// },
});
},
//查询日志
queryLog(data){
this.$router.push({
path: "/ddrz",
// query: {
// xxzjbh: data.row.xxzjbh,
// },
});
},
//注册节点
registerDot(data){
this.$alert('<div>1 <span style="display:inline-block; padding:0 5px;background:green;border-radius: 6px;color:#fff;">http://172.20.1.242:8080/</span></div>', '注册节点', {
confirmButtonText: '确定',
dangerouslyUseHTMLString: true
// callback: action => {
// this.$message({
// type: 'info',
// message: `action: ${ action }`
// });
// }
});
},
//下次执行时间
nextCarry(data){
var str = util.timeStampTurnTime(new Date())
var arr = []
var domStr = ''
for(var i=0;i<5;i++){
let s = str.split(':');
s[1] = (s[1]*1+i).toString()
s = s.join(':')
arr.push(s)
domStr += `<div style='text-align:center;'>${s}</div>`
}
this.$alert(domStr, '下次执行时间', {
confirmButtonText: '确定',
dangerouslyUseHTMLString: true
});
},
//启动
run(data){
var self = this;
self.tableData.map(el=>{
if(el.rwid == data.row.rwid){
el.status = data.row.status == '0'? '1':'0'
}
})
},
//新增
adds(){}
},
};
</script>
<style scoped>
.el-dialog__body {
padding: 10px 15px !important;
}
/* .rightContent .el-input__inner,
#formCommonPage .el-input__inner {
height: 32px;
line-height: 32px;
font-family: inherit;
}
.el-table__header-wrapper th,
.el-table__header-wrapper tr {
background: #f4f6f7;
}
.rightContent .el-input__icon,
#formCommonPage .el-input__icon,
.el-input__suffix-inner {
line-height: 36px;
}
.rightContent .el-range-separator {
position: relative;
top: -4px;
}
.rightContent .el-textarea__inner,
#formCommonPage .el-textarea__inner {
width: 100%;
font-family: inherit;
}
.rightContent .el-range-input,
#formCommonPage .el-range-input {
vertical-align: top;
}
.rightContent .el-date-editor .el-range__close-icon {
margin-top: -4px;
}
.rightContent .el-form-item__error {
left: calc(66% - 27px);
top: 12px;
}
.success-row {
background-color: #fbf9f4 !important;
}
.Content .el-input,
.Content .el-date-editor--daterange.el-input__inner {
width: 100% !important;
} */
</style>
<style scoped lang="scss">
@import "@/assets/styles/rightContent.scss";
</style>
<!--
* @Author: your name
* @Date: 2021-11-22 18:28:46
* @LastEditTime: 2021-11-23 16:44:45
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \founder_vue\src\views\rwddzx\zxqgl\index.vue
-->
<template>
<div class="Content">
<right-content
:pageBs="pageBs"
:header="header"
:cxFormData="cxFormData"
:cxQueryField="cxQueryField"
:cxDefaultFormThead="cxDefaultFormThead"
ref="rightContent"
:tableData1="tableData"
@edit="edit"
@dele="dele"
@toOnline="toOnline"
@selectionChange="selectionChange"
></right-content>
<!-- 编辑 -->
<el-dialog
title="编辑执行器"
:visible.sync="actuatorVisiable"
width="40%"
@closed="closed"
>
<el-form :inline="true" :model="ckForm" class="demo-form-inline" label-position="right" label-width="100px">
<el-row style="margin-top: 20px">
<el-col :span="20" :offset="2" >
<el-form-item label="AppName:">
<el-input v-model="ckForm.appname"></el-input>
</el-form-item>
</el-col>
<el-col :span="20" :offset="2">
<el-form-item label="名称:">
<el-input v-model="ckForm.othername"></el-input>
</el-form-item>
</el-col>
<el-col :span="20" :offset="2">
<el-form-item label="注册方式:">
<el-radio-group v-model="ckForm.resource">
<el-radio label="自动注册"></el-radio>
<el-radio label="手动录入"></el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="20" :offset="2">
<el-form-item label="注册地址:">
<el-input type="textarea" v-model="ckForm.onlineAddress"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="actuatorVisiable = false">取 消</el-button>
<el-button type="primary" @click="submitCKD">确 定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import rightContent from "../components/ptCxForm_components.vue";
export default {
name: "zxqgl",
components: {
rightContent,
},
data() {
return {
header: "任务调度中心",
pageBs: "zxqgl",
cxFormData: {
appname: "",
othername: "",
limit: 10,
page: 1,
},
cxQueryField: [
{
name: "AppName",
id: "appname",
type: "text",
value: "",
placeholder: "请输入AppName",
col: "3",
},
{
name: "名称",
id: "othername",
type: "text",
value: "",
placeholder: "请输入名称",
col: "3",
},
],
cxDefaultFormThead: [
{
label: "AppName",
prop: "appname",
width: "200",
},
{
label: "名称",
prop: "othername",
width: "200",
},
{
label: "注册方式",
prop: "zcfs",
width: "200",
},
{
label: "Online机器地址",
prop: "onlineAddress",
toOnline:true,
width: "200",
},
],
Menu: [
{
id: "zxqgl",
label: "执行器管理",
index: "zxqgl",
auth: "r01",
className: "iconfont iconrizhi",
disabled: false,
},
],
tableData:[
{
id:'0',
appname:'aapp-dfdsaf-creare-sdafasd',
othername:'生成数据执行器',
zcfs:'手动录入',
onlineAddress:'http://172.20.1.242:8080/,http://172.20.1.242:8080/',
},
{
id:'1',
appname:'aapp-dfdsaf-creare-sdafasd',
othername:'生成数据执行器',
zcfs:'手动录入',
onlineAddress:'http://172.20.1.242:8080/,http://172.20.1.242:8080/',
},
{
id:'2',
appname:'aapp-dfdsaf-creare-sdafasd',
othername:'生成数据执行器',
zcfs:'手动录入',
onlineAddress:'http://172.20.1.242:8080/,http://172.20.1.242:8080/',
},
],
selectArr: [],
actuatorVisiable: false,
ckForm: {
appname: "",
othername: "",
resource: "",
onlineAddress: "",
},
fileArr: [],
zdXxzjbh: "",
};
},
created() {
this.$store.commit("user/SET_Menu", this.Menu);
},
methods: {
edit(scope) {
var self = this;
for(let key in self.ckForm){
self.ckForm[key] = scope.row[key]
}
this.actuatorVisiable = true
},
dele(scope) {
var self = this;
this.$confirm("此操作将永久删除该文件, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
self.tableData = self.tableData.filter(el=>el.id != scope.row.id)
console.log( self.tableData,' self.tableData self.tableData')
this.$message({
type: "success",
message: "已成功删除",
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除",
});
});
},
fileOnchange(file, fileList) {
if (fileList.length > 0) {
this.fileArr = [fileList[0]]; // 这一步,是 展示最后一次选择的csv文件
if (fileList.length > 1) this.$message.error("只能上传一个文件!");
}
},
closed() {
this.actuatorVisiable = false
},
onChange(file, fileList) {
console.log(file, fileList);
},
selectionChange(scope) {
this.selectArr = scope;
},
submitCKD() {
this.actuatorVisiable = false
},
//查看Online机器地址
toOnline(data){
var str = data.onlineAddress
var arr = []
var domStr = ''
if(str.indexOf(',') != -1){
arr = str.split(',')
}else{
arr.push(str)
}
for(var i=0;i<arr.length;i++){
domStr += `<div style='text-align:center;'>${arr[i]}</div>`
}
this.$alert(domStr, 'Online机器地址', {
confirmButtonText: '确定',
dangerouslyUseHTMLString: true
});
},
},
};
</script>
<style scoped>
.el-dialog__body {
padding: 10px 15px !important;
}
.el-form-item{
margin-bottom: 10px !important;
}
.el-input,.el-textarea{
min-width: 300px;
}
</style>
<style scoped lang="scss">
@import "@/assets/styles/rightContent.scss";
</style>
<!--
* @Author: your name
* @Date: 2021-11-22 16:46:06
* @LastEditTime: 2021-11-23 17:41:23
* @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 style="padding-left: 20px">
<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;
this.$confirm("是否确认发布", "提示", { type: "warning" })
.then((_) => {
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));
})
.catch((_) => {});
},
/**
* @description: 下线
* @param {*} msg 一行的信息
* @return {*}
*/
xx(msg) {
let self = this;
this.$confirm("是否确认下线", "提示", { type: "warning" })
.then((_) => {
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));
})
.catch((_) => {});
},
/**
* @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 17:50:24
* @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 style="padding: 20px">
<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;
margin-bottom: 20px;
padding: 15px;
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