工作任务

This commit is contained in:
liuye
2024-08-08 09:43:47 +08:00
parent 6daf7e03bf
commit 5f6131d132
10 changed files with 343 additions and 67 deletions

View File

@@ -3,7 +3,7 @@
<!-- <AiTopFixed>
<u-tabs :list="tabs" height="88" bar-width="136" :current="index" @change="change"></u-tabs>
</AiTopFixed> -->
<u-navbar back-icon-color="#000" title="特殊人群" title-color="#000" title-width="300" title-size="32"
<u-navbar back-icon-color="#000" title="工作任务" title-color="#000" title-width="300" title-size="32"
:title-bold="true" :background="backgroundNavbar" :is-fixed="true" height="44" z-index="999">
</u-navbar>
<div class="header-content-bg">
@@ -38,11 +38,12 @@
<div class="progress">
<div class="active" :style="{width: item.percent + '%'}"></div>
</div>
<img :src="$cdn + tag(item.status)" alt="">
<img :src="'https://cdn.cunwuyun.cn/dvcp/h5/' + tag(item.status)" alt="">
</div>
<AiEmpty v-if="!list.length"></AiEmpty>
</div>
<AiAdd @add="add" />
<!-- <AiAdd @click.stop="add" /> -->
<div class="ai-add" @click="toAdd"></div>
</div>
</template>
@@ -119,7 +120,7 @@
url: "./detail?id=" + item.id + "&taskCode=" + item.taskCode + "&isMine=" + this.index
})
},
add() {
toAdd() {
uni.navigateTo({
url: "./create"
})
@@ -295,5 +296,38 @@
}
}
}
.ai-add {
width: 96px;
height: 96px;
background: #1365DD;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
border-radius: 50%;
display: flex;
align-items: center;
flex-direction: column;
justify-content: center;
position: fixed;
bottom: 240px;
right: 32px;
&:before, &:after {
content: "";
background: #FFFFFF;
display: block;
position: absolute;
border-radius: 4px;
}
&:before {
height: 48px;
width: 4px;
}
&:after {
height: 4px;
width: 48px;
}
}
}
</style>

View File

@@ -8,7 +8,7 @@
<img src="https://cdn.sinoecare.com/i/2024/07/12/6690a1303d423.png" alt="">
</div>
<div class="card-content">
<div class="card flex">
<div class="card flex border-r">
<div class="left">
<em>*</em>任务类型
</div>
@@ -20,7 +20,7 @@
</u-row>
</picker>
</div>
<div class="card">
<div class="card border-r">
<u-row justify="between">
<div class="left">
<em>*</em>任务标题
@@ -30,7 +30,7 @@
<input maxlength="30" v-model.trim="form.taskTitle" placeholder="限30字">
<u-gap height="32"></u-gap>
</div>
<div class="card">
<div class="card border-r">
<u-row justify="between">
<div class="left">
<em>*</em>任务说明
@@ -54,51 +54,53 @@
</picker>
</div>
</div>
<div class="card flex" style="padding: 13px 17px;margin-bottom: 0">
<div class="left" style="line-height: 22px;">
<em>*</em>执行人
<div class="border-r">
<div class="card flex top" style="padding: 13px 17px;margin-bottom: 0">
<div class="left" style="line-height: 22px;">
<em>*</em>执行人
</div>
<div class="right">
<AiPagePicker type="sysUser" :isShowPhone="true" :params="{axiosUrl:'/app/wxcp/wxuser/list?status=1'}"
nodeKey="id" class="select-user" @select="handleUserInfoList">
<app-nucleic-acid-sampling v-if="form.userInfoList.length" class="value">
已选择<em>{{form.userInfoList.slice(0,2).map(e=>e.name).join("、")}}</em>
<em>{{form.userInfoList.length}}</em>
</app-nucleic-acid-sampling>
<span v-else class="color-999">请选择</span>
<div class="arrow"></div>
</AiPagePicker>
</div>
</div>
<div class="right">
<AiPagePicker type="sysUser" :isShowPhone="true" :params="{axiosUrl:'/app/wxcp/wxuser/list?status=1'}"
nodeKey="id" class="select-user" @select="handleUserInfoList">
<app-nucleic-acid-sampling v-if="form.userInfoList.length" class="value">
已选择<em>{{form.userInfoList.slice(0,2).map(e=>e.name).join("、")}}</em>
<em>{{form.userInfoList.length}}</em>
</app-nucleic-acid-sampling>
<span v-else class="color-999">请选择</span>
<div class="arrow"></div>
</AiPagePicker>
<div class="card flex border" style="padding: 13px 17px;margin-bottom: 0">
<div class="left" style="line-height: 22px;">督办人</div>
<div class="right">
<AiPagePicker type="sysUser" :isShowPhone="true" :params="{axiosUrl:'/app/wxcp/wxuser/list?status=1'}"
nodeKey="id" class="select-user" @select="handleCheckUserList">
<app-nucleic-acid-sampling v-if="form.checkUserList.length" class="value">
已选择<em>{{form.checkUserList.slice(0,2).map(e=>e.name).join("、")}}</em>
<em>{{form.checkUserList.length}}</em>
</app-nucleic-acid-sampling>
<span v-else class="color-999">请选择</span>
<div class="arrow"></div>
</AiPagePicker>
</div>
</div>
<div class="card flex bottom" style="padding: 13px 17px">
<div class="left" style="line-height: 22px;">抄送人</div>
<div class="right">
<AiPagePicker type="sysUser" :isShowPhone="true" :params="{axiosUrl:'/app/wxcp/wxuser/list?status=1'}"
nodeKey="id" class="select-user" @select="handleSendUserList">
<app-nucleic-acid-sampling v-if="form.sendUserList.length" class="value">
已选择<em>{{form.sendUserList.slice(0,2).map(e=>e.name).join("、")}}</em>
<em>{{form.sendUserList.length}}</em>
</app-nucleic-acid-sampling>
<span v-else class="color-999">请选择</span>
<div class="arrow"></div>
</AiPagePicker>
</div>
</div>
</div>
<div class="card flex border" style="padding: 13px 17px;margin-bottom: 0">
<div class="left" style="line-height: 22px;">督办人</div>
<div class="right">
<AiPagePicker type="sysUser" :isShowPhone="true" :params="{axiosUrl:'/app/wxcp/wxuser/list?status=1'}"
nodeKey="id" class="select-user" @select="handleCheckUserList">
<app-nucleic-acid-sampling v-if="form.checkUserList.length" class="value">
已选择<em>{{form.checkUserList.slice(0,2).map(e=>e.name).join("、")}}</em>
<em>{{form.checkUserList.length}}</em>
</app-nucleic-acid-sampling>
<span v-else class="color-999">请选择</span>
<div class="arrow"></div>
</AiPagePicker>
</div>
</div>
<div class="card flex" style="padding: 13px 17px">
<div class="left" style="line-height: 22px;">抄送人</div>
<div class="right">
<AiPagePicker type="sysUser" :isShowPhone="true" :params="{axiosUrl:'/app/wxcp/wxuser/list?status=1'}"
nodeKey="id" class="select-user" @select="handleSendUserList">
<app-nucleic-acid-sampling v-if="form.sendUserList.length" class="value">
已选择<em>{{form.sendUserList.slice(0,2).map(e=>e.name).join("、")}}</em>
<em>{{form.sendUserList.length}}</em>
</app-nucleic-acid-sampling>
<span v-else class="color-999">请选择</span>
<div class="arrow"></div>
</AiPagePicker>
</div>
</div>
<div class="card flex flex-card" style="padding: 12px 17px;">
<div class="card flex flex-card border-r" style="padding: 12px 17px;">
<div class="left"> 发送任务通知</div>
<div class="right">
<switch :checked="!!form.isNofity" @change="(e)=>form.isNofity=Number(e.detail.value)"/>
@@ -249,7 +251,6 @@
box-sizing: border-box;
margin: 0 0 16px 32px;
width: calc(100% - 64px);
border-radius: 16px;
.left {
font-size: 32px;
@@ -331,6 +332,18 @@
}
}
.border-r {
border-radius: 16px;
.top {
border-top-left-radius: 16px;
border-top-right-radius: 16px;
}
.bottom {
border-bottom-left-radius: 16px;
border-bottom-right-radius: 16px;
}
}
.flex {
display: flex;
.left {

View File

@@ -1,6 +1,7 @@
<template>
<div class="detail">
<u-navbar back-icon-color="#000" :background="backgroundNavbar" :is-fixed="true" height="44" z-index="999">
<u-navbar title="工作任务" title-color="#000" title-width="300" title-size="32"
:title-bold="true" back-icon-color="#000" :background="backgroundNavbar" :is-fixed="true" height="44" z-index="999">
</u-navbar>
<div class="header-content-bg">
<img src="https://cdn.sinoecare.com/i/2024/07/12/6690a1303d423.png" alt="">
@@ -59,13 +60,13 @@
<div class="card" style="padding-top: 0" v-if="detail.fileList && detail.fileList.length">
<div class="label">相关附件</div>
<div class="file" v-for="(item,index) in detail.fileList" :key="index" @click="preFile(item)">
<u-row justify="between">
<div class="file-flex">
<label class="left">
<img :src="$cdn + 'common/appendix.png'" alt="">
<img src="https://cdn.cunwuyun.cn/dvcp/h5/common/appendix.png" alt="">
<span>{{item.name}}.{{item.postfix}}</span>
</label>
<span>{{(item.size/1024).toFixed(2)}}KB</span>
</u-row>
</div>
</div>
</div>
</template>
@@ -81,7 +82,7 @@
</div>
<div class="card" v-if="detail.processList.length">
<u-collapse>
<u-collapse-item :title="item.createDate && item.createDate.split(' ')[0]" v-for="(item, index) in detail.processList" :key="index">
<u-collapse-item :title="item.createDate && item.createDate.split(' ')[0]" v-for="(item, index) in detail.processList" :key="index">
<template slot="info">
完成到<em>{{item.percent}}%</em>
</template>
@@ -168,7 +169,6 @@
}
},
methods: {
...mapActions(['previewFile', 'injectJWeixin']),
preFile(e) {
if([".jpg",".png",".gif"].includes(e.postfix.toLowerCase())){
uni.previewImage({
@@ -179,6 +179,24 @@
this.previewFile({ ...e})
}
},
previewFile(e) {
if(e.postfix && ['doc', 'xls', 'ppt', 'pdf', 'docx', 'xlsx', 'pptx'].includes(e.postfix.split('.')[1])) {
uni.downloadFile({
url: e.accessUrl,
success: function (res) {
var filePath = res.tempFilePath;
uni.openDocument({
filePath: filePath,
fileType: e.postfix.split('.')[1],
showMenu: true,
});
}
});
}else {
this.$u.toast("该文件类型不支持预览!")
}
},
getDetail() {
this.$instance.post("/app/appworktaskinfo/queryDetailById", null, {
params: {
@@ -404,7 +422,8 @@
padding: 0 16px;
margin-bottom: 32px;
& > .u-row {
.file-flex {
display: flex;
height: 100%;
.left {
@@ -428,12 +447,14 @@
display:-webkit-box;
-webkit-box-orient:vertical;
-webkit-line-clamp:2;
word-break: break-all;
}
}
& > span {
font-size: 28px;
color: #999999;
margin: auto 0;
}
}
}
@@ -532,5 +553,9 @@
text-align: center;
}
}
::v-deep .u-collapse:after {
height: 0!important;
}
}
</style>

View File

@@ -12,7 +12,7 @@
<u-slider v-model="form.percent" min="0" max="100" :use-slot="true">
<div class="wrap">
<div class="value" :style="{right:form.percent<30?'-50px':''}">{{ form.percent }}%</div>
<div class="btn" :style="{background:'url('+$cdn+ 'common/yuan.png)'}"></div>
<div class="btn" :style="{background:'url(https://cdn.cunwuyun.cn/dvcp/h5/common/yuan.png)'}"></div>
</div>
</u-slider>
<u-gap height="70"></u-gap>

View File

@@ -24,7 +24,7 @@
<u-gap height="32"></u-gap>
<u-row>
<div class="label">完成时间</div>
<div class="value">{{detail.finishTime}}</div>
<div class="value">{{detail.finishTime || ''}}</div>
</u-row>
<u-gap height="16"></u-gap>
<u-row>
@@ -85,6 +85,7 @@
}).then(res => {
if (res && res.data) {
this.detail = res.data;
this.detail.name = this.detail.name ? this.detail.name : this.detail.userName
}
})
}