Commit 680c7170 authored by 徐一鸣's avatar 徐一鸣

Merge branch 'xym' into dev

parents 0e6f1f32 247e6b74
...@@ -499,10 +499,11 @@ export default { ...@@ -499,10 +499,11 @@ export default {
.more_action_list > li:first-child::before { .more_action_list > li:first-child::before {
content: ""; content: "";
position: absolute; position: absolute;
top: -14px; top: -20px;
right: calc(50% - 14px); right: calc(50% - 20px);
width: 28px; width: 40px;
height: 14px; height: 20px;
/* background-color: red; */
} }
.more_action_list > li:first-child::after { .more_action_list > li:first-child::after {
content: ""; content: "";
......
...@@ -31,8 +31,38 @@ ...@@ -31,8 +31,38 @@
ref="dialog" ref="dialog"
:title="dialogInfo.title" :title="dialogInfo.title"
:msg="dialogInfo.msg" :msg="dialogInfo.msg"
:cancel-text="dialogInfo.cancelText"
:submit="dialogInfo.submit" :submit="dialogInfo.submit"
:sunbmit-text="dialogInfo.sunbmitText"
></apass-dialog> ></apass-dialog>
<apass-dialog ref="copyProcess" title="复制流程">
<template slot="content">
<el-form
v-if="copyTempItem"
ref="detail_form"
class="apaas_detail_form"
label-position="top"
:model="copyTempItem"
:rules="copyTempItem_rules"
>
<el-form-item label="流程名称:" prop="newName">
<el-input
v-model="copyTempItem.newName"
placeholder="请输入流程名称"
></el-input>
</el-form-item>
</el-form>
</template>
<template slot="action">
<el-button type="defalut" size="mini" @click="cancelCopyProcess">
取消
</el-button>
<el-button type="primary" size="mini" @click="submitCopyProcess">
保存
</el-button>
</template>
</apass-dialog>
</div> </div>
</template> </template>
...@@ -50,91 +80,90 @@ export default { ...@@ -50,91 +80,90 @@ export default {
filterList: [ filterList: [
{ {
name: "服务领域", name: "服务领域",
prop: "service_domains",
data: [],
}, },
{ {
name: "工作区域", name: "工作区域",
prop: "workareas",
data: [],
}, },
{ {
name: "流程状态", name: "流程状态",
prop: "states",
data: [],
}, },
], ],
listHeader: [], listHeader: [],
listData: [], listData: [],
listTotal: 0, listTotal: 0,
dialogInfo: { dialogInfo: {
title: "",
msg: "", msg: "",
cancelText: "",
submit: null, submit: null,
sunbmitText: "",
}, },
tempFilter: null, tempFilter: null,
copyTempItem: null,
copyTempItem_rules: {
newName: [
{
required: true,
message: "请输入流程名称",
trigger: "blur",
},
{
max: 16,
message: "长度小于16个字符",
trigger: "blur",
},
],
},
}), }),
methods: { methods: {
init(filter) { init(filter) {
console.log(filter); let params = {
sectors: (filter.service_domains && filter.service_domains.map((item) => item.value).join(",")) || "",
workareas: (filter.workareas && filter.workareas.map((item) => item.value).join(",")) || "",
states: (filter.states && filter.states.map((item) => item.value).join(",")) || "",
page: filter.page,
page_size: filter.size,
};
this.tempFilter = filter; this.tempFilter = filter;
this.listTotal = 3; this.$http
this.listData = [ .get("/apaas/serviceapp/v3/workflows/list", { params })
{ .then(({ data }) => {
id: "WF00000001", if (data.success === 1) {
name: "保安资格申请流程", this.listTotal = data.total;
sectors_name: "经济建设", this.listData = data.data;
create_time: "2021-01-01T00:00:00Z", }
state: "0", })
}, .catch((error) => {
{ console.log(error);
id: "WF00000002", });
name: "保安考试流程",
sectors_name: "经济建设",
create_time: "2021-01-01T00:00:00Z",
state: "1",
},
{
id: "WF00000003",
name: "申请材料审核流程",
sectors_name: "经济建设",
create_time: "2021-01-01T00:00:00Z",
state: "2",
},
];
}, },
initFilter() { initFilter() {
Promise.all([ this.$http
this.$http.get("/apaas/service/v3/service/manager/servtype"), .get("/apaas/serviceapp/v3/workflows/searchConditions")
this.$http.get("/apaas/service/v3/service/manager/servarea"), .then(({ data }) => {
]) if (data.success === 1) {
.then((response) => { let datas = data.data;
let filterList = response.map((item) => { this.filterList.forEach((item) => {
return { let filter = datas[item.prop] || [];
name: item.body.data[0].type_name,
prop: item.body.data[0].type_code,
data: item.body.data.map((v) => ({
name: v.name,
value: v.id,
})),
};
});
this.filterList = [ this.$set(
...filterList, item,
{ "data",
name: "流程状态", filter.map((item) => ({
prop: "state", name: item.name,
data: [ value: item.id,
{ }))
name: "已发布", );
value: 2, });
}, }
{
name: "已部署",
value: 1,
},
{
name: "未部署",
value: 0,
},
],
},
];
}) })
.catch((error) => { .catch((error) => {
console.log(error); console.log(error);
...@@ -144,7 +173,7 @@ export default { ...@@ -144,7 +173,7 @@ export default {
this.listHeader = [ this.listHeader = [
{ {
label: "流程编号", label: "流程编号",
prop: "id", prop: "workflows_code",
width: 180, width: 180,
}, },
{ {
...@@ -155,7 +184,7 @@ export default { ...@@ -155,7 +184,7 @@ export default {
}, },
{ {
label: "服务领域", label: "服务领域",
prop: "sectors_name", prop: "sector_name",
align: "center", align: "center",
width: 240, width: 240,
}, },
...@@ -197,9 +226,17 @@ export default { ...@@ -197,9 +226,17 @@ export default {
}, },
], ],
moreActionList: [ moreActionList: [
{
label: "取消发布",
callback: this.cancelPublishItem,
},
{
label: "部署",
callback: this.deployItem,
},
{ {
label: "取消部署", label: "取消部署",
callback: this.canceldeployItem, callback: this.cancelDeployItem,
}, },
{ {
label: "复制", label: "复制",
...@@ -215,28 +252,96 @@ export default { ...@@ -215,28 +252,96 @@ export default {
}, },
refresh() { refresh() {
this.init(this.tempFilter); this.init(this.tempFilter);
}, // 刷新当前页列表
showDialog() {
this.$refs.dialog.show();
}, },
addNewProcess() { copyProcessShow() {
console.log("addNewProcess"); this.$refs.copyProcess.show();
},
detailItem(item) {
this.$router.push(`/progress/designer/detail/${item.id}`);
}, },
publishItem(item) { copyProcessHide() {
console.log(`publish ${item.name}`); this.$refs.copyProcess.hide();
this.copyTempItem = null;
}, },
addNewProcess() {
this.$router.push("/progress/designs");
}, // FIXME: 新建流程
editItem(item) { editItem(item) {
console.log(`edit ${item.name}`); this.$router.push("/progress/designs");
}, }, // FIXME: 编辑流程
canceldeployItem(item) { detailItem(item) {
console.log(`cancel deploy ${item.name}`); this.$router.push(`/progress/designer/detail/${item.workflows_id}`);
}, }, // TODO: 查看详情
publishItem(item) {
this.dialogInfo.title = "提示";
this.dialogInfo.msg = `发布后流程后,流程将部署到工作区域并上架到服务超市,是否发布该流程?`;
this.dialogInfo.cancelText = "取消";
this.dialogInfo.sunbmitText = "发布";
this.dialogInfo.submit = () => {
console.log(`发布${item.name}`);
};
this.showDialog();
}, // TODO: 发布流程
cancelPublishItem(item) {
this.dialogInfo.title = "提示";
this.dialogInfo.msg = `取消发布后,该流程服务将从服务超市下架,仅部署在工作区域${item.workarea_name}中,是否取消发布流程服务“${item.name}”?`;
this.dialogInfo.cancelText = "暂不";
this.dialogInfo.sunbmitText = "取消发布";
this.dialogInfo.submit = () => {
console.log(`取消发布${item.name}`);
};
this.showDialog();
}, // TODO: 取消发布流程
deployItem(item) {
this.dialogInfo.title = "提示";
this.dialogInfo.msg = `部署流程后,流程将部署到工作区域,但不会上架到服务超市,是否部署该流程?`;
this.dialogInfo.cancelText = "取消";
this.dialogInfo.sunbmitText = "部署";
this.dialogInfo.submit = () => {
console.log(`部署${item.name}`);
};
this.showDialog();
}, // TODO: 部署流程
cancelDeployItem(item) {
this.dialogInfo.title = "提示";
this.dialogInfo.msg = `取消部署后,该流程服务不能通过链接访问,是否取消部署流程服务“${item.name}”?`;
this.dialogInfo.cancelText = "取消";
this.dialogInfo.sunbmitText = "取消部署";
this.dialogInfo.submit = () => {
console.log(`取消部署${item.name}`);
};
this.showDialog();
}, // TODO: 取消流程
copyItem(item) { copyItem(item) {
console.log(`copy ${item.name}`); this.copyTempItem = {
}, ...item,
newName: "",
};
this.copyProcessShow();
}, // TODO: 复制流程
cancelCopyProcess() {
this.copyProcessHide();
}, // 复制流程-取消
submitCopyProcess() {
this.$refs.detail_form.validate((valid) => {
if (valid) {
console.log(this.copyTempItem);
this.copyProcessHide();
} else {
return false;
}
});
}, // TODO: 复制流程-确定
deleteItem(item) { deleteItem(item) {
console.log(`delete ${item.name}`); this.dialogInfo.title = "提示";
}, this.dialogInfo.msg = `您确定要删除流程服务“${item.name}”吗?`;
this.dialogInfo.cancelText = "取消";
this.dialogInfo.sunbmitText = "确定";
this.dialogInfo.submit = () => {
console.log(`删除${item.name}`);
};
this.showDialog();
}, // TODO: 删除流程
}, },
created() { created() {
this.initFilter(); this.initFilter();
...@@ -249,4 +354,11 @@ export default { ...@@ -249,4 +354,11 @@ export default {
.process-designer-container { .process-designer-container {
height: 100%; height: 100%;
} }
.apaas_detail_form {
text-align: left;
margin-top: 20px;
}
.apaas_detail_form .el-form-item {
margin: 0;
}
</style> </style>
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
:title="dialogInfo.title" :title="dialogInfo.title"
:msg="dialogInfo.msg" :msg="dialogInfo.msg"
:submit="dialogInfo.submit" :submit="dialogInfo.submit"
:sunbmitText="dialogInfo.sunbmitText" :sunbmit-text="dialogInfo.sunbmitText"
></apass-dialog> ></apass-dialog>
<allot-info-confirm <allot-info-confirm
...@@ -148,6 +148,7 @@ export default { ...@@ -148,6 +148,7 @@ export default {
title: "", title: "",
msg: "", msg: "",
submit: null, submit: null,
sunbmitText: "",
}, },
listUrl: "", listUrl: "",
deleteUrl: "", deleteUrl: "",
...@@ -1064,8 +1065,7 @@ export default { ...@@ -1064,8 +1065,7 @@ export default {
callback(item) { callback(item) {
if (item.state == 0) { if (item.state == 0) {
return null; // 已下架,上架的操作需要普通用户申请 return null; // 已下架,上架的操作需要普通用户申请
} else } else if (item.state == 1) {
if (item.state == 1) {
return _self.soldOutItem(item); // 已上架,超管用户可以直接下架 return _self.soldOutItem(item); // 已上架,超管用户可以直接下架
} else if (item.state == 2) { } else if (item.state == 2) {
return _self.soldUpItem(item); // 上架审核中,超管用户可以直接上架 return _self.soldUpItem(item); // 上架审核中,超管用户可以直接上架
...@@ -1398,7 +1398,6 @@ export default { ...@@ -1398,7 +1398,6 @@ export default {
applyForSoldUpItem(item) { applyForSoldUpItem(item) {
this.dialogInfo.title = "提示"; this.dialogInfo.title = "提示";
this.dialogInfo.msg = "确认申请上架此服务吗?"; this.dialogInfo.msg = "确认申请上架此服务吗?";
this.dialogInfo.cancelText = "取消";
this.dialogInfo.sunbmitText = "发送通知"; this.dialogInfo.sunbmitText = "发送通知";
this.dialogInfo.submit = () => { this.dialogInfo.submit = () => {
this.$http this.$http
...@@ -1433,7 +1432,6 @@ export default { ...@@ -1433,7 +1432,6 @@ export default {
this.dialogInfo.title = "是否确定下架服务"; this.dialogInfo.title = "是否确定下架服务";
this.dialogInfo.msg = this.dialogInfo.msg =
"下架此服务会导致用户被迫暂停对服务的调用,下架前需向超级管理员发送通知,超级管理员通过后此服务将会从服务超市中下架。"; "下架此服务会导致用户被迫暂停对服务的调用,下架前需向超级管理员发送通知,超级管理员通过后此服务将会从服务超市中下架。";
this.dialogInfo.cancelText = "取消";
this.dialogInfo.sunbmitText = "发送通知"; this.dialogInfo.sunbmitText = "发送通知";
this.dialogInfo.submit = () => { this.dialogInfo.submit = () => {
this.$http this.$http
...@@ -1467,7 +1465,6 @@ export default { ...@@ -1467,7 +1465,6 @@ export default {
soldUpItem(item) { soldUpItem(item) {
this.dialogInfo.title = "提示"; this.dialogInfo.title = "提示";
this.dialogInfo.msg = "确认上架此服务吗?"; this.dialogInfo.msg = "确认上架此服务吗?";
this.dialogInfo.cancelText = "";
this.dialogInfo.sunbmitText = "确定"; this.dialogInfo.sunbmitText = "确定";
this.dialogInfo.submit = () => { this.dialogInfo.submit = () => {
this.$http this.$http
...@@ -1501,7 +1498,6 @@ export default { ...@@ -1501,7 +1498,6 @@ export default {
this.dialogInfo.title = "提示"; this.dialogInfo.title = "提示";
this.dialogInfo.msg = this.dialogInfo.msg =
"下架此服务会导致调用该服务的<br />用户被迫暂停对服务的调用"; "下架此服务会导致调用该服务的<br />用户被迫暂停对服务的调用";
this.dialogInfo.cancelText = "";
this.dialogInfo.sunbmitText = "确定"; this.dialogInfo.sunbmitText = "确定";
this.dialogInfo.submit = () => { this.dialogInfo.submit = () => {
this.$http this.$http
...@@ -1534,7 +1530,6 @@ export default { ...@@ -1534,7 +1530,6 @@ export default {
deleteItem(item) { deleteItem(item) {
this.dialogInfo.title = ""; this.dialogInfo.title = "";
this.dialogInfo.msg = "是否删除该条服务?"; this.dialogInfo.msg = "是否删除该条服务?";
this.dialogInfo.cancelText = "";
this.dialogInfo.sunbmitText = ""; this.dialogInfo.sunbmitText = "";
this.dialogInfo.submit = () => { this.dialogInfo.submit = () => {
this.$http this.$http
......
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