This commit is contained in:
shijing 2025-09-19 11:23:45 +08:00
commit d353df9c1d
8 changed files with 471 additions and 17 deletions

View File

@ -13,37 +13,29 @@
"@tinymce/tinymce-vue": "5.0.0",
"animate.css": "^4.1.1",
"axios": "1.3.4",
"babylon": "^6.18.0",
"babylonjs": "^6.46.0",
"babylonjs-gui": "^6.46.0",
"babylonjs-loaders": "^6.46.0",
"cesium": "^1.126.0",
"codemirror": "^5.65.17",
"codemirror-editor-vue3": "^2.7.0",
"compression-webpack-plugin": "^11.1.0",
"copy-webpack-plugin": "^12.0.2",
"core-js": "3.29.0",
"cropperjs": "1.5.13",
"crypto-browserify": "^3.12.0",
"crypto-js": "4.1.1",
"d3": "^7.6.1",
"dagre": "^0.8.5",
"dagre-d3": "^0.6.4",
"dhtmlx-gantt": "^8.0.6",
"echarts": "^5.5.1",
"element-plus": "^2.8.4",
"file-saver": "^2.0.5",
"html2canvas": "^1.4.1",
"json-editor-vue3": "^1.0.6",
"jspdf": "^2.5.1",
"moment": "^2.30.1",
"node-polyfill-webpack-plugin": "^4.0.0",
"nprogress": "0.2.0",
"path": "^0.12.7",
"print-js": "^1.6.0",
"qrcodejs2": "0.0.2",
"sortablejs": "1.15.0",
"three": "^0.155.0",
"tinymce": "6.3.2",
"vue": "3.2.47",
"vue-i18n": "9.2.2",

View File

@ -102,7 +102,6 @@
import config from "@/config"
import * as XLSX2 from "xlsx";
import * as XLSX from "xlsx-style";
import { fill } from "lodash";
export default {
name: "clock_record",
components: {},

View File

@ -1,4 +1,47 @@
<template>
<el-header>
<div class="left-panel">
<el-select
v-model="query.workflow"
placeholder="审批流"
@change="handleQuery"
clearable
style="margin-left: 2px"
>
<el-option
v-for="item in wfOptions"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
<el-select
v-model="query.script_run_last_result"
placeholder="任务执行状态"
@change="handleQuery"
clearable
style="margin-left: 2px"
>
<el-option
v-for="item in rsOptions"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
<el-date-picker
v-model="timeRange"
type="datetimerange"
range-separator="至"
start-placeholder="创建时间始"
end-placeholder="创建时间止"
style="margin-left: 2px"
value-format="YYYY-MM-DD HH:mm:ss"
@change="handleQuery"
clearable
/>
</div>
</el-header>
<el-container>
<el-main class="nopadding">
<scTable
@ -143,10 +186,34 @@ export default {
floeLogs: [],
ticketId: "",
limitedFlowLogs: false,
wfOptions: [],
rsOptions: [
{ value: true, label: "成功" },
{ value: false, label: "失败" },
],
query: {},
timeRange: [],
};
},
mounted() {},
mounted() {
this.getWfOptions();
},
methods: {
getWfOptions() {
this.$API.wf.workflow.list.req({ page: 0 }).then((res) => {
this.wfOptions = res;
});
},
handleQuery() {
if (this.timeRange) {
this.query.start_create = this.timeRange[0];
this.query.end_create = this.timeRange[1];
} else {
this.query.end_create = null;
this.query.start_create = null;
}
this.$refs.table.queryData(this.query);
},
//
handleDetail(row) {
let cateType = row.workflow_.key;

242
src/views/wf/myticket.vue Normal file
View File

@ -0,0 +1,242 @@
<template>
<el-container>
<el-header>
<div class="left-panel">
<el-segmented
v-model="tvalue"
:options="Object.keys(toptions)"
size="default"
@change="params.category = toptions[tvalue]; handleQuery()"
></el-segmented>
<el-select
v-model="query.workflow"
placeholder="审批流"
@change="handleQuery"
clearable
style="margin-left: 2px"
>
<el-option
v-for="item in wfOptions"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
<el-select
v-model="query.script_run_last_result"
placeholder="执行状态"
@change="handleQuery"
clearable
style="margin-left: 2px; width:100px"
>
<el-option
v-for="item in rsOptions"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
<el-date-picker
v-model="timeRange"
type="datetimerange"
range-separator="至"
start-placeholder="创建时间始"
end-placeholder="创建时间止"
style="margin-left: 2px"
value-format="YYYY-MM-DD HH:mm:ss"
@change="handleQuery"
clearable
/>
</div>
</el-header>
<el-main class="nopadding">
<scTable
ref="table"
:apiObj="apiObj"
:params="params"
row-key="id"
stripe
highlightCurrentRow
>
<el-table-column
label="流水号"
prop="sn"
width="180"
>
<template #default="scope">
<el-link
@click="handleShow(scope.row)" type="primary"
>{{ scope.row.sn }}</el-link>
</template>
</el-table-column>
<el-table-column
label="工单标题"
prop="title"
width="180"
:show-overflow-tooltip="true"
></el-table-column>
<el-table-column label="工作流" prop="title">
<template #default="scope">
{{ scope.row.workflow_.name }}
</template>
</el-table-column>
<el-table-column label="所在节点">
<template #default="scope">
{{ scope.row.state_.name }}
</template>
</el-table-column>
<el-table-column label="进行状态" prop="sort">
<template #default="scope">
<el-tag
:type="
scope.row.act_state === 0
? ''
: scope.row.act_state === 1
? ''
: scope.row.act_state === 2
? 'danger'
: scope.row.act_state === 3
? 'danger'
: scope.row.act_state === 5
? 'danger'
: scope.row.act_state === 4
? 'success'
: ''
"
>{{ act_states[scope.row.act_state] }}</el-tag
>
</template>
</el-table-column>
<el-table-column label="可处理人" :show-overflow-tooltip="true">
<template #default="scope">
<span
v-if="
scope.row.participant_type == 2 ||
scope.row.participant_type == 1
"
>
<span
v-for="item in scope.row.participant_"
:key="item.id"
>{{ item.name }}/</span
>
</span>
<span v-else> </span>
</template>
</el-table-column>
<el-table-column
label="创建时间"
prop="create_time"
width="150"
></el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="80">
<template #default="scope">
<el-button
type="danger"
link
size="small"
@click="reStart(scope.row)"
v-if="scope.row.script_run_last_result == false"
>重试</el-button
>
</template>
</el-table-column>
</scTable>
</el-main>
<el-drawer title="工单详情" v-model="drawer" size="80%" destroy-on-close>
<component :is="currentComponent" :ticketId="ticketId"></component>
</el-drawer>
</el-container>
</template>
<script>
import { defineAsyncComponent } from 'vue'; //
export default {
name: "myticket",
data() {
return {
drawer: false,
tvalue: "待办",
toptions: {
"待办": "duty",
"我的": "owner",
"已处理": "worked",
"抄送我": "cc"
},
query: {},
timeRange: [],
list: [],
apiObj: null,
params: { category: "duty" },
act_states: {
0: "草稿中",
1: "进行中",
2: "被退回",
3: "被撤回",
4: "已完成",
5: "已关闭",
},
participant_: {
0: "无处理人",
1: "单人",
2: "多人",
},
rsOptions: [
{ value: true, label: "成功" },
{ value: false, label: "失败" },
],
wfOptions: [],
currentComponent: null,
ticketId: null,
};
},
mounted() {
let category = this.$route.query.category
if (category) {
this.tvalue = category == "duty" ? "待办" : category == "owner" ? "我的" : category == "worked" ? "已处理" : category == "cc" ? "抄送我" : "待办"
this.params.category = category
this.apiObj = this.$API.wf.ticket.list
} else {
this.tvalue = "待办"
this.params.category = "duty"
this.apiObj = this.$API.wf.ticket.list
}
this.getWfOptions();
},
methods: {
getWfOptions() {
this.$API.wf.workflow.list.req({ page: 0 }).then((res) => {
this.wfOptions = res;
});
},
reStart(row) {
this.$API.wf.ticket.retryScript.req(row.id).then((res) => {
this.$message.success("任务执行下发成功");
// this.$refs.table.refresh();
});
},
handleQuery() {
if (this.timeRange) {
this.query.start_create = this.timeRange[0];
this.query.end_create = this.timeRange[1];
} else {
this.query.end_create = null;
this.query.start_create = null;
}
this.$refs.table.queryData(this.query);
},
handleShow(row) {
this.drawer = true;
this.ticketId = row.id;
const viewPath = row.workflow_.view_path;
// import
this.currentComponent = defineAsyncComponent(() =>
import(`@/views${viewPath}.vue`)
)
},
},
};
</script>
<style scoped></style>

View File

@ -1,5 +1,48 @@
<template>
<el-container>
<el-header>
<div class="left-panel">
<el-select
v-model="query.workflow"
placeholder="审批流"
@change="handleQuery"
clearable
style="margin-left: 2px"
>
<el-option
v-for="item in wfOptions"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
<el-select
v-model="query.script_run_last_result"
placeholder="任务执行状态"
@change="handleQuery"
clearable
style="margin-left: 2px"
>
<el-option
v-for="item in rsOptions"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
<el-date-picker
v-model="timeRange"
type="datetimerange"
range-separator="至"
start-placeholder="创建时间始"
end-placeholder="创建时间止"
style="margin-left: 2px"
value-format="YYYY-MM-DD HH:mm:ss"
@change="handleQuery"
clearable
/>
</div>
</el-header>
<el-main class="nopadding">
<scTable
ref="table"
@ -154,10 +197,34 @@ export default {
handleTitle: "撤回工单",
ticketId: null,
limitedRetreat: false,
wfOptions: [],
rsOptions: [
{ value: true, label: "成功" },
{ value: false, label: "失败" },
],
query: {},
timeRange: [],
};
},
mounted() {},
mounted() {
this.getWfOptions();
},
methods: {
getWfOptions() {
this.$API.wf.workflow.list.req({ page: 0 }).then((res) => {
this.wfOptions = res;
});
},
handleQuery() {
if (this.timeRange) {
this.query.start_create = this.timeRange[0];
this.query.end_create = this.timeRange[1];
} else {
this.query.end_create = null;
this.query.start_create = null;
}
this.$refs.table.queryData(this.query);
},
handleShow(row) {
let cateType = row.workflow_.key;
let projectId = null;

7
src/views/wf/ticketd.vue Normal file
View File

@ -0,0 +1,7 @@
<template>
<el-container>
xxx
</el-container>
</template>
<script setup>
</script>

View File

@ -1,5 +1,48 @@
<template>
<el-container>
<el-header>
<div class="left-panel">
<el-select
v-model="query.workflow"
placeholder="审批流"
@change="handleQuery"
clearable
style="margin-left: 2px"
>
<el-option
v-for="item in wfOptions"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
<el-select
v-model="query.script_run_last_result"
placeholder="任务执行状态"
@change="handleQuery"
clearable
style="margin-left: 2px"
>
<el-option
v-for="item in rsOptions"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
<el-date-picker
v-model="timeRange"
type="datetimerange"
range-separator="至"
start-placeholder="创建时间始"
end-placeholder="创建时间止"
style="margin-left: 2px"
value-format="YYYY-MM-DD HH:mm:ss"
@change="handleQuery"
clearable
/>
</div>
</el-header>
<el-main class="nopadding">
<scTable
ref="table"
@ -116,10 +159,34 @@ export default {
1: "个人",
2: "多人",
},
wfOptions: [],
rsOptions: [
{ value: true, label: "成功" },
{ value: false, label: "失败" },
],
query: {},
timeRange: [],
};
},
mounted() {},
mounted() {
this.getWfOptions();
},
methods: {
getWfOptions() {
this.$API.wf.workflow.list.req({ page: 0 }).then((res) => {
this.wfOptions = res;
});
},
handleQuery() {
if (this.timeRange) {
this.query.start_create = this.timeRange[0];
this.query.end_create = this.timeRange[1];
} else {
this.query.end_create = null;
this.query.start_create = null;
}
this.$refs.table.queryData(this.query);
},
handleShow(row) {
let cateType = row.workflow_.key;
let projectId = null;

View File

@ -28,18 +28,28 @@
<el-main class="nopadding">
<scTable ref="table" :apiObj="apiObj" row-key="id">
<el-table-column label="#" type="index"></el-table-column>
<el-table-column label="ID" prop="id" min-width="150"></el-table-column>
<el-table-column label="ID" prop="id" width="160"></el-table-column>
<el-table-column
label="工作流名称"
prop="name"
min-width="200"
width="220"
></el-table-column>
<el-table-column
label="标识"
prop="key"
min-width="100"
width="160"
></el-table-column>
<el-table-column
label="流水前缀"
prop="sn_prefix"
width="80">
</el-table-column>
<el-table-column
label="页面路径"
prop="view_path"
min-width="150">
</el-table-column>
<!-- <el-table-column
label="工单查看权限校验"
prop="view_permission_check"
min-width="120"
@ -48,7 +58,7 @@
<span v-if="scope.row.view_permission_check"></span>
<span v-else></span>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column
label="工作流描述"
prop="description"
@ -57,7 +67,7 @@
<el-table-column
label="创建时间"
prop="create_time"
min-width="150"
width="140"
></el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="250">
<template #default="scope">
@ -149,6 +159,9 @@
:props="{ key: 'id', label: 'field_name' }"
/>
</el-form-item>
<el-form-item label="页面地址">
<el-input v-model="addForm.view_path" clearable></el-input>
</el-form-item>
<el-form-item label="标题模板">
<el-input v-model="addForm.title_template" clearable></el-input>
</el-form-item>