部署列表

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

View File

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

View File

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

View File

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

View File

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

View File

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