|
@@ -17,6 +17,20 @@
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="流程状态">
|
|
|
+ <el-select v-model="listQuery.status" clearable>
|
|
|
+ <el-option :label="'启用'" :value="1"></el-option>
|
|
|
+ <el-option :label="'停用'" :value="0"></el-option>
|
|
|
+ </el-select>
|
|
|
+ <!-- <el-input
|
|
|
+ v-model="listQuery.name"
|
|
|
+ placeholder="请输入流程名称"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ style="width: 240px"
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ /> -->
|
|
|
+ </el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button
|
|
|
type="primary"
|
|
@@ -68,7 +82,7 @@
|
|
|
@selection-change="handleSelectionChange"
|
|
|
>
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
- <el-table-column label="ID" prop="id" width="120" />
|
|
|
+ <el-table-column label="ID" prop="id" width="60" />
|
|
|
<el-table-column
|
|
|
label="名称"
|
|
|
prop="name"
|
|
@@ -93,12 +107,47 @@
|
|
|
width="180"
|
|
|
/>
|
|
|
<el-table-column
|
|
|
+ label="排序"
|
|
|
+ align="center"
|
|
|
+ prop="sort_no"
|
|
|
+ width="80"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ label="流程状态"
|
|
|
+ align="center"
|
|
|
+ prop="status"
|
|
|
+ width="100"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-tag type="succes" v-if="scope.row.status">启用</el-tag>
|
|
|
+ <el-tag type="danger" v-else>停用</el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
label="操作"
|
|
|
align="center"
|
|
|
class-name="small-padding fixed-width"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
+ v-permisaction="['process:admin:manager:actionstop']"
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ :icon="
|
|
|
+ scope.row.status ? 'el-icon-video-play' : 'el-icon-video-pause'
|
|
|
+ "
|
|
|
+ @click="handleStatus(scope.row)"
|
|
|
+ >{{ scope.row.status ? "停用" : "启用" }}</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ v-permisaction="['process:admin:manager:sort']"
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-sort"
|
|
|
+ @click="handleSort(scope.row)"
|
|
|
+ >排序</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
v-permisaction="['process:admin:manager:clone']"
|
|
|
size="mini"
|
|
|
type="text"
|
|
@@ -275,6 +324,39 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-drawer>
|
|
|
+
|
|
|
+ <el-dialog :title="'排序'" :visible.sync="sortOpen" width="400px">
|
|
|
+ <div class="tpl-create-content">
|
|
|
+ <el-form ref="sortRuleForm" :model="sortRuleForm" label-width="80px">
|
|
|
+ <el-form-item
|
|
|
+ label="排序值"
|
|
|
+ prop="sortNo"
|
|
|
+ :rules="[
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: '请输入排序值',
|
|
|
+ },
|
|
|
+ ]"
|
|
|
+ style="width: 95%"
|
|
|
+ >
|
|
|
+ <!-- <el-input v-model="ruleForm.name" /> -->
|
|
|
+ <el-input-number
|
|
|
+ v-model="sortRuleForm.sortNo"
|
|
|
+ controls-position="right"
|
|
|
+ :min="0"
|
|
|
+ :max="10000"
|
|
|
+ style="width: 100%"
|
|
|
+ ></el-input-number>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer" style="text-align: right">
|
|
|
+ <el-button type="primary" @click="handleFormSort('sortRuleForm')"
|
|
|
+ >提交</el-button
|
|
|
+ >
|
|
|
+ <el-button @click="sortOpen = false">取 消</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</el-card>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -287,6 +369,8 @@ import {
|
|
|
processDetails,
|
|
|
deleteProcess,
|
|
|
cloneProcess,
|
|
|
+ statusProcess,
|
|
|
+ sortProcess,
|
|
|
} from "@/api/process/admin/process";
|
|
|
import SaveForm from "@/components/save-form";
|
|
|
import { classifyList } from "@/api/process/admin/classify";
|
|
@@ -334,6 +418,7 @@ export default {
|
|
|
dialogProcessVisibleName: 1,
|
|
|
processValueList: [],
|
|
|
listQuery: {
|
|
|
+ status: null,
|
|
|
page: 1,
|
|
|
per_page: 10,
|
|
|
},
|
|
@@ -354,6 +439,11 @@ export default {
|
|
|
{ required: true, message: "请输入流程描述", trigger: "blur" },
|
|
|
],
|
|
|
},
|
|
|
+ sortOpen: false,
|
|
|
+ sortRuleForm: {
|
|
|
+ id: null,
|
|
|
+ sortNo: 0,
|
|
|
+ },
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -505,6 +595,15 @@ export default {
|
|
|
this.wfdDesignRefresh = true;
|
|
|
});
|
|
|
},
|
|
|
+ async handleSort(row) {
|
|
|
+ try {
|
|
|
+ this.sortOpen = true;
|
|
|
+ this.sortRuleForm.id = row.id;
|
|
|
+ this.sortRuleForm.sortNo = row.sort_no;
|
|
|
+ } catch {
|
|
|
+ //
|
|
|
+ }
|
|
|
+ },
|
|
|
async handleEdit(row) {
|
|
|
this.dialogProcessVisibleName = 2;
|
|
|
load.startLoading();
|
|
@@ -533,6 +632,25 @@ export default {
|
|
|
});
|
|
|
this.open = true;
|
|
|
},
|
|
|
+ handleFormSort(formName) {
|
|
|
+ this.$refs[formName].validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ console.log(valid);
|
|
|
+ sortProcess(this.sortRuleForm.sortNo, this.sortRuleForm.id).then(
|
|
|
+ (res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.sortOpen = false;
|
|
|
+ this.getList();
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "更新成功",
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ );
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
handleClose(done) {
|
|
|
this.$confirm("确认关闭?")
|
|
|
.then((_) => {
|
|
@@ -715,6 +833,23 @@ export default {
|
|
|
this.ruleForm.form_structure = "";
|
|
|
}
|
|
|
},
|
|
|
+ handleStatus(row) {
|
|
|
+ const str = row.status ? "停用" : "启用";
|
|
|
+ this.$confirm(`是否${str}流程 < ${row.name} > ?`, "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "info",
|
|
|
+ }).then(() => {
|
|
|
+ const status = row.status ? 0 : 1;
|
|
|
+ statusProcess(status, row.id).then(() => {
|
|
|
+ this.getList();
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: `流程已${str}!`,
|
|
|
+ });
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
handleClone(row) {
|
|
|
this.$confirm(`确认克隆流程 < ${row.name} > ?`, "提示", {
|
|
|
confirmButtonText: "确定",
|