fix: 调整样式

This commit is contained in:
weifashi 2023-05-11 17:21:33 +08:00
parent 6e2df6fcfc
commit 93abe72041
8 changed files with 102 additions and 49 deletions

View File

@ -151,7 +151,7 @@ services:
workflow:
container_name: "dootask-workflow-${APP_ID}"
image: "hitosea2020/go-workflow:1.0.1"
image: "hitosea2020/go-workflow:latest"
environment:
TZ: "Asia/Shanghai"
MYSQL_HOST: "${DB_HOST}"

View File

@ -1186,6 +1186,7 @@ Markdown 格式发送
婚假
丧假
哺乳假
外出
暂无数据
审批中心
待办
@ -1208,6 +1209,11 @@ Markdown 格式发送
发起时间
审批设置
是否发布
已发布
流程名称
自动通过,审批人与发起人为同一人
您当前未加入任何部门,不能发起!
您当前未加入任何部门,不能发起!
请输入流程名称
将会清空流程数据,此操作不可恢复
添加申请
请选择申请类型!

View File

@ -7,7 +7,8 @@
<div class="review-nav">
<h1>{{$L('审批中心')}}</h1>
</div>
<Button v-for="(item,key) in procdefList" :loading="loadIng > 0" :key="key" type="primary" @click="initiate(item)" style="margin-right:10px;">{{$L(item.name)}}</Button>
<Button type="primary" @click="addApply">{{$L("添加申请")}}</Button>
<!-- <Button v-for="(item,key) in procdefList" :loading="loadIng > 0" :key="key" type="primary" @click="initiate(item)" style="margin-right:10px;">{{$L(item.name)}}</Button> -->
</div>
<Tabs :value="tabsValue" @on-click="tabsClick" style="margin: 0 20px;height: 100%;" size="small">
@ -121,7 +122,12 @@
<Option v-for="(item, index) in departmentList" :value="item.id" :key="index">{{ item.name }}</Option>
</Select>
</FormItem>
<FormItem v-if="(addTitle || '').indexOf('班') == -1" prop="type" :label="$L('假期类型')">
<FormItem prop="applyType" :label="$L('申请类型')">
<Select v-model="addData.applyType" :placeholder="$L('请选择申请类型')">
<Option v-for="(item, index) in procdefList" :value="item.name" :key="index">{{ item.name }}</Option>
</Select>
</FormItem>
<FormItem v-if="(addData.applyType || '').indexOf('请假') !== -1" prop="type" :label="$L('假期类型')">
<Select v-model="addData.type" :placeholder="$L('请选择假期类型')">
<Option v-for="(item, index) in selectTypes" :value="item" :key="index">{{ $L(item) }}</Option>
</Select>
@ -229,6 +235,7 @@ export default {
endTimeOpen:false,
addData: {
department_id:0,
applyType: '',
type: '',
startTime: "2023-04-20",
startTimeHour:"09",
@ -240,12 +247,13 @@ export default {
},
addRule: {
department_id:{ type: 'number',required: true, message: this.$L('请选择部门!'), trigger: 'change' },
applyType: { type: 'string',required: true, message: this.$L('请选择申请类型!'), trigger: 'change' },
type: { type: 'string',required: true, message: this.$L('请选择假期类型!'), trigger: 'change' },
startTime: { type: 'string',required: true, message: this.$L('请选择开始时间!'), trigger: 'change' },
endTime:{ type: 'string',required: true, message: this.$L('请选择结束时间!'), trigger: 'change' },
description:{ type: 'string',required: true, message: this.$L('请输入事由!'), trigger: 'change' },
},
selectTypes:["年假","事假","病假","调休","产假","陪产假","婚假","丧假","哺乳假"],
selectTypes:["年假","事假","病假","调休","产假","陪产假","婚假","丧假","哺乳假","外出"],
//
showDateTime:false
@ -286,7 +294,6 @@ export default {
mounted() {
this.tabsValue = "backlog"
this.tabsClick()
this.getProcdef()
this.getBacklogList()
this.addData.department_id = this.userInfo.department[0] || 0;
this.addData.startTime = this.addData.endTime = this.getCurrentDate();
@ -345,20 +352,6 @@ export default {
})
},
//
getProcdef(){
this.$store.dispatch("call", {
url: 'workflow/procdef/all',
method: 'post',
}).then(({data}) => {
this.procdefList = data.rows || [];
}).catch(({msg}) => {
$A.modalError(msg);
}).finally(_ => {
this.loadIng--;
});
},
//
getBacklogList(){
this.$store.dispatch("call", {
@ -471,8 +464,8 @@ export default {
});
},
//
initiate(item){
//
addApply(){
this.$store.dispatch("call", {
url: 'users/basic',
data: {
@ -485,8 +478,18 @@ export default {
$A.modalError("您当前未加入任何部门,不能发起!");
return false;
}
this.addTitle = item.name;
this.addShow = true;
this.$store.dispatch("call", {
url: 'workflow/procdef/all',
method: 'post',
}).then(({data}) => {
this.procdefList = data.rows || [];
this.addTitle = this.$L("添加申请");
this.addShow = true;
}).catch(({msg}) => {
$A.modalError(msg);
}).finally(_ => {
this.loadIng--;
});
}).catch(({msg}) => {
$A.modalError(msg);
}).finally(_ => {
@ -507,7 +510,7 @@ export default {
this.$store.dispatch("call", {
url: 'workflow/process/start',
data: {
proc_name:this.addTitle,
proc_name: obj.applyType,
department_id: obj.department_id,
var: JSON.stringify(obj)
},

View File

@ -1,21 +1,24 @@
<template>
<div class="setting-item submit">
<Row class="approve-row" :gutter="8">
<!-- <Col :xxl="{ span: 6 }" :xl="{ span: 8 }" :lg="{ span: 12 }" :sm="{ span: 24 }" :xs="{ span: 24 }" >
<Col :xxl="{ span: 6 }" :xl="{ span: 8 }" :lg="{ span: 12 }" :sm="{ span: 24 }" :xs="{ span: 24 }" >
<div class="approve-col-box approve-col-add" @click="add">
<Icon type="md-add" />
</div>
</Col> -->
</Col>
<Col v-for="(item, key) in list" :xxl="{ span: 6 }" :xl="{ span: 8 }" :lg="{ span: 12 }" :sm="{ span: 24 }" :xs="{ span: 24 }" >
<div class="approve-col-box approve-col-for" @click="edit(item)">
<p>{{$L('流程名称')}}<span style="font-weight: 500;color: #135de6;">{{$L(item.name)}}</span></p>
<Divider style="margin: 12px 0;"/>
<Divider style="margin: 12px 0;margin-bottom: 9px;"/>
<div class="approve-button-box" @click.stop="edit(item)">
<p>{{$L('是否发布')}} </p>
<p>{{$L('已发布')}}</p>
<p @click.stop="change(item)" style="position: relative;">
<Icon type="md-trash" size="16" class="delcon"/>
</p>
<!-- <p>{{$L('是否发布')}} </p>
<p @click.stop="!item.issue ? edit(item) : ''">
<i-switch v-model="item.issue" @on-change="change(item)" :disabled="true" />
<!-- <Icon type="md-trash" /> -->
</p>
</p> -->
</div>
</div>
</Col>
@ -44,8 +47,8 @@ export default {
iframeSrc:"",
name:"",
list:[
{id:0,name:"请假",issue:false,version:''},
{id:0,name:"加班申请",issue:false,version:''},
// {id:0,name:"",issue:false,version:''},
// {id:0,name:"",issue:false,version:''},
]
}
},
@ -68,6 +71,7 @@ export default {
url: 'workflow/procdef/all',
method: 'post',
}).then(({data}) => {
this.list = data.rows;
data.rows.forEach((h,index) => {
this.list.forEach((o,index) => {
if(o.name == h.name){
@ -102,8 +106,20 @@ export default {
},
//
add(){
this.name = "请假"
this.approvalSettingShow = true;
$A.modalInput({
title: `添加`,
placeholder: `请输入流程名称`,
type:"textarea",
okText: "确定",
onOk: (desc) => {
if (!desc) {
return `请输入流程名称`
}
this.name = desc
this.approvalSettingShow = true;
return false
}
});
},
//
edit(item){
@ -115,8 +131,8 @@ export default {
this.$nextTick(()=>{
item.issue = true;
$A.modalConfirm({
title: '取消发布',
content: '将会清空流程数据,确定要取消发布?',
title: '删除',
content: '将会清空流程数据,此操作不可恢复',
onOk: () => {
this.del(item)
}
@ -135,6 +151,7 @@ export default {
method: 'post',
}).then(({data}) => {
item.issue = false;
this.getList();
$A.messageSuccess('成功');
}).catch(({msg}) => {
$A.modalError(msg);
@ -157,4 +174,12 @@ export default {
border-top-left-radius: 18px;
border-bottom-left-radius: 18px;
}
</style>
.delcon{
position: absolute;
right: 0;
padding: 5px !important;
}
.delcon:hover{
color: #ed4014 !important;
}
</style>

View File

@ -175,6 +175,12 @@ body.dark-mode-reverse {
.content-meeting {
color: #ffffff;
}
.open-review-details{
.cause{
border-bottom: 1px solid #7f7f7f;
border-top: 1px solid #7f7f7f;
}
}
}
.dialog-emoji {
> li {

View File

@ -703,6 +703,7 @@
.open-review-details{
width: 245px;
display: inline-block;
max-width: 100%;
.cause{
border-bottom: 1px solid #e3e3e3;
border-top: 1px solid #e3e3e3;
@ -712,14 +713,25 @@
display: inline-block;
padding: 15px 0;
}
>b{
display: inline-block;
margin-bottom: 5px;
}
>span{
display: inline-block;
margin-bottom: 3px;
}
}
.btn-raw{
display: flex;
text-align: center;
padding: 10px 0 5px 0;
padding: 12px 0 5px 0;
>button.ivu-btn-primary{
margin-right: 12px;
}
>button.ivu-btn-small{
height: 32px;
}
}
}
}

View File

@ -373,6 +373,7 @@
}
.approve-col-for{
padding:16px;
padding-bottom:13px;
display: flex;
flex-direction: column;
> p{

View File

@ -119,14 +119,14 @@
<span>结束时间:{{$data->end_time}}</span>
</div><div class="btn-raw">
@if ($action === 'pass')
<Button type="button" class="ivu-btn ivu-btn-small" style="flex: 1;">已同意</Button>
<Button type="button" class="ivu-btn" style="flex: 1;">已同意</Button>
@elseif ($action === 'refuse')
<Button type="button" class="ivu-btn ivu-btn-small" style="flex: 1;">已拒绝</Button>
<Button type="button" class="ivu-btn" style="flex: 1;">已拒绝</Button>
@elseif ($action === 'withdraw')
<Button type="button" class="ivu-btn ivu-btn-small" style="flex: 1;">已撤销</Button>
<Button type="button" class="ivu-btn" style="flex: 1;">已撤销</Button>
@else
<Button type="button" class="ivu-btn ivu-btn-primary ivu-btn-small" style="flex: 1;">同意</Button>
<Button type="button" class="ivu-btn ivu-btn-error ivu-btn-small" style="flex: 1;">拒绝</Button>
<Button type="button" class="ivu-btn ivu-btn-primary" style="flex: 1;">同意</Button>
<Button type="button" class="ivu-btn ivu-btn-error" style="flex: 1;">拒绝</Button>
@endif
</div></span>
@elseif ($type === 'workflow_notifier')
@ -140,9 +140,9 @@
<span>结束时间:{{$data->end_time}}</span>
</div><div class="btn-raw">
@if ($is_finished == 1)
<Button type="button" class="ivu-btn ivu-btn-small" style="flex: 1;">已同意</Button>
<Button type="button" class="ivu-btn" style="flex: 1;">已同意</Button>
@else
<Button type="button" class="ivu-btn ivu-btn-small" style="flex: 1;">查看详情</Button>
<Button type="button" class="ivu-btn" style="flex: 1;">查看详情</Button>
@endif
</div></span>
@elseif ($type === 'workflow_submitter')
@ -156,11 +156,11 @@
<span>结束时间:{{$data->end_time}}</span>
</div><div class="btn-raw">
@if ($action === 'pass')
<Button type="button" class="ivu-btn ivu-btn-small" style="flex: 1;">已同意</Button>
<Button type="button" class="ivu-btn" style="flex: 1;">已同意</Button>
@elseif ($action === 'refuse')
<Button type="button" class="ivu-btn ivu-btn-small" style="flex: 1;">已拒绝</Button>
<Button type="button" class="ivu-btn" style="flex: 1;">已拒绝</Button>
@elseif ($action === 'withdraw')
<Button type="button" class="ivu-btn ivu-btn-small" style="flex: 1;">已撤销</Button>
<Button type="button" class="ivu-btn" style="flex: 1;">已撤销</Button>
@endif
</div></span>
@else