Merge branch 'ehs' of https://e.coding.net/ctcdevteam/ehs/ehs_web into ehs
This commit is contained in:
commit
01084c4f5b
|
@ -12,6 +12,12 @@ export default {
|
|||
);
|
||||
}
|
||||
},
|
||||
read: {
|
||||
name: "员工详情",
|
||||
req: async function(id){
|
||||
return await http.get( `${config.API_URL}/hrm/employee/info/`);
|
||||
}
|
||||
},
|
||||
item: {
|
||||
name: "获取企业员工",
|
||||
req: async function(id){
|
||||
|
|
|
@ -179,7 +179,12 @@ export default {
|
|||
return await http.get(this.url, params);
|
||||
}
|
||||
},
|
||||
|
||||
read: {
|
||||
name: "用户详情",
|
||||
req: async function(id){
|
||||
return await http.get( `${config.API_URL}/system/user/info/`);
|
||||
}
|
||||
},
|
||||
create: {
|
||||
url: `${config.API_URL}/system/user/`,
|
||||
name: "新增用户",
|
||||
|
@ -196,6 +201,14 @@ export default {
|
|||
);
|
||||
}
|
||||
},
|
||||
put:{
|
||||
|
||||
url: `${config.API_URL}/system/user/password/`,
|
||||
name: "修改密码",
|
||||
req: async function(data){
|
||||
return await http.put(this.url,data);
|
||||
}
|
||||
},
|
||||
delete: {
|
||||
name: "删除用户",
|
||||
req: async function(id){
|
||||
|
|
|
@ -173,7 +173,73 @@ const routes = [
|
|||
"hidden": true
|
||||
},
|
||||
"component": "wf/configuration"
|
||||
}
|
||||
,
|
||||
{
|
||||
"name": "allwork",
|
||||
"path": "/wf/allwork",
|
||||
"meta": {
|
||||
"title": "全部工单",
|
||||
"icon": "el-icon-menu",
|
||||
|
||||
},
|
||||
"component": "wf/allwork"
|
||||
} ,
|
||||
{
|
||||
"name": "ownerwork",
|
||||
"path": "/wf/ownerwork",
|
||||
"meta": {
|
||||
"title": "我创建的",
|
||||
"icon": "el-icon-menu",
|
||||
|
||||
},
|
||||
"component": "wf/ownerwork"
|
||||
}
|
||||
,
|
||||
|
||||
{
|
||||
"name": "duyt",
|
||||
"path": "/wf/dutywork",
|
||||
"meta": {
|
||||
"title": "待办工单",
|
||||
"icon": "el-icon-menu",
|
||||
|
||||
},
|
||||
"component": "wf/dutywork"
|
||||
},
|
||||
{
|
||||
"name": "worked",
|
||||
"path": "/wf/worked",
|
||||
"meta": {
|
||||
"title": "我处理的",
|
||||
"icon": "el-icon-menu",
|
||||
|
||||
},
|
||||
"component": "wf/worked"
|
||||
},
|
||||
{
|
||||
"name": "ccwork",
|
||||
"path": "/wf/ccwork",
|
||||
"meta": {
|
||||
"title": "抄送我的",
|
||||
"icon": "el-icon-menu",
|
||||
|
||||
},
|
||||
"component": "wf/ccwork"
|
||||
},
|
||||
{
|
||||
"name": "workdetail",
|
||||
"path": "/wf/workdetail",
|
||||
"meta": {
|
||||
"title": "工单详情",
|
||||
"icon": "el-icon-menu",
|
||||
"hidden": true
|
||||
},
|
||||
"component": "wf/workdetail"
|
||||
},
|
||||
|
||||
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
@ -4,9 +4,10 @@
|
|||
<el-container>
|
||||
<el-header style="height: auto;display: block;">
|
||||
<div class="user-info-top">
|
||||
<el-avatar :size="70" src="img/avatar.jpg"></el-avatar>
|
||||
<h2>{{ user.userName }}</h2>
|
||||
<p><el-tag effect="dark" round size="large">{{ user.role }}</el-tag></p>
|
||||
<el-avatar :size="100" :src="userData.avatar" class="el-avatar--circle"></el-avatar>
|
||||
|
||||
<h2>{{ userData.username }}</h2>
|
||||
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
|
@ -44,10 +45,7 @@
|
|||
components: {
|
||||
account: defineAsyncComponent(() => import('./user/account')),
|
||||
seting: defineAsyncComponent(() => import('./user/seting')),
|
||||
pushSettings: defineAsyncComponent(() => import('./user/pushSettings')),
|
||||
space: defineAsyncComponent(() => import('./user/space')),
|
||||
logs: defineAsyncComponent(() => import('./user/logs')),
|
||||
upToEnterprise: defineAsyncComponent(() => import('./user/upToEnterprise'))
|
||||
pushSettings: defineAsyncComponent(() => import('./user/pushSettings'))
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -67,41 +65,13 @@
|
|||
},
|
||||
{
|
||||
icon: "el-icon-bell",
|
||||
title: "通知设置",
|
||||
title: "修改密码",
|
||||
component: "pushSettings"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
groupName: "数据管理",
|
||||
list: [
|
||||
{
|
||||
icon: "el-icon-coin",
|
||||
title: "存储空间信息",
|
||||
component: "space"
|
||||
},
|
||||
{
|
||||
icon: "el-icon-clock",
|
||||
title: "操作日志",
|
||||
component: "logs"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
groupName: "账号升级",
|
||||
list: [
|
||||
{
|
||||
icon: "el-icon-office-building",
|
||||
title: "升级为企业账号",
|
||||
component: "upToEnterprise"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
user: {
|
||||
userName: "Sakuya",
|
||||
role: "超级管理员",
|
||||
},
|
||||
userData:{},
|
||||
page: "account"
|
||||
}
|
||||
},
|
||||
|
@ -119,10 +89,29 @@
|
|||
}
|
||||
})
|
||||
},
|
||||
mounted() {
|
||||
this.getUserlogin();
|
||||
},
|
||||
methods: {
|
||||
openPage(item){
|
||||
this.page = item.index
|
||||
},
|
||||
|
||||
getUserlogin(){
|
||||
|
||||
this.$API.system.user.read.req({page:0}).then(res=>{
|
||||
this.userData = res;
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-avatar--circle{
|
||||
border-radius: 1% !important;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,46 +1,60 @@
|
|||
<template>
|
||||
<el-alert title="异步组件动态加载使用了正处于试验阶段的<Suspense>组件, 其API和使用方式可能会改变. <Suspense> is an experimental feature and its API will likely change." type="warning" show-icon style="margin-bottom: 15px;"/>
|
||||
<el-card shadow="never" header="账户信息">
|
||||
<el-form
|
||||
ref="form"
|
||||
:model="form"
|
||||
label-width="120px"
|
||||
style="margin-top: 20px"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :md="6" :sm="24">
|
||||
<el-avatar :size="100" :src="form.avatar" class="el-avatar--circle"></el-avatar>
|
||||
</el-col>
|
||||
<el-col :md="18" :sm="24">
|
||||
<el-form-item label="账号">
|
||||
<el-input v-model="form.username" disabled></el-input>
|
||||
<div class="el-form-item-msg">账号信息用于登录,系统不允许修改</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="姓名">
|
||||
<el-input v-model="form.name" disabled></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-card shadow="never" header="个人信息">
|
||||
<el-form ref="form" :model="form" label-width="120px" style="margin-top:20px;">
|
||||
<el-form-item label="账号">
|
||||
<el-input v-model="form.user" disabled></el-input>
|
||||
<div class="el-form-item-msg">账号信息用于登录,系统不允许修改</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="姓名">
|
||||
<el-input v-model="form.name"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="性别">
|
||||
<el-select v-model="form.sex" placeholder="请选择">
|
||||
<el-option label="保密" value="0"></el-option>
|
||||
<el-option label="男" value="1"></el-option>
|
||||
<el-option label="女" value="2"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="个性签名">
|
||||
<el-input v-model="form.about" type="textarea"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary">保存</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-form-item label="岗位">
|
||||
<el-input v-model="form.posts" disabled></el-input>
|
||||
</el-form-item></el-col>
|
||||
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
user: "administrator@scuiadmin.com",
|
||||
name: "Sakuya",
|
||||
sex: "0",
|
||||
about: "正所谓富贵险中求"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
form: {},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getUserlogin();
|
||||
},
|
||||
methods: {
|
||||
openPage(item) {
|
||||
this.page = item.index;
|
||||
},
|
||||
|
||||
getUserlogin() {
|
||||
this.$API.system.user.read.req({ page: 0 }).then((res) => {
|
||||
this.form = res;
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
<style scoped>
|
||||
.el-avatar--circle{
|
||||
border-radius: 1% !important;
|
||||
margin-left:50%;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,29 +1,87 @@
|
|||
<template>
|
||||
<el-card shadow="never" header="事务待办">
|
||||
<el-form ref="form" label-width="180px" label-position="left" style="margin-top:20px;">
|
||||
<el-form-item label="有新的待办">
|
||||
<el-checkbox v-model="form.new">短信推送</el-checkbox>
|
||||
<el-checkbox v-model="form.new_wx">微信推送</el-checkbox>
|
||||
</el-form-item>
|
||||
<el-form-item label="待办有效时剩24小时">
|
||||
<el-checkbox v-model="form.timeout">短信推送</el-checkbox>
|
||||
<el-checkbox v-model="form.timeout_wx">微信推送</el-checkbox>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card shadow="never" header="修改密码">
|
||||
<el-form
|
||||
ref="elForm" :model="formData" :rules="rules"
|
||||
label-width="100px"
|
||||
|
||||
label-position="left"
|
||||
style="margin-top: 20px"
|
||||
>
|
||||
<el-form-item label="旧密码" prop="old_password">
|
||||
<el-input v-model="formData.old_password" placeholder="请输入旧密码" clearable show-password
|
||||
:style="{width: '100%'}"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="新密码" prop="new_password1">
|
||||
<el-input v-model="formData.new_password1" placeholder="请输入新密码" clearable show-password
|
||||
:style="{width: '100%'}"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="确认新密码" prop="new_password2">
|
||||
<el-input v-model="formData.new_password2" placeholder="请再次输入新密码" clearable show-password
|
||||
:style="{width: '100%'}"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item size="large">
|
||||
<el-button type="primary" @click="submitForm">提交</el-button>
|
||||
<el-button @click="resetForm">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
new: true,
|
||||
timeout: true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
formData: {
|
||||
old_password: undefined,
|
||||
new_password1: undefined,
|
||||
new_password2: undefined,
|
||||
},
|
||||
rules: {
|
||||
old_password: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入旧密码",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
new_password1: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入新密码",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
new_password2: [
|
||||
{
|
||||
required: true,
|
||||
message: "请再次输入新密码",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
submitForm() {
|
||||
this.$refs['elForm'].validate(valid => {
|
||||
if (!valid) return
|
||||
// TODO 提交表单
|
||||
|
||||
this.$API.system.user.put.req(this.formData).then(async(res)=>{
|
||||
this.$message({
|
||||
message: '密码修改成功,请重新登陆',
|
||||
type: 'success'
|
||||
})
|
||||
await this.$store.dispatch('user/logout')
|
||||
this.$router.push(`/login`)
|
||||
})
|
||||
})
|
||||
},
|
||||
resetForm() {
|
||||
this.$refs['elForm'].resetFields()
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
|
|
@ -1,64 +1,130 @@
|
|||
<template>
|
||||
<el-card shadow="never" header="语言主题">
|
||||
<el-form ref="form" label-width="120px" style="margin-top:20px;">
|
||||
<el-form-item :label="$t('user.nightmode')">
|
||||
<el-switch v-model="config.dark" inline-prompt active-icon="el-icon-moon" inactive-icon="el-icon-sunny"></el-switch>
|
||||
<div class="el-form-item-msg">{{ $t('user.nightmode_msg') }}</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="主题颜色">
|
||||
<el-color-picker v-model="config.colorPrimary" :predefine="colorList">></el-color-picker>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('user.language')">
|
||||
<el-select v-model="config.lang">
|
||||
<el-option label="简体中文" value="zh-cn"></el-option>
|
||||
<el-option label="English" value="en"></el-option>
|
||||
</el-select>
|
||||
<div class="el-form-item-msg">{{ $t('user.language_msg') }}</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card shadow="never" header="个人信息">
|
||||
<el-form
|
||||
ref="form"
|
||||
:model="form"
|
||||
label-width="120px"
|
||||
style="margin-top: 20px"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="姓名">
|
||||
<el-input v-model="form.name"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="编号">
|
||||
<el-input v-model="form.number"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="学历">
|
||||
<el-input v-model="form.qualification"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="性别">
|
||||
<el-input v-model="form.gender"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="生日">
|
||||
<el-input v-model="form.birthday"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="电话">
|
||||
<el-input v-model="form.phone"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="邮箱">
|
||||
<el-input v-model="form.birthday"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="部门">
|
||||
<el-input v-model="form.belong_dept_name"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="身份证号">
|
||||
<el-input v-model="form.id_number" ></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="岗位名称">
|
||||
<el-input v-model="form.post_name"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="是否在岗">
|
||||
<el-switch v-model="form.is_atwork"></el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="是否在职">
|
||||
<el-switch v-model="form.job_state"></el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
|
||||
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="最后打卡时间">
|
||||
<el-input v-model="form.last_check_time"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="当前未打卡说明">
|
||||
<el-input v-model="form.not_work_remark"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="证件照">
|
||||
<sc-upload
|
||||
v-model="form.photo"
|
||||
:modelValue="form.photo"
|
||||
title="证件照"
|
||||
></sc-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="签名照">
|
||||
<sc-upload v-model="form.signature" title="签名照"></sc-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import colorTool from '@/utils/color'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
form: {},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getemployee();
|
||||
},
|
||||
methods: {
|
||||
openPage(item) {
|
||||
this.page = item.index;
|
||||
},
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
colorList: ['#409EFF', '#009688', '#536dfe', '#ff5c93', '#c62f2f', '#fd726d'],
|
||||
config: {
|
||||
lang: this.$TOOL.data.get('APP_LANG') || this.$CONFIG.LANG,
|
||||
dark: this.$TOOL.data.get('APP_DARK') || false,
|
||||
colorPrimary: this.$TOOL.data.get('APP_COLOR') || this.$CONFIG.COLOR || '#409EFF'
|
||||
}
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
'config.dark'(val){
|
||||
if(val){
|
||||
document.documentElement.classList.add("dark")
|
||||
this.$TOOL.data.set("APP_DARK", val)
|
||||
}else{
|
||||
document.documentElement.classList.remove("dark")
|
||||
this.$TOOL.data.remove("APP_DARK")
|
||||
}
|
||||
},
|
||||
'config.lang'(val){
|
||||
this.$i18n.locale = val
|
||||
this.$TOOL.data.set("APP_LANG", val);
|
||||
},
|
||||
'config.colorPrimary'(val){
|
||||
document.documentElement.style.setProperty('--el-color-primary', val);
|
||||
for (let i = 1; i <= 9; i++) {
|
||||
document.documentElement.style.setProperty(`--el-color-primary-light-${i}`, colorTool.lighten(val,i/10));
|
||||
}
|
||||
for (let i = 1; i <= 9; i++) {
|
||||
document.documentElement.style.setProperty(`--el-color-primary-dark-${i}`, colorTool.darken(val,i/10));
|
||||
}
|
||||
this.$TOOL.data.set("APP_COLOR", val);
|
||||
}
|
||||
},
|
||||
}
|
||||
getemployee() {
|
||||
this.$API.hrm.employee.read.req({ page: 0 }).then((res) => {
|
||||
this.form = res;
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
|
|
@ -122,7 +122,13 @@ export default {
|
|||
form: defaultform,
|
||||
//验证规则
|
||||
rules: {
|
||||
phone: [{ required: true, message: "请输入手机号" }],
|
||||
phone: [
|
||||
{ required: true, message: "请输入手机号" },
|
||||
{
|
||||
pattern: /^[1][3, 4, 5, 6, 7, 8, 9][0-9]{9}$/,
|
||||
message: "请输入正确的手机号码",
|
||||
},
|
||||
],
|
||||
name: [{ required: true, message: "请输入姓名" }],
|
||||
photo: [{ required: true, message: "请上传证件照" }],
|
||||
id_number: [
|
||||
|
|
|
@ -0,0 +1,95 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-main class="nopadding">
|
||||
<scTable
|
||||
ref="table"
|
||||
:data="list"
|
||||
row-key="id"
|
||||
stripe
|
||||
highlightCurrentRow
|
||||
hidePagination
|
||||
>
|
||||
<el-table-column label="ID" prop="id"></el-table-column>
|
||||
<el-table-column label="工单标题" prop="title"></el-table-column>
|
||||
<el-table-column label="流水号" prop="sn"></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">
|
||||
{{ actstate_[scope.row.act_state] }}
|
||||
</template>
|
||||
</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">
|
||||
{{ participant_[scope.row.participant_type] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" prop="create_time"></el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="right" width="120">
|
||||
<template #default="scope">
|
||||
<el-button type="text" size="small" @click="handleShow(scope.row)"
|
||||
>查看详情</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "state",
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
|
||||
actstate_: {
|
||||
0: "草稿中",
|
||||
1: "进行中",
|
||||
2: "被退回",
|
||||
3: "被撤回",
|
||||
4: "已完成",
|
||||
5: "已关闭",
|
||||
},
|
||||
participant_: {
|
||||
0: "无处理人",
|
||||
1: "个人",
|
||||
2: "多人",
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
async getList() {
|
||||
let res = await this.$API.wf.ticket.list.req({
|
||||
category: "all",
|
||||
page: 0,
|
||||
});
|
||||
console.log(res);
|
||||
this.list = res;
|
||||
},
|
||||
handleShow(row) {
|
||||
this.$router.push({
|
||||
name: "workdetail",
|
||||
query: {
|
||||
id: row.id,
|
||||
},
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
|
@ -0,0 +1,81 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-main class="nopadding">
|
||||
<scTable
|
||||
ref="table"
|
||||
:data="list"
|
||||
row-key="id"
|
||||
stripe
|
||||
highlightCurrentRow
|
||||
hidePagination
|
||||
>
|
||||
<el-table-column label="ID" prop="id"></el-table-column>
|
||||
<el-table-column label="工单标题" prop="title"></el-table-column>
|
||||
<el-table-column label="流水号" prop="sn"></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">
|
||||
{{ actstate_[scope.row.act_state] }}
|
||||
</template>
|
||||
</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">
|
||||
{{ participant_[scope.row.participant_type] }}
|
||||
</template>
|
||||
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" prop="create_time"></el-table-column>
|
||||
|
||||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "state",
|
||||
data() {
|
||||
return {
|
||||
list:[],
|
||||
|
||||
actstate_: {
|
||||
0: "草稿中",
|
||||
1: "进行中",
|
||||
2: "被退回",
|
||||
3: "被撤回",
|
||||
4: "已完成",
|
||||
5: "已关闭",
|
||||
},
|
||||
participant_: {
|
||||
0: "无处理人",
|
||||
1: "个人",
|
||||
2: "多人",
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
async getList() {
|
||||
let res = await this.$API.wf.ticket.list.req({ category: "cc",page:0 });
|
||||
console.log(res);
|
||||
this.list = res;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
|
@ -0,0 +1,81 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-main class="nopadding">
|
||||
<scTable
|
||||
ref="table"
|
||||
:data="list"
|
||||
row-key="id"
|
||||
stripe
|
||||
highlightCurrentRow
|
||||
hidePagination
|
||||
>
|
||||
<el-table-column label="ID" prop="id"></el-table-column>
|
||||
<el-table-column label="工单标题" prop="title"></el-table-column>
|
||||
<el-table-column label="流水号" prop="sn"></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">
|
||||
{{ actstate_[scope.row.act_state] }}
|
||||
</template>
|
||||
</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">
|
||||
{{ participant_[scope.row.participant_type] }}
|
||||
</template>
|
||||
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" prop="create_time"></el-table-column>
|
||||
|
||||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "state",
|
||||
data() {
|
||||
return {
|
||||
list:[],
|
||||
|
||||
actstate_: {
|
||||
0: "草稿中",
|
||||
1: "进行中",
|
||||
2: "被退回",
|
||||
3: "被撤回",
|
||||
4: "已完成",
|
||||
5: "已关闭",
|
||||
},
|
||||
participant_: {
|
||||
0: "无处理人",
|
||||
1: "个人",
|
||||
2: "多人",
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
async getList() {
|
||||
let res = await this.$API.wf.ticket.list.req({ category: "duty",page:0 });
|
||||
console.log(res);
|
||||
this.list = res;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
|
@ -0,0 +1,81 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-main class="nopadding">
|
||||
<scTable
|
||||
ref="table"
|
||||
:data="list"
|
||||
row-key="id"
|
||||
stripe
|
||||
highlightCurrentRow
|
||||
hidePagination
|
||||
>
|
||||
<el-table-column label="ID" prop="id"></el-table-column>
|
||||
<el-table-column label="工单标题" prop="title"></el-table-column>
|
||||
<el-table-column label="流水号" prop="sn"></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">
|
||||
{{ actstate_[scope.row.act_state] }}
|
||||
</template>
|
||||
</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">
|
||||
{{ participant_[scope.row.participant_type] }}
|
||||
</template>
|
||||
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" prop="create_time"></el-table-column>
|
||||
|
||||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "state",
|
||||
data() {
|
||||
return {
|
||||
list:[],
|
||||
|
||||
actstate_: {
|
||||
0: "草稿中",
|
||||
1: "进行中",
|
||||
2: "被退回",
|
||||
3: "被撤回",
|
||||
4: "已完成",
|
||||
5: "已关闭",
|
||||
},
|
||||
participant_: {
|
||||
0: "无处理人",
|
||||
1: "个人",
|
||||
2: "多人",
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
async getList() {
|
||||
let res = await this.$API.wf.ticket.list.req({ category: "owner",page:0 });
|
||||
console.log(res);
|
||||
this.list = res;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
|
@ -0,0 +1,172 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-main class="nopadding">
|
||||
<el-card style="margin-bottom: 10px">
|
||||
<el-steps
|
||||
:active="actives"
|
||||
spac="400px"
|
||||
align-center=""
|
||||
style="padding-top: 20px"
|
||||
>
|
||||
<el-step
|
||||
:title="item.name"
|
||||
v-for="item in flowSteps"
|
||||
:key="item.id"
|
||||
></el-step>
|
||||
</el-steps>
|
||||
</el-card>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-card style="margin-left: 10px">
|
||||
<p style="text-align: center;font-size: 20px">{{ticketDetail.title}}</p>
|
||||
<el-col :span="12">
|
||||
<div class="items">
|
||||
<span class="itemLabel">工作流:</span>
|
||||
<span>{{ticketDetail.workflow_.name}}</span>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<div class="items">
|
||||
<span class="itemLabel">流水号:</span>
|
||||
<span>{{ticketDetail.sn}}</span>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<div class="items">
|
||||
<span class="itemLabel">创建时间:</span>
|
||||
<span>{{ticketDetail.create_time}}</span>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col v-for="item in ticketDetail.ticket_data_" :key="item.id" :span="12">
|
||||
<div class="items">
|
||||
<span class="itemLabel">{{item.field_name}}:</span>
|
||||
<span>{{item.field_display}}</span>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-card>
|
||||
<el-card style="margin-left: 10px">
|
||||
<el-table
|
||||
:data="logs"
|
||||
fit
|
||||
stripe
|
||||
style="width: 100%; border-top: 1px solid #ebeef5"
|
||||
height="500"
|
||||
highlight-current-row
|
||||
>
|
||||
<el-table-column label="工单标题" min-width="100">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.ticket_data.title">{{ scope.row.ticket_data.title }}中</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="进行状态" min-width="100">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.state_.type == 0"
|
||||
>{{ scope.row.state_.name }}中</span
|
||||
>
|
||||
<span v-else>已{{ scope.row.state_.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作人" min-width="100">
|
||||
<template #default="scope" ><el-span v-if="scope.row.participant_">{{
|
||||
scope.row.participant_.name
|
||||
}}</el-span></template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作意见"
|
||||
min-width="100"
|
||||
prop="suggestion"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="更新时间"
|
||||
min-width="100"
|
||||
prop="update_time"
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "workdetail",
|
||||
data() {
|
||||
return {
|
||||
actives: 4,
|
||||
flowSteps: [],
|
||||
workId: "",
|
||||
ticketDetail: [],
|
||||
logs: [],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.workId = this.$route.query.id;
|
||||
this.getFlowSteps();
|
||||
},
|
||||
methods: {
|
||||
async getFlowSteps() {
|
||||
let res = await this.$API.wf.ticket.ticketFlowSteps.req(this.workId);
|
||||
console.log(res);
|
||||
this.flowSteps = res;
|
||||
this.$API.wf.ticket.ticketItem.req(this.workId).then((res) => {
|
||||
|
||||
|
||||
this.ticketDetail = res
|
||||
for (let i = 0; i < this.ticketDetail.ticket_data_.length; i++) {
|
||||
if (this.ticketDetail.ticket_data_[i].label === "sys_user") {
|
||||
this.ticketDetail.ticket_data_[i].field_choice = that.staffs;
|
||||
}
|
||||
if (this.ticketDetail.ticket_data_[i].label === "deptSelect") {
|
||||
this.ticketDetail.ticket_data_[i].field_choice = that.orgList;
|
||||
}
|
||||
}
|
||||
// console.log(that.ticketDetail.state_.enable_retreat);
|
||||
let state = res.state;
|
||||
let dat = this.flowSteps.filter((item) => {
|
||||
return item.id == state;
|
||||
})
|
||||
// debugger;
|
||||
let state_fields = dat[0].state_fields;
|
||||
if (state_fields !== {}) {
|
||||
for (let labe in state_fields) {
|
||||
for (let j = 0; j < this.ticketDetail.ticket_data_.length; j++) {
|
||||
if (this.ticketDetail.ticket_data_[j].field_key === labe) {
|
||||
// debugger;
|
||||
// console.log(labe)
|
||||
// console.log(state_fields[labe])
|
||||
if (state_fields[labe] !== 4) {
|
||||
this.ticketDetail.ticket_data_[j].is_hidden = false
|
||||
} else {
|
||||
this.ticketDetail.ticket_data_[j].is_hidden = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
that.sort = dat[0].sort;
|
||||
that.actives = that.flowSteps.indexOf(dat[0]);
|
||||
if (that.flowSteps.length - that.actives > 1) {
|
||||
} else {
|
||||
that.actives = that.flowSteps.length;
|
||||
}
|
||||
|
||||
});
|
||||
this.$API.wf.ticket.ticketFlowlogs.req(this.workId).then(res => {
|
||||
|
||||
this.logs = res
|
||||
|
||||
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
|
@ -0,0 +1,81 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-main class="nopadding">
|
||||
<scTable
|
||||
ref="table"
|
||||
:data="list"
|
||||
row-key="id"
|
||||
stripe
|
||||
highlightCurrentRow
|
||||
hidePagination
|
||||
>
|
||||
<el-table-column label="ID" prop="id"></el-table-column>
|
||||
<el-table-column label="工单标题" prop="title"></el-table-column>
|
||||
<el-table-column label="流水号" prop="sn"></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">
|
||||
{{ actstate_[scope.row.act_state] }}
|
||||
</template>
|
||||
</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">
|
||||
{{ participant_[scope.row.participant_type] }}
|
||||
</template>
|
||||
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" prop="create_time"></el-table-column>
|
||||
|
||||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "state",
|
||||
data() {
|
||||
return {
|
||||
list:[],
|
||||
|
||||
actstate_: {
|
||||
0: "草稿中",
|
||||
1: "进行中",
|
||||
2: "被退回",
|
||||
3: "被撤回",
|
||||
4: "已完成",
|
||||
5: "已关闭",
|
||||
},
|
||||
participant_: {
|
||||
0: "无处理人",
|
||||
1: "个人",
|
||||
2: "多人",
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
async getList() {
|
||||
let res = await this.$API.wf.ticket.list.req({ category: "worked",page:0 });
|
||||
console.log(res);
|
||||
this.list = res;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
|
@ -15,7 +15,7 @@
|
|||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<scTable ref="table" :apiObj="apiObj" row-key="id">
|
||||
<el-table-column label="ID" prop="id" min-width="100"></el-table-column>
|
||||
<el-table-column label="ID" prop="id" min-width="120"></el-table-column>
|
||||
<el-table-column label="工作流名称" prop="name" min-width="250"></el-table-column>
|
||||
<el-table-column label="工单查看权限校验" prop="view_permission_check" min-width="150">
|
||||
<template #default="scope">
|
||||
|
|
Loading…
Reference in New Issue