Commit 474192f2 by 叶富雄

Merge remote-tracking branch 'origin/dev_xzeq' into dev_xzeq

parents bfff4bb9 877b7091
......@@ -523,10 +523,10 @@
</el-row>
<!--表格-->
<!-- v-loading="tableLoading"
element-loading-text="拼命加载中" -->
<el-table
id="ajzbQuery"
v-loading="tableLoading"
element-loading-text="拼命加载中"
:key="key"
ref="itsmDataTable"
:data="tableData"
......
/*
* @Author: your name
* @Date: 2021-08-31 14:40:49
<<<<<<< HEAD
* @LastEditTime: 2021-11-23 18:47:24
=======
* @LastEditTime: 2021-11-22 17:04:36
>>>>>>> 87f9fe66c22f1685b150e85197ddf85ea5c778c6
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \founder_vue\src\router\index.js
......@@ -60,6 +64,7 @@ Vue.use(VueRouter);
const mainRouters = [
...indexRoutes,
rwddRoutes,
zdxxRoutes,
sfRoutes,
xxtkRoutes,
......
/*
* @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
<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 15:00:33
* @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>
<div style="padding-left: 20px">
<right-content
:pageBs="pageBs"
:header="header"
......@@ -22,7 +22,12 @@
@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
:model="sfForm"
:rules="rules"
ref="ruleForm"
style="margin-top: 25px"
>
<el-form-item
label="算法名称"
:label-width="formLabelWidth"
......@@ -223,8 +228,8 @@ export default {
*/
fb(msg) {
let self = this;
console.log(msg);
this.$confirm("是否确认发布", "提示", { type: "warning" })
.then((_) => {
this.cxListForm.forEach((item) => {
if (
msg.row.sflj == item.sflj &&
......@@ -235,6 +240,8 @@ export default {
}
});
sessionStorage.setItem("cxListForm", JSON.stringify(self.cxListForm));
})
.catch((_) => {});
},
/**
* @description: 下线
......@@ -242,10 +249,9 @@ export default {
* @return {*}
*/
xx(msg) {
console.log(msg);
let self = this;
console.log(msg);
this.$confirm("是否确认下线", "提示", { type: "warning" })
.then((_) => {
this.cxListForm.forEach((item) => {
if (
msg.row.sflj == item.sflj &&
......@@ -256,6 +262,8 @@ export default {
}
});
sessionStorage.setItem("cxListForm", JSON.stringify(self.cxListForm));
})
.catch((_) => {});
},
/**
* @description: 新增确定
......@@ -276,7 +284,7 @@ export default {
code: 200,
message: "成功",
data: {
mrRwSize: Math.round(Math.random()*100),
mrRwSize: Math.round(Math.random() * 100),
mpRwList: [],
},
},
......@@ -318,5 +326,4 @@ export default {
</script>
<style>
</style>
<!--
* @Author: your name
* @Date: 2021-11-22 17:23:43
* @LastEditTime: 2021-11-23 14:33:50
* @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>
<div style="padding: 20px">
<div class="boxsf" v-for="(item, idx) in list" :key="idx">
<div class="rybq">
<span> {{ item.sfmc }}</span>
......@@ -122,8 +122,9 @@ export default {
<style lang="scss" scoped>
.boxsf {
margin: 5px;
padding: 10px;
// margin: 5px;
margin-bottom: 20px;
padding: 15px;
box-sizing: border-box;
background: #ffffff;
border: 1px solid #eaeaea;
......
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