部署列表

This commit is contained in:
cxc
2022-12-20 17:27:12 +08:00
parent 9b33e7e846
commit 750f66aaf4
6 changed files with 49 additions and 45 deletions

View File

@ -71,6 +71,7 @@ function renderFrom(h) {
label-width={`${formConfCopy.labelWidth}px`}
ref={formConfCopy.formRef}
// model不能直接赋值 https://github.com/vuejs/jsx/issues/49#issuecomment-472013664
model={this[formConfCopy.formModel]}
props={{ model: this[formConfCopy.formModel] }}
rules={this[formConfCopy.formRules]}
>
@ -113,8 +114,8 @@ function renderChildren(h, scheme) {
}
function setValue(event, config, scheme) {
this.$set(config, "defaultValue", event);
this.$set(this[this.formConf.formModel], scheme.__vModel__, event);
config.defaultValue = event;
this[this.formConf.formModel][scheme.__vModel__] = event;
}
function buildListeners(scheme) {
@ -142,6 +143,7 @@ export default defineComponent({
required: true,
},
},
emits: ["submit", "getData"],
data() {
const data = {
formConfCopy: deepClone(this.formConf),
@ -189,12 +191,13 @@ export default defineComponent({
}
});
},
// 特殊处理的 Option
buildOptionMethod(scheme) {
const config = scheme.__config__;
if (config && config.tag === "el-cascader") {
if (config.dataType === "dynamic") {
this.$axios({
axios({
method: config.method,
url: config.url,
}).then((resp) => {

View File

@ -58,7 +58,6 @@ function vModel(dataObject, defaultValue) {
this.$emit("input", val);
};
dataObject.on.change = (val) => {
console.log(val, "change");
this.$emit("input", val);
};
}
@ -68,7 +67,6 @@ function mountSlotFiles(confClone, children) {
if (childObjs) {
Object.keys(childObjs).forEach((key) => {
const childFunc = childObjs[key];
console.log(childFunc);
if (confClone.__slot__ && confClone.__slot__[key]) {
children.push(childFunc(confClone, key));
}
@ -220,7 +218,6 @@ export default defineComponent({
render() {
const dataObject = makeDataObject();
const confClone = deepClone(this.$props.conf);
console.log(this.$slots.default, "lot");
const children = [];
// 如果slots文件夹存在与当前tag同名的文件则执行文件中的代码
mountSlotFiles(confClone, children);

View File

@ -171,6 +171,7 @@
</template>
<script setup>
import { download } from "@/utils/request";
import {
listAllCategory,
// getCategory,
@ -341,10 +342,10 @@ function handleDelete(row) {
}
/** 导出按钮操作 */
function handleExport() {
this.download(
download(
"workflow/category/export",
{
...this.queryParams,
...queryParams.value,
},
`category_${new Date().getTime()}.xlsx`
);

View File

@ -71,7 +71,7 @@
<el-button
type="danger"
plain
icon="el-icon-delete"
icon="delete"
size="small"
:disabled="multiple"
@click="handleDelete"
@ -104,9 +104,9 @@
align="center"
:show-overflow-tooltip="true"
>
<template slot-scope="scope">
<el-button type="text" @click="handleProcessView(scope.row)">
<span>{{ scope.row.processName }}</span>
<template #default="{ row }">
<el-button link @click="handleProcessView(row)">
<span>{{ row.processName }}</span>
</el-button>
</template>
</el-table-column>
@ -117,14 +117,14 @@
:formatter="categoryFormat"
/>
<el-table-column label="流程版本" align="center">
<template slot-scope="scope">
<el-tag size="default">v{{ scope.row.version }}</el-tag>
<template #default="{ row }">
<el-tag size="default">v{{ row.version }}</el-tag>
</template>
</el-table-column>
<el-table-column label="状态" align="center">
<template slot-scope="scope">
<el-tag type="success" v-if="!scope.row.suspended">激活</el-tag>
<el-tag type="warning" v-if="scope.row.suspended">挂起</el-tag>
<template #default="{ row }">
<el-tag type="success" v-if="!row.suspended">激活</el-tag>
<el-tag type="warning" v-if="row.suspended">挂起</el-tag>
</template>
</el-table-column>
<el-table-column
@ -138,20 +138,20 @@
align="center"
class-name="small-padding fixed-width"
>
<template slot-scope="scope">
<template #default="{ row }">
<el-button
type="text"
link
size="small"
icon="el-icon-price-tag"
@click.native="handlePublish(scope.row)"
icon="price-tag"
@click.native="handlePublish(row)"
v-hasPermi="['workflow:deploy:list']"
>版本管理</el-button
>
<el-button
type="text"
link
size="small"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
icon="delete"
@click="handleDelete(row)"
v-hasPermi="['workflow:deploy:remove']"
>删除</el-button
>
@ -201,21 +201,21 @@
align="center"
:show-overflow-tooltip="true"
>
<template slot-scope="scope">
<el-button type="text" @click="handleProcessView(scope.row)">
<span>{{ scope.row.processName }}</span>
<template #default="{ row }">
<el-button link @click="handleProcessView(row)">
<span>{{ row.processName }}</span>
</el-button>
</template>
</el-table-column>
<el-table-column label="流程版本" align="center">
<template slot-scope="scope">
<el-tag size="default">v{{ scope.row.version }}</el-tag>
<template #default="{ row }">
<el-tag size="default">v{{ row.version }}</el-tag>
</template>
</el-table-column>
<el-table-column label="状态" align="center">
<template slot-scope="scope">
<el-tag type="success" v-if="!scope.row.suspended">激活</el-tag>
<el-tag type="warning" v-if="scope.row.suspended">挂起</el-tag>
<template #default="{ row }">
<el-tag type="success" v-if="!row.suspended">激活</el-tag>
<el-tag type="warning" v-if="row.suspended">挂起</el-tag>
</template>
</el-table-column>
<el-table-column
@ -223,30 +223,30 @@
align="center"
class-name="small-padding fixed-width"
>
<template slot-scope="scope">
<template #default="{ row }">
<el-button
type="text"
link
size="small"
icon="video-pause"
v-if="!scope.row.suspended"
@click.native="handleChangeState(scope.row, 'suspended')"
v-if="!row.suspended"
@click.native="handleChangeState(row, 'suspended')"
v-hasPermi="['workflow:deploy:status']"
>挂起</el-button
>
<el-button
type="text"
link
size="small"
icon="video-play"
v-if="scope.row.suspended"
@click.native="handleChangeState(scope.row, 'active')"
v-if="row.suspended"
@click.native="handleChangeState(row, 'active')"
v-hasPermi="['workflow:deploy:status']"
>激活</el-button
>
<el-button
type="text"
link
size="small"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
icon="delete"
@click="handleDelete(row)"
v-hasPermi="['workflow:deploy:remove']"
>删除</el-button
>
@ -329,7 +329,9 @@ getList();
/** 查询流程分类列表 */
function getCategoryList() {
listAllCategory().then((response) => (categoryOptions.value = response.data));
listAllCategory().then((response) => {
categoryOptions.value = response.rows;
});
}
/** 查询流程部署列表 */
function getList() {

View File

@ -277,9 +277,10 @@ function handleAdd() {
}
/** 修改按钮操作 */
function handleUpdate(row) {
const id = row?.formId ?? ids.value[0];
router.push({
path: "/flowable/form/build",
query: { formId: row.formId },
query: { formId: id },
});
}
/** 提交按钮 */

View File

@ -526,7 +526,7 @@ const submitForm = () => {
drawingList.value = [];
idGlobal.value = 100;
open.value = false;
//TODO: 关闭当前标签页并返回上个页面
// 关闭当前标签页并返回上个页面
tab.closeOpenPage();
router.back();
}