|
|
|
@ -9,14 +9,16 @@
|
|
|
|
|
</div>
|
|
|
|
|
<div class="item-content-style clearfix" title="点击查看详情" @click.stop="showBusinessDetail">
|
|
|
|
|
<div class="item-title-style">
|
|
|
|
|
您有一条新的<span style="color: rgba(0,0,0,1);font-weight: bold">{{business.biz_name}}</span>{{getItemTitleAfter()}}
|
|
|
|
|
您有一条新的<span
|
|
|
|
|
style="color: rgba(0,0,0,1);font-weight: bold">{{business.biz_name}}</span>{{getItemTitleAfter()}}
|
|
|
|
|
</div>
|
|
|
|
|
<div v-for="content,index in business.showData" :key="business.id + '-' + index" class="content-style"
|
|
|
|
|
:style="{width:content.one_line === true?'100%':'50%'}">
|
|
|
|
|
<div v-if="content.title && content.title !== ''" class="content-title-style">
|
|
|
|
|
{{content.title}}:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="content-text-style" :style="{width:content.title && content.title !== ''?'calc(100% - 80px)':'100%'}">
|
|
|
|
|
<div class="content-text-style"
|
|
|
|
|
:style="{width:content.title && content.title !== ''?'calc(100% - 80px)':'100%'}">
|
|
|
|
|
{{content.text}}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -34,26 +36,27 @@
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import interConfig from '../modulComponent/interConfig';
|
|
|
|
|
export default {
|
|
|
|
|
name: "BusinessItem",
|
|
|
|
|
props:{
|
|
|
|
|
typeData:{//待办类型数据
|
|
|
|
|
type:Object,
|
|
|
|
|
require:true,
|
|
|
|
|
props: {
|
|
|
|
|
typeData: {//待办类型数据
|
|
|
|
|
type: Object,
|
|
|
|
|
require: true,
|
|
|
|
|
},
|
|
|
|
|
businessData:{//待办条目数据
|
|
|
|
|
type:Object,
|
|
|
|
|
require:true,
|
|
|
|
|
businessData: {//待办条目数据
|
|
|
|
|
type: Object,
|
|
|
|
|
require: true,
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
data:function () {
|
|
|
|
|
return{
|
|
|
|
|
type:this.typeData,
|
|
|
|
|
business:this.businessData
|
|
|
|
|
data: function () {
|
|
|
|
|
return {
|
|
|
|
|
type: this.typeData,
|
|
|
|
|
business: this.businessData
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods:{
|
|
|
|
|
getBtnName:function(){
|
|
|
|
|
methods: {
|
|
|
|
|
getBtnName: function () {
|
|
|
|
|
let str = "";
|
|
|
|
|
switch (this.type.id) {
|
|
|
|
|
case 'approval':
|
|
|
|
@ -72,52 +75,98 @@
|
|
|
|
|
case 'MyCar':
|
|
|
|
|
//0:待领车;1:待还车
|
|
|
|
|
let applyCarStatus = this.businessData.data_infomation.apply_car_status;
|
|
|
|
|
if(applyCarStatus === 0){
|
|
|
|
|
if (applyCarStatus === 0) {
|
|
|
|
|
str = "领车"
|
|
|
|
|
}else if(applyCarStatus === 1){
|
|
|
|
|
} else if (applyCarStatus === 1) {
|
|
|
|
|
str = "还车"
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
return str;
|
|
|
|
|
},
|
|
|
|
|
timeHandle:function (create_time) {
|
|
|
|
|
timeHandle: function (create_time) {
|
|
|
|
|
let str = create_time.split(" ");
|
|
|
|
|
let date = str[0].split("-");
|
|
|
|
|
date = date[1] + "月" + date[2] + "日";
|
|
|
|
|
let time = str[1].substr(0,5);
|
|
|
|
|
let time = str[1].substr(0, 5);
|
|
|
|
|
|
|
|
|
|
return date + " " + time;
|
|
|
|
|
},
|
|
|
|
|
getItemTitleAfter:function () {
|
|
|
|
|
getItemTitleAfter: function () {
|
|
|
|
|
let str = '';
|
|
|
|
|
let typeId = this.type.id;
|
|
|
|
|
if (typeId === 'approval'){
|
|
|
|
|
if (typeId === 'approval') {
|
|
|
|
|
str = '尚未审批';
|
|
|
|
|
}else if(typeId === 'notice' || typeId === 'announcement' || typeId === 'sendToMe'){
|
|
|
|
|
} else if (typeId === 'notice' || typeId === 'announcement' || typeId === 'sendToMe') {
|
|
|
|
|
str = '尚未查阅';
|
|
|
|
|
}else if (typeId === 'document' || typeId === 'affair'){
|
|
|
|
|
} else if (typeId === 'document' || typeId === 'affair') {
|
|
|
|
|
str = '尚未处理';
|
|
|
|
|
}else if(typeId === 'meeting'){
|
|
|
|
|
} else if (typeId === 'meeting') {
|
|
|
|
|
str = '请准时参加';
|
|
|
|
|
}else{
|
|
|
|
|
} else {
|
|
|
|
|
str = '请即时查看';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return str;
|
|
|
|
|
},
|
|
|
|
|
showBusinessDetail:function () {
|
|
|
|
|
this.$emit("clickContent",this.businessData)
|
|
|
|
|
showBusinessDetail: function () {
|
|
|
|
|
this.$emit("clickContent", this.businessData)
|
|
|
|
|
},
|
|
|
|
|
noPass: function () {
|
|
|
|
|
console.log(this.typeData)
|
|
|
|
|
console.log(this.businessData)
|
|
|
|
|
let bizCode = this.businessData.biz_code;
|
|
|
|
|
let param = {};//提交参数
|
|
|
|
|
switch (bizCode) {
|
|
|
|
|
case "105001001"://请假申请
|
|
|
|
|
this.checkLeave(this.businessData.data_infomation);
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
//请假审批
|
|
|
|
|
checkLeave:function (info) {
|
|
|
|
|
this.getInfo(info.run_id).then((result)=>{
|
|
|
|
|
console.log(result)
|
|
|
|
|
let submitParam = {
|
|
|
|
|
check_id: info.check_id,
|
|
|
|
|
status_id: -1,
|
|
|
|
|
person_id: this.BaseConfig.userInfo.person_id_cookie,
|
|
|
|
|
check_opinion: "申请未通过",
|
|
|
|
|
has_next: result.has_next,
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
getInfo:function (runId) {
|
|
|
|
|
var _this = this;
|
|
|
|
|
var p = new Promise((resolve,reject)=>{
|
|
|
|
|
let params = {
|
|
|
|
|
run_id: runId,
|
|
|
|
|
level_check: 1,
|
|
|
|
|
need_next: 1,
|
|
|
|
|
person_id: _this.BaseConfig.userInfo.person_id
|
|
|
|
|
}
|
|
|
|
|
_this.InterfaceConfig.callInterface([{
|
|
|
|
|
url: interConfig.getLeaveApplyDetail.url,
|
|
|
|
|
params: params,
|
|
|
|
|
method: interConfig.getLeaveApplyDetail.method,
|
|
|
|
|
isTestLogin: interConfig.getLeaveApplyDetail.isTestLogin
|
|
|
|
|
}], (result) => {
|
|
|
|
|
let res = result[0].data;
|
|
|
|
|
if (res.code === 2000) {
|
|
|
|
|
resolve(res.data)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
return p;
|
|
|
|
|
},
|
|
|
|
|
noPass:function () {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
watch:{
|
|
|
|
|
typeData:function (newData) {
|
|
|
|
|
watch: {
|
|
|
|
|
typeData: function (newData) {
|
|
|
|
|
this.type = newData;
|
|
|
|
|
},
|
|
|
|
|
businessData:function (newData) {
|
|
|
|
|
businessData: function (newData) {
|
|
|
|
|
this.business = newData;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -125,22 +174,22 @@
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
.business-item-container-style{
|
|
|
|
|
.business-item-container-style {
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
color: #999999;
|
|
|
|
|
width: 100%;
|
|
|
|
|
padding: 20px 10px 0 10px;
|
|
|
|
|
.create-time-style{
|
|
|
|
|
.create-time-style {
|
|
|
|
|
width: 100%;
|
|
|
|
|
text-align: center;
|
|
|
|
|
}
|
|
|
|
|
.system-title-style{
|
|
|
|
|
.system-title-style {
|
|
|
|
|
width: 100%;
|
|
|
|
|
display: flex;
|
|
|
|
|
height: 30px;
|
|
|
|
|
align-content: center;
|
|
|
|
|
align-items: center;
|
|
|
|
|
.icon-container-style{
|
|
|
|
|
.icon-container-style {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
align-content: center;
|
|
|
|
@ -149,46 +198,46 @@
|
|
|
|
|
width: 30px;
|
|
|
|
|
height: 30px;
|
|
|
|
|
border-radius: 15px;
|
|
|
|
|
background:linear-gradient(to bottom right,var(--todoTwoBtn),var(--todoOneBtn));
|
|
|
|
|
background:-moz-linear-gradient(to bottom right,var(--todoTwoBtn),var(--todoOneBtn));
|
|
|
|
|
background:-webkit-linear-gradient(bottom right,var(--todoTwoBtn),var(--todoOneBtn));
|
|
|
|
|
.icon-style{
|
|
|
|
|
background: linear-gradient(to bottom right, var(--todoTwoBtn), var(--todoOneBtn));
|
|
|
|
|
background: -moz-linear-gradient(to bottom right, var(--todoTwoBtn), var(--todoOneBtn));
|
|
|
|
|
background: -webkit-linear-gradient(bottom right, var(--todoTwoBtn), var(--todoOneBtn));
|
|
|
|
|
.icon-style {
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
color: white;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.system-name-style{
|
|
|
|
|
.system-name-style {
|
|
|
|
|
margin-left: 10px;
|
|
|
|
|
color:rgba(0,0,0,0.65);
|
|
|
|
|
color: rgba(0, 0, 0, 0.65);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.item-content-style{
|
|
|
|
|
.item-content-style {
|
|
|
|
|
width: calc(100% - 40px);
|
|
|
|
|
padding: 10px 10px 0 10px;
|
|
|
|
|
background-color: white;
|
|
|
|
|
border:1px solid #e5e5e5;
|
|
|
|
|
border: 1px solid #e5e5e5;
|
|
|
|
|
border-radius: 5px;
|
|
|
|
|
min-height: 3rem;
|
|
|
|
|
margin-left: 40px;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
.item-title-style{
|
|
|
|
|
.item-title-style {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 20px;
|
|
|
|
|
line-height: 20px;
|
|
|
|
|
color: rgba(0,0,0,0.65);
|
|
|
|
|
color: rgba(0, 0, 0, 0.65);
|
|
|
|
|
margin-bottom: 10px;
|
|
|
|
|
}
|
|
|
|
|
.content-style{
|
|
|
|
|
.content-style {
|
|
|
|
|
/*height: 20px;*/
|
|
|
|
|
float: left;
|
|
|
|
|
display: flex;
|
|
|
|
|
.content-title-style{
|
|
|
|
|
.content-title-style {
|
|
|
|
|
width: 80px;
|
|
|
|
|
text-align: right;
|
|
|
|
|
height: 20px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.btn-style{
|
|
|
|
|
.btn-style {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-content: center;
|
|
|
|
|
align-items: center;
|
|
|
|
@ -198,7 +247,7 @@
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 32px;
|
|
|
|
|
border-top: 1px solid #e5e5e5;
|
|
|
|
|
.btn-one-style{
|
|
|
|
|
.btn-one-style {
|
|
|
|
|
color: var(--modTitleOne);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|