Commit 1b2f333b authored by 黄奎's avatar 黄奎
parents 45409cae a39225a9
import request from '../../utils/request'
/**
* 获取审批列表
*/
export function getTemplateList(data) {
return request({
url: '/WorkFlowManagement/GetTemplateList',
method: 'post',
data
});
}
<template>
<div>
<div class="query-box appProval">
<ul>
<li><span><em>所属公司</em>
<el-select :disabled="IsParentCompany!=1" v-model="QueryMsg.BranchId" @change="getList()" >
<el-option
v-for="item in companyList"
:label='item.BName'
:value='item.Id'
:key='item.Id'>
</el-option>
</el-select>
</span></li>
<li>
<!-- <input type="button" class="hollowFixedBtn" value="查询" @click="getList()"/> -->
</li>
</ul>
</div>
<div class="flexOne">
<div class="approval_title">出勤休假(4)</div>
<div class="approval_list" v-loading='loading'>
<div class="approval_item" v-for="(item,index) in dataList">
<img :src="item.Icon" width="86" style="float: left;margin: 17px 20px 0 0;" />
<div class="approval_desDiv">
<p class="tit">{{item.Name}}</p>
<p class="des" v-html="item.describe"></p>
<p class="tim">{{item.UpdateTime}}</p>
</div>
<div class="approval_fwDiv">
<p>可见范围</p>
<p class="updateP">全部可见</p>
</div>
<div class="approval_doDiv">
<p>
<button v-if='item.Status==1' class="normalBtn" @click="goUrl('ApprovalProcess',item.Id)">审批流程</button> &nbsp;&nbsp;
<button v-if='item.Status==1' @click="updateTempStatus(item.Id,item.TemplateType,item.Status)" class="hollowFixedBtn">{{$t('fnc.tingyong')}}</button>
<button v-if='item.Status==2' @click="updateTempStatus(item.Id,item.TemplateType,item.Status)" class="hollowFixedBtn">{{$t('fnc.qiyong')}}</button>
</p>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import {
getTemplateList
} from '../../api/administration/administration';
import {
getSchoolDropdown //校区下拉
} from '../../api/school/index'
export default {
data() {
return {
loading:true,
//请求数据
QueryMsg: {
BranchId: '-1'
},
//返回数据
dataList: [],
companyList: [],
IsParentCompany:2
}
},
methods: {
getList() {
let describe = ['适用于请假申请,<br/>精确扣减出勤时间,并同步考勤报表', '适用于出差申请,<br/>精确汇总至考勤报表', '适用于外出申请,<br/>精确汇总至考勤报表', '当员工考勤出现缺卡时,可发起补卡审批,<br/>审批通过后考勤报表中的缺卡记录改为正常']
// this.apipost('WorkFlow_get_GetTemplateList', {BranchId:this.QueryMsg.BranchId}, res => {
// if(res.data.resultCode == 1) {
// this.loading=false;
// this.dataList = res.data.data[0].List;
// this.dataList.forEach((item, index) => {
// item.describe = describe[index]
// })
//
// }
// }, err => {})
getTemplateList({BranchId:this.QueryMsg.BranchId}).then(res => {
if(res.Code == 1) {
this.dataList = res.Data[0].List;
this.dataList.forEach((item, index) => {
item.describe = describe[index]
})
}
}).catch(() => {
})
},
getCompanyList() {
getSchoolDropdown({}).then(res => {
console.log(res)
if(res.Code == 1) {
res.Data.forEach(x => {
var obj = {
Id: '',
BName: ''
}
obj.Id = x.SId.toString();
obj.BName = x.SName;
this.companyList.push(obj);
})
}
}).catch(() => {
})
},
updateTempStatus(id, type, status) {
if(status == 1) {
this.$confirm('是否停用?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.apipost('WorkFlow_post_SetTemplate', {
Id: id,
TemplateType: type,
Status: 2,
BranchId:this.QueryMsg.BranchId
}, res => {
if(res.data.resultCode == 1) {
this.$message.success("已经停用")
this.getList()
} else {
this.$message.error("操作失败")
}
}, err => {})
}).catch(() => {
this.$message.info('已取消停用')
});
}
if(status == 2) {
this.$confirm('是否启用?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.apipost('WorkFlow_post_SetTemplate', {
Id: id,
TemplateType: type,
Status: 1,
BranchId:this.QueryMsg.BranchId
}, res => {
if(res.data.resultCode == 1) {
this.$message.success("启用成功")
this.getList()
} else {
this.$message.error("操作失败")
}
}, err => {})
}).catch(() => {
this.$message.info('已取消启用')
});
}
},
goUrl (path,id) {
this.$router.push({ name: path,query:{"id":id,"Bid":this.QueryMsg.BranchId} })
}
},
mounted() {
let userInfo = this.getLocalStorage();
this.QueryMsg.BranchId=userInfo.School_Id.toString();
let RefBranchId=this.$route.query.Bid;
if(RefBranchId!=null){
this.QueryMsg.BranchId=RefBranchId.toString();
}
this.getCompanyList();
this.getList()
}
}
</script>
<style>
@import "../financial/css/cssReset.css";
.approval_title {
height: 14px;
line-height: 14px;
padding-left: 15px;
border-left: 3px solid #E95252;
margin: 30px 0;
}
.appProval .el-input__inner{
height: 34px!important;
}
.approval_desDiv {
float: left;
width: 450px;
height: 120px;
padding: 15px 0;
border-right: 1px dotted #DCDFE6;
}
.approval_item {
height: 160px;
padding: 20px;
background: #fff;
overflow: auto;
border-radius: 8px;
margin-bottom: 10px;
}
.approval_item p.tit {
font-size: 18px;
color: #333;
}
.approval_item p.des {
font-size: 14px;
color: #666;
line-height: 22px;
}
.approval_item p.tim {
font-size: 14px;
color: #999;
line-height: 22px;
}
.approval_fwDiv {
float: left;
width: 520px;
height: 120px;
padding: 50px 0;
border-right: 1px dotted #DCDFE6;
}
.approval_fwDiv>p {
text-align: center;
font-size: 16px;
color: #333;
}
.approval_fwDiv>p.updateP {
font-size: 14px;
color: #666;
line-height: 24px;
}
.approval_doDiv {
float: left;
width: 500px;
}
.approval_doDiv>p {
text-align: center;
line-height: 120px;
}
</style>
......@@ -45,13 +45,20 @@
<template v-slot:body-cell-NoticeStateName="props">
<q-td :props="props">
<div class="row" style="line-height: 30px">
<img v-if="props.row.NoticeState==2" src="../../assets/images/dcaogao.png" class="NoticeStateNimg" />
<img v-if="props.row.NoticeState==2" src="../../assets/images/dcaogao.png" class="NoticeStateNimg" />
<img v-if="props.row.NoticeState==3" src="../../assets/images/dchehui.png" class="NoticeStateNimg"/>
<img v-if="props.row.NoticeState==1" src="../../assets/images/dfabu.png" class="NoticeStateNimg"/>
<span :style="{color:props.row.NoticeState==1?'#02C499':(props.row.NoticeState==2?'#2961FE':'#F72E52')}">{{props.row.NoticeStateName}}</span>
</div>
</q-td>
</template>
<template v-slot:body-cell-IsTop="props">
<q-td :props="props">
<span v-if="props.row.Is_Top==1"></span>
<span v-if="props.row.Is_Top==2"></span>
</q-td>
</template>
<template v-slot:body-cell-optioned="props">
<q-td :props="props">
<q-btn flat size="xs" icon="iconfont icon-zhiding" style="font-weight:400;color: #789CFF" class="q-mr-xs"
......@@ -140,7 +147,7 @@
</q-item>
</template>
</q-select>
<q-input clearable class="col-6 q-pb-lg q-pr-lg" standout="bg-primary text-white" disable hint="Disable" v-model="nNumber" label="编号" v-if="nNumber!=null "/>
<q-input clearable class="col-6 q-pb-lg q-pr-lg" standout="bg-primary text-white" disable v-model="nNumber" label="编号" v-if="nNumber!=null "/>
<q-input clearable class="col-12 q-pb-lg q-pr-lg" standout="bg-primary text-white" v-model="addMsg.Title" label="标题" :rules="[val => !!val || '标题']"/>
<div class="text-caption q-my-md q-px-xs text-grey-6">公告内容</div>
<ext-editor :defaultMsg="addMsg.Content" classStr="col-12" @getEditValue="getEditValue"></ext-editor>
......@@ -223,7 +230,7 @@
setNoticeOperation,//公告操作
setNoticeInfo,//发布公告
getNoticeInfo,//公告详情
} from '../../api/system/document';
} from '../../api/administration/document';
import {
getDeptTree
} from '../../api/system/dept.js'
......@@ -279,6 +286,11 @@
field: 'ReadNum',
align: 'left'
},
{
name: 'IsTop',
label: '是否置顶',
align: 'left'
},
{
name: 'UpdateByName',
label: '发布人',
......
......@@ -92,11 +92,6 @@ const routes = [{
component: () =>
import("pages/system/msgmanage.vue")
},
{
path: "/system/document", //行政公告
component: () =>
import("pages/system/document.vue")
},
{
path: "/course/catagory", //课程分类
component: () =>
......@@ -316,7 +311,16 @@ const routes = [{
component: () =>
import("pages/financial/financalDocument/BasicDocuments.vue")
},
{
path: "/administration/document", //行政公告
component: () =>
import("pages/administration/document.vue")
},
{
path: "/administration/Approval", //行政审批
component: () =>
import("pages/administration/Approval.vue")
},
{
path: "/test", //API测试
component: () =>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment