调整工程目录

This commit is contained in:
aixianling
2021-12-15 14:37:20 +08:00
parent 76b0abe1ea
commit dd1aef6fb3
107 changed files with 17044 additions and 16746 deletions

View File

@@ -8,7 +8,7 @@
</div>
<picker @change="change" :value="form.type" range-key="dictName" :range="$dict.getDict('workTaskType')">
<u-row>
<div v-if="form.type!=null" class="value">{{$dict.getDict('workTaskType')[form.type]["dictName"]}}</div>
<div v-if="form.type!=null" class="value">{{ $dict.getDict('workTaskType')[form.type]["dictName"] }}</div>
<div v-else class="placeholder">请选择</div>
<div class="arrow"></div>
</u-row>
@@ -41,7 +41,7 @@
</div>
<picker @change="dateChange" mode="date" :value="form.lastTime" :start="startDate" :end="endDate">
<u-row>
<div v-if="form.lastTime!=null" class="value">{{form.lastTime}}</div>
<div v-if="form.lastTime!=null" class="value">{{ form.lastTime }}</div>
<div v-else class="placeholder">请选择</div>
<div class="arrow" v-if="form.lastTime==null"></div>
<div class="clear" v-else @click.stop="form.lastTime = null"></div>
@@ -56,8 +56,8 @@
</div>
<u-row @click="handleSelectUser(0)" style="justify-content: flex-end">
<div v-if="form.userInfoList.length" class="value">
已选择<em>{{form.userInfoList.slice(0,2).map(e=>e.name).join("、")}}</em>
<em>{{form.userInfoList.length}}</em>
已选择<em>{{ form.userInfoList.slice(0, 2).map(e => e.name).join("、") }}</em>
<em>{{ form.userInfoList.length }}</em>
</div>
<div v-else class="placeholder">请选择</div>
<div class="arrow"></div>
@@ -69,8 +69,8 @@
<div class="left" style="line-height: 22px;">督办人</div>
<u-row @click="handleSelectUser(1)" style="justify-content: flex-end">
<div v-if="form.checkUserList.length" class="value">
已选择<em>{{form.checkUserList.slice(0,2).map(e=>e.name).join("、")}}</em>
<em>{{form.checkUserList.length}}</em>
已选择<em>{{ form.checkUserList.slice(0, 2).map(e => e.name).join("、") }}</em>
<em>{{ form.checkUserList.length }}</em>
</div>
<div v-else class="placeholder">请选择</div>
<div class="arrow"></div>
@@ -82,8 +82,8 @@
<div class="left" style="line-height: 22px;">抄送人</div>
<u-row @click="handleSelectUser(2)" style="justify-content: flex-end">
<div v-if="form.sendUserList.length" class="value">
已选择<em>{{form.sendUserList.slice(0,2).map(e=>e.name).join("、")}}</em>
<em>{{form.sendUserList.length}}</em>
已选择<em>{{ form.sendUserList.slice(0, 2).map(e => e.name).join("、") }}</em>
<em>{{ form.sendUserList.length }}</em>
</div>
<div v-else class="placeholder">请选择</div>
<div class="arrow"></div>
@@ -106,220 +106,220 @@
</template>
<script>
import AiBack from "../../../components/AiBack";
import AiSelectEnterprise from "../../../components/AiSelectEnterprise";
import AiBack from "../../../components/AiBack";
import AiSelectEnterprise from "../../../components/AiSelectEnterprise";
export default {
name: "create",
components: {AiBack, AiSelectEnterprise},
data() {
return {
index: null,
userSelect: false,
selectList: [],
form: {
parentTaskCode: null,
type: null,
taskTitle: "",
taskDescription: "",
lastTime: null,
userInfoList: [],
checkUserList: [],
sendUserList: [],
isNofity: 0
},
currentClick: null,
}
},
onLoad(opt) {
if (opt.taskCode) {
this.form.parentTaskCode = opt.taskCode
}
this.$dict.load("workTaskType")
},
computed: {
startDate() {
return this.getDate('start');
export default {
name: "create",
components: {AiBack, AiSelectEnterprise},
data() {
return {
index: null,
userSelect: false,
selectList: [],
form: {
parentTaskCode: null,
type: null,
taskTitle: "",
taskDescription: "",
lastTime: null,
userInfoList: [],
checkUserList: [],
sendUserList: [],
isNofity: 0
},
endDate() {
return this.getDate('end');
}
currentClick: null,
}
},
onLoad(opt) {
if (opt.taskCode) {
this.form.parentTaskCode = opt.taskCode
}
this.$dict.load("workTaskType")
},
computed: {
startDate() {
return this.getDate('start');
},
methods: {
handleCreate() {
if (this.form.type==null) return this.$u.toast("请选择任务类型")
if (!this.form.taskTitle) return this.$u.toast("请输入任务标题")
if (!this.form.taskDescription) return this.$u.toast("请输入任务说明")
if (this.form.lastTime==null) return this.$u.toast("请选择截止日期")
if (!this.form.userInfoList.length) return this.$u.toast("请选择执行人")
endDate() {
return this.getDate('end');
}
},
methods: {
handleCreate() {
if (this.form.type == null) return this.$u.toast("请选择任务类型")
if (!this.form.taskTitle) return this.$u.toast("请输入任务标题")
if (!this.form.taskDescription) return this.$u.toast("请输入任务说明")
if (this.form.lastTime == null) return this.$u.toast("请选择截止日期")
if (!this.form.userInfoList.length) return this.$u.toast("请选择执行人")
this.$http.post("/app/appworktaskinfo/addOrUpdate", {
...this.form,
lastTime:this.form.lastTime + " 23:59:59"
}).then(res => {
if (res.code == 0) {
this.$u.toast("创建成功")
this.$refs["aiBack"].back()
}
})
},
handleSelectUser(status) {
this.currentClick = status
if (this.currentClick == 0 && this.form.userInfoList.length) {
this.selectList = this.form.userInfoList
} else if (this.currentClick == 1 && this.form.checkUserList.length) {
this.selectList = this.form.checkUserList
} else if (this.currentClick == 2 && this.form.sendUserList.length) {
this.selectList = this.form.sendUserList
this.$http.post("/app/appworktaskinfo/addOrUpdate", {
...this.form,
lastTime: this.form.lastTime + " 23:59:59"
}).then(res => {
if (res.code == 0) {
this.$u.toast("创建成功")
this.$refs["aiBack"].back()
}
this.userSelect = true
},
dateChange(e) {
let date = this.getDate({format: true});
if (new Date(date).getTime() > new Date(e.target.value).getTime()) {
this.form.lastTime = null
return this.$u.toast("截止时间不能小于当前时间")
}
this.form.lastTime = e.target.value
},
getDate(type) {
const date = new Date();
let year = date.getFullYear();
let month = date.getMonth() + 1;
let day = date.getDate();
if (type === 'start') {
year = year - 60;
} else if (type === 'end') {
year = year + 2;
}
month = month > 9 ? month : '0' + month;
day = day > 9 ? day : '0' + day;
return `${year}-${month}-${day}`;
},
change(e) {
this.form.type = e.detail.value
},
userChange(e) {
if (this.currentClick == 0) {
this.form.userInfoList = e
} else if (this.currentClick == 1) {
this.form.checkUserList = e
} else if (this.currentClick == 2) {
this.form.sendUserList = e
}
this.selectList = []
}
})
},
}
handleSelectUser(status) {
this.currentClick = status
if (this.currentClick == 0 && this.form.userInfoList.length) {
this.selectList = this.form.userInfoList
} else if (this.currentClick == 1 && this.form.checkUserList.length) {
this.selectList = this.form.checkUserList
} else if (this.currentClick == 2 && this.form.sendUserList.length) {
this.selectList = this.form.sendUserList
}
this.userSelect = true
},
dateChange(e) {
let date = this.getDate({format: true});
if (new Date(date).getTime() > new Date(e.target.value).getTime()) {
this.form.lastTime = null
return this.$u.toast("截止时间不能小于当前时间")
}
this.form.lastTime = e.target.value
},
getDate(type) {
const date = new Date();
let year = date.getFullYear();
let month = date.getMonth() + 1;
let day = date.getDate();
if (type === 'start') {
year = year - 60;
} else if (type === 'end') {
year = year + 2;
}
month = month > 9 ? month : '0' + month;
day = day > 9 ? day : '0' + day;
return `${year}-${month}-${day}`;
},
change(e) {
this.form.type = e.detail.value
},
userChange(e) {
if (this.currentClick == 0) {
this.form.userInfoList = e
} else if (this.currentClick == 1) {
this.form.checkUserList = e
} else if (this.currentClick == 2) {
this.form.sendUserList = e
}
this.selectList = []
}
},
}
</script>
<style lang="scss" scoped>
.create-sub-task {
min-height: 100%;
background-color: #F5F5F5;
.create-sub-task {
min-height: 100%;
background-color: #F5F5F5;
box-sizing: border-box;
padding: 16px 0 140px 0;
.card {
background-color: #FFFFFF;
box-sizing: border-box;
padding: 16px 0 140px 0;
padding: 32px 34px;
margin-bottom: 16px;
.card {
background-color: #FFFFFF;
box-sizing: border-box;
padding: 32px 34px;
margin-bottom: 16px;
.left {
font-size: 32px;
color: #333333;
font-weight: 400;
line-height: 48px;
.left {
& > em {
font-style: normal;
font-size: 32px;
color: #333333;
font-weight: 400;
line-height: 48px;
& > em {
font-style: normal;
font-size: 32px;
color: #FF4466;
}
color: #FF4466;
}
}
.value {
font-size: 32px;
color: #333333;
.value {
font-size: 32px;
color: #333333;
& > em {
font-style: normal;
font-size: 28px;
color: #1365DD;
}
}
.placeholder {
& > em {
font-style: normal;
font-size: 28px;
color: #999999;
}
.arrow {
width: 16px;
height: 16px;
border-top: 5px solid #CCCCCC;
border-right: 5px solid #CCCCCC;
transform: rotate(45deg);
margin-left: 8px;
}
.clear {
width: 32px;
height: 32px;
border-radius: 50%;
background-color: #CCCCCC;
margin-left: 8px;
position: relative;
&:before {
content: "";
width: 4px;
height: 24px;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%) rotate(-45deg);
background-color: #FFFFFF;
border-radius: 4px;
}
&:after {
content: "";
width: 4px;
height: 24px;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%) rotate(45deg);
background-color: #FFFFFF;
border-radius: 4px;
}
}
textarea {
width: 100%;
color: #1365DD;
}
}
.border {
border-top: 1px solid rgba(216, 221, 230, 0.5);
border-bottom: 1px solid rgba(216, 221, 230, 0.5);
.placeholder {
font-size: 28px;
color: #999999;
}
.footer {
height: 112px;
.arrow {
width: 16px;
height: 16px;
border-top: 5px solid #CCCCCC;
border-right: 5px solid #CCCCCC;
transform: rotate(45deg);
margin-left: 8px;
}
.clear {
width: 32px;
height: 32px;
border-radius: 50%;
background-color: #CCCCCC;
margin-left: 8px;
position: relative;
&:before {
content: "";
width: 4px;
height: 24px;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%) rotate(-45deg);
background-color: #FFFFFF;
border-radius: 4px;
}
&:after {
content: "";
width: 4px;
height: 24px;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%) rotate(45deg);
background-color: #FFFFFF;
border-radius: 4px;
}
}
textarea {
width: 100%;
position: fixed;
left: 0;
bottom: 0;
background: #1365DD;
display: flex;
align-items: center;
justify-content: center;
font-size: 36px;
color: #FFFFFF;
}
}
.border {
border-top: 1px solid rgba(216, 221, 230, 0.5);
border-bottom: 1px solid rgba(216, 221, 230, 0.5);
}
.footer {
height: 112px;
width: 100%;
position: fixed;
left: 0;
bottom: 0;
background: #1365DD;
display: flex;
align-items: center;
justify-content: center;
font-size: 36px;
color: #FFFFFF;
}
}
</style>

View File

@@ -6,43 +6,43 @@
</ai-top-fixed>
<template v-if="index==0">
<div class="card">
<header>{{detail.taskTitle}}</header>
<header>{{ detail.taskTitle }}</header>
<u-gap height="16"></u-gap>
<u-row>
<span>任务类型</span>
<span>{{$dict.getLabel("workTaskType",detail.type)}}</span>
<span>{{ $dict.getLabel("workTaskType", detail.type) }}</span>
</u-row>
<u-gap height="8"></u-gap>
<u-row>
<span>开始时间</span>
<span>{{detail.createTime}}</span>
<span>{{ detail.createTime }}</span>
</u-row>
<u-gap height="8"></u-gap>
<u-row>
<span>截止时间</span>
<span style="color:#1365DD">{{detail.lastTime}}</span>
<span style="color:#1365DD">{{ detail.lastTime }}</span>
</u-row>
<u-gap height="8"></u-gap>
<u-row>
<span>剩余时间</span>
<span style="color:#1365DD">{{detail.overTimeStatus}}</span>
<span style="color:#1365DD">{{ detail.overTimeStatus }}</span>
</u-row>
<u-gap height="8"></u-gap>
<u-row>
<span>任务状态</span>
<span>{{$dict.getLabel("workTaskDoStatus",detail.status)}}</span>
<span>{{ $dict.getLabel("workTaskDoStatus", detail.status) }}</span>
</u-row>
<u-gap height="8"></u-gap>
<u-row>
<span>执行说明</span>
<span>{{detail.doDescription}}</span>
<span>{{ detail.doDescription }}</span>
</u-row>
<u-gap height="16"></u-gap>
</div>
<div class="card" style="padding-top: 0">
<div class="label">任务说明</div>
<u-read-more close-text="展开" color="#999999" show-height="300">
<span>{{detail.taskDescription}}</span>
<span>{{ detail.taskDescription }}</span>
</u-read-more>
</div>
<div class="card" style="padding-top: 0" v-if="detail.fileList && detail.fileList.length">
@@ -51,9 +51,9 @@
<u-row justify="between">
<label class="left">
<img :src="$cdn + 'common/appendix.png'" alt="">
<span>{{item.name}}.{{item.postfix}}</span>
<span>{{ item.name }}.{{ item.postfix }}</span>
</label>
<span>{{(item.size/1024).toFixed(2)}}KB</span>
<span>{{ (item.size / 1024).toFixed(2) }}KB</span>
</u-row>
</div>
</div>
@@ -63,26 +63,27 @@
<template v-if="['0','1'].includes(isMine)">
<div class="card">
<div class="label">我的进度</div>
<text>已完成{{detail.myUserInfo.percent}}%</text>
<text>已完成{{ detail.myUserInfo.percent }}%</text>
<div class="progress">
<div class="pro-active" :style="{width:detail.myUserInfo.percent + '%'}"></div>
</div>
</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>
完成到<em>{{ item.percent }}%</em>
</template>
{{item.remarks}}
{{ item.remarks }}
</u-collapse-item>
</u-collapse>
</div>
</template>
<template v-else>
<div class="card" v-for="(item,index) in detail.userInfoList" :key="index">
<div class="label">{{item.userName}}</div>
<text>已完成{{item.percent}}%</text>
<div class="label">{{ item.userName }}</div>
<text>已完成{{ item.percent }}%</text>
<div class="progress">
<div class="pro-active" :style="{width:item.percent + '%'}"></div>
</div>
@@ -93,8 +94,8 @@
<template v-if="index==2">
<div class="card" v-if="list.length">
<u-row justify="between" v-for="(item,index) in list" :key="index" class="item" @click="subDetail(item)">
<label class="title">{{item.taskTitle}}</label>
<label class="right">{{item.percent}}%
<label class="title">{{ item.taskTitle }}</label>
<label class="right">{{ item.percent }}%
<div class="arrow"></div>
</label>
</u-row>
@@ -103,342 +104,344 @@
</template>
<ai-back></ai-back>
<div class="footer" v-if="index==1 && detail.myUserInfo.taskRole == 1 && detail.myUserInfo.doStatus==0" @click="handleClick">去完成</div>
<div class="footer" v-if="index==1 && detail.myUserInfo.taskRole == 1 && detail.myUserInfo.doStatus==0"
@click="handleClick">去完成
</div>
<div class="footer" v-if="index==2" @click="createSubTask">创建子任务</div>
</div>
</template>
<script>
import AiTopFixed from "../../../components/AiTopFixed";
import AiBack from "../../../components/AiBack";
import AiEmpty from "../../../components/AiEmpty";
import {mapActions} from "vuex";
import AiTopFixed from "../../../components/AiTopFixed";
import AiBack from "../../../components/AiBack";
import AiEmpty from "../../../components/AiEmpty";
import {mapActions} from "vuex";
export default {
name: "detail",
components: {AiTopFixed, AiBack,AiEmpty},
data() {
return {
current: 1,
index: 0,
id: null,
taskCode: null,
isMine: null,
detail: {},
list: [],
}
},
onLoad(opt) {
this.id = opt.id
this.taskCode = opt.taskCode
this.isMine = opt.isMine
this.$dict.load("workTaskType", "workTaskDoStatus")
},
computed: {
tabs() {
return [
{name: "信息"},
{name: "进度"},
{name: "子任务"},
]
}
},
methods: {
...mapActions(['previewFile', 'injectJWeixin']),
preFile(e) {
if([".jpg",".png",".gif"].includes(e.postfix.toLowerCase())){
uni.previewImage({
current: e.url,
urls: [e.url]
})
}else {
this.previewFile({ ...e})
}
},
getDetail() {
this.$http.post("/app/appworktaskinfo/queryDetailById", null, {
params: {
id: this.id
}
}).then(res => {
if (res && res.data) {
this.detail = res.data
}
})
},
getList(){
this.$http.post("/app/appworktaskinfo/list", null, {
params: {
parentTaskCode: this.detail.taskCode,
size: 999,
}
}).then(res => {
if (res && res.data) {
this.list = res.data.records
}
})
},
createSubTask() {
uni.navigateTo({
url: "/pages/workTask/components/create?taskCode=" + this.taskCode
})
},
subDetail({id}) {
uni.navigateTo({
url: "/pages/workTask/components/subDetail?id=" + id
})
},
handleClick() {
uni.navigateTo({
url: "/pages/workTask/components/finish?taskCode=" + this.detail.taskCode + "&percent=" + this.detail.myUserInfo.percent
})
},
change(e) {
this.index = e
if (e == 2) {
this.getList()
}
}
},
onShow(){
this.getDetail()
this.getList()
export default {
name: "detail",
components: {AiTopFixed, AiBack, AiEmpty},
data() {
return {
current: 1,
index: 0,
id: null,
taskCode: null,
isMine: null,
detail: {},
list: [],
}
},
onLoad(opt) {
this.id = opt.id
this.taskCode = opt.taskCode
this.isMine = opt.isMine
this.$dict.load("workTaskType", "workTaskDoStatus")
},
computed: {
tabs() {
return [
{name: "信息"},
{name: "进度"},
{name: "子任务"},
]
}
},
methods: {
...mapActions(['previewFile', 'injectJWeixin']),
preFile(e) {
if ([".jpg", ".png", ".gif"].includes(e.postfix.toLowerCase())) {
uni.previewImage({
current: e.url,
urls: [e.url]
})
} else {
this.previewFile({...e})
}
},
getDetail() {
this.$http.post("/app/appworktaskinfo/queryDetailById", null, {
params: {
id: this.id
}
}).then(res => {
if (res && res.data) {
this.detail = res.data
}
})
},
getList() {
this.$http.post("/app/appworktaskinfo/list", null, {
params: {
parentTaskCode: this.detail.taskCode,
size: 999,
}
}).then(res => {
if (res && res.data) {
this.list = res.data.records
}
})
},
createSubTask() {
uni.navigateTo({
url: "/pages/workTask/components/create?taskCode=" + this.taskCode
})
},
subDetail({id}) {
uni.navigateTo({
url: "/pages/workTask/components/subDetail?id=" + id
})
},
handleClick() {
uni.navigateTo({
url: "/pages/workTask/components/finish?taskCode=" + this.detail.taskCode + "&percent=" + this.detail.myUserInfo.percent
})
},
change(e) {
this.index = e
if (e == 2) {
this.getList()
}
}
},
onShow() {
this.getDetail()
this.getList()
}
}
</script>
<style lang="scss" scoped>
.detail {
min-height: 100%;
background-color: #F5F5F5;
padding-bottom: 140px;
.detail {
min-height: 100%;
background-color: #F5F5F5;
padding-bottom: 140px;
::v-deep .content {
padding: 0;
::v-deep .content {
padding: 0;
}
.card {
background-color: #FFFFFF;
margin-bottom: 8px;
box-sizing: border-box;
padding: 16px 32px;
header {
font-size: 40px;
font-weight: 600;
color: #333333;
line-height: 64px;
letter-spacing: 1px;
}
.card {
background-color: #FFFFFF;
margin-bottom: 8px;
box-sizing: border-box;
padding: 16px 32px;
header {
font-size: 40px;
font-weight: 600;
color: #333333;
line-height: 64px;
letter-spacing: 1px;
.u-row {
& > div {
background-color: #2266FF;
border-radius: 50%;
text-align: center;
font-size: 22px;
font-weight: bold;
color: #FFFFFF;
display: flex;
align-items: center;
justify-content: center;
}
.u-row {
& > div {
background-color: #2266FF;
border-radius: 50%;
text-align: center;
font-size: 22px;
font-weight: bold;
color: #FFFFFF;
display: flex;
align-items: center;
justify-content: center;
}
& > span:first-child {
font-size: 30px;
color: #999999;;
line-height: 48px;
}
& > span:first-child {
font-size: 30px;
color: #999999;;
line-height: 48px;
}
& > span:last-child {
font-size: 30px;
color: #343D65;
margin-left: 16px;
line-height: 48px;
}
& > span:last-child {
font-size: 30px;
color: #343D65;
margin-left: 16px;
line-height: 48px;
}
.title {
width: 490px;
height: 112px;
display: flex;
align-items: center;
font-size: 32px;
color: #333333;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.title {
width: 490px;
height: 112px;
display: flex;
align-items: center;
font-size: 32px;
color: #333333;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.right {
font-size: 28px;
color: #1365DD;
display: flex;
align-items: center;
.right {
font-size: 28px;
color: #1365DD;
.arrow {
width: 16px;
height: 16px;
border-top: 3px solid #CCCCCC;
border-right: 3px solid #CCCCCC;
transform: rotate(45deg);
}
}
}
.item {
position: relative;
&:after {
width: 100%;
height: 1px;
background-color: rgba(216, 221, 230, 0.5);
content: "";
position: absolute;
left: 0;
bottom: 0;
}
}
& > span {
font-size: 32px;
color: #333333;
line-height: 48px;
letter-spacing: 1px;
display: inline-block;
}
.label {
height: 80px;
font-size: 32px;
color: #333333;
display: flex;
align-items: center;
margin-bottom: 16px;
& > em {
font-style: normal;
font-size: 32px;
color: #1365DD;
}
}
.file {
height: 128px;
background: #FFFFFF;
border-radius: 8px;
border: 1px solid #CCCCCC;
box-sizing: border-box;
padding: 0 16px;
margin-bottom: 32px;
& > .u-row {
height: 100%;
.left {
width: 476px;
display: flex;
align-items: center;
.arrow {
width: 16px;
height: 16px;
border-top: 3px solid #CCCCCC;
border-right: 3px solid #CCCCCC;
transform: rotate(45deg);
& > img {
flex-shrink: 0;
width: 96px;
height: 96px;
}
& > span {
font-size: 32px;
color: #333333;
display: inline-block;
line-height: 44px;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
}
}
.item {
position: relative;
&:after {
width: 100%;
height: 1px;
background-color: rgba(216, 221, 230, 0.5);
content: "";
position: absolute;
left: 0;
bottom: 0;
& > span {
font-size: 28px;
color: #999999;
}
}
}
& > span {
.active {
background-color: #F3F6F9;
}
& > text {
width: 100%;
display: inline-block;
font-size: 30px;
color: #649EFD;
text-align: center;
}
.progress {
height: 12px;
background: #F2F4FC;
border-radius: 12px;
position: relative;
margin: 16px 0 64px 0;
.pro-active {
height: 12px;
background: #639EFD;
border-radius: 12px;
position: absolute;
left: 0;
top: 0;
}
}
em {
font-style: normal;
font-size: 28px;
color: #1365DD;
}
::v-deep .u-collapse {
position: relative;
&:after {
content: "";
width: 718px;
height: 1px;
background-color: rgba(216, 221, 230, 0.5);
position: absolute;
left: 0;
bottom: 0;
}
.u-collapse-head {
padding: 40px 0;
}
.u-collapse-content {
font-size: 32px;
color: #333333;
line-height: 48px;
letter-spacing: 1px;
display: inline-block;
}
.label {
height: 80px;
font-size: 32px;
color: #333333;
display: flex;
align-items: center;
margin-bottom: 16px;
& > em {
font-style: normal;
font-size: 32px;
color: #1365DD;
}
}
.file {
height: 128px;
background: #FFFFFF;
border-radius: 8px;
border: 1px solid #CCCCCC;
box-sizing: border-box;
padding: 0 16px;
margin-bottom: 32px;
& > .u-row {
height: 100%;
.left {
width: 476px;
display: flex;
align-items: center;
& > img {
flex-shrink: 0;
width: 96px;
height: 96px;
}
& > span {
font-size: 32px;
color: #333333;
display: inline-block;
line-height: 44px;
overflow: hidden;
text-overflow: ellipsis;
display:-webkit-box;
-webkit-box-orient:vertical;
-webkit-line-clamp:2;
}
}
& > span {
font-size: 28px;
color: #999999;
}
}
}
.active {
background-color: #F3F6F9;
}
& > text {
width: 100%;
display: inline-block;
font-size: 30px;
color: #649EFD;
text-align: center;
}
.progress {
height: 12px;
background: #F2F4FC;
border-radius: 12px;
position: relative;
margin: 16px 0 64px 0;
.pro-active {
height: 12px;
background: #639EFD;
border-radius: 12px;
position: absolute;
left: 0;
top: 0;
}
}
em {
font-style: normal;
font-size: 28px;
color: #1365DD;
}
::v-deep .u-collapse {
position: relative;
&:after {
content: "";
width: 718px;
height: 1px;
background-color: rgba(216, 221, 230, 0.5);
position: absolute;
left: 0;
bottom: 0;
}
.u-collapse-head {
padding: 40px 0;
}
.u-collapse-content {
font-size: 32px;
color: #333333;
line-height: 48px;
letter-spacing: 1px;
}
}
}
.footer {
height: 112px;
width: 100%;
position: fixed;
left: 0;
bottom: 0;
background: #1365DD;
display: flex;
align-items: center;
justify-content: center;
font-size: 36px;
color: #FFFFFF;
}
}
.footer {
height: 112px;
width: 100%;
position: fixed;
left: 0;
bottom: 0;
background: #1365DD;
display: flex;
align-items: center;
justify-content: center;
font-size: 36px;
color: #FFFFFF;
}
}
</style>

View File

@@ -4,25 +4,25 @@
<u-row justify="between">
<div class="left">
<u-avatar :src="detail.avatar" v-if="detail.avatar"></u-avatar>
<div class="avatar" v-else>{{detail.name && detail.name.substr(-2)}}</div>
<div class="avatar" v-else>{{ detail.name && detail.name.substr(-2) }}</div>
<div class="info">
<div class="name">{{detail.name}}</div>
<div class="status">{{$dict.getLabel("workTaskRole",detail.taskRole)}}</div>
<div class="name">{{ detail.name }}</div>
<div class="status">{{ $dict.getLabel("workTaskRole", detail.taskRole) }}</div>
</div>
</div>
<!-- <div class="btn">-->
<!-- <img src="../static/tx.png" alt="">催办提醒-->
<!-- </div>-->
<!-- <div class="btn">-->
<!-- <img src="../static/tx.png" alt="">催办提醒-->
<!-- </div>-->
</u-row>
<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>
<div class="label">逾期时间</div>
<div class="value" style="color: #FF4466">{{detail.overTimeStatus}}</div>
<div class="value" style="color: #FF4466">{{ detail.overTimeStatus }}</div>
</u-row>
<u-gap height="30"></u-gap>
</div>
@@ -31,9 +31,9 @@
<u-collapse v-for="(item,index) in detail.processList" :key="index">
<u-collapse-item :title="item.createDate && item.createDate.split(' ')[0]">
<template slot="info">
完成到<em>{{item.percent}}%</em>
完成到<em>{{ item.percent }}%</em>
</template>
{{item.remarks}}
{{ item.remarks }}
</u-collapse-item>
</u-collapse>
</div>
@@ -42,145 +42,145 @@
</template>
<script>
import AiBack from "../../../components/AiBack";
import AiBack from "../../../components/AiBack";
export default {
name: "finishDetail",
components: {AiBack},
data() {
return {
id: null,
detail: {},
}
},
onLoad(opt) {
this.id = opt.id
this.$dict.load("workTaskRole").then(_=>this.getDetail())
},
methods: {
getDetail() {
this.$http.post("/app/appworktaskuserinfo/queryDetailById", null, {
params: {
id: this.id
}
}).then(res => {
if (res && res.data) {
this.detail = res.data;
}
})
}
},
}
export default {
name: "finishDetail",
components: {AiBack},
data() {
return {
id: null,
detail: {},
}
},
onLoad(opt) {
this.id = opt.id
this.$dict.load("workTaskRole").then(_ => this.getDetail())
},
methods: {
getDetail() {
this.$http.post("/app/appworktaskuserinfo/queryDetailById", null, {
params: {
id: this.id
}
}).then(res => {
if (res && res.data) {
this.detail = res.data;
}
})
}
},
}
</script>
<style lang="scss" scoped>
.finish-detail {
min-height: 100%;
background-color: #F5F5F5;
.finish-detail {
min-height: 100%;
background-color: #F5F5F5;
.card {
box-sizing: border-box;
padding: 18px 32px;
background-color: #FFFFFF;
margin-bottom: 8px;
.card {
box-sizing: border-box;
padding: 18px 32px;
background-color: #FFFFFF;
margin-bottom: 8px;
.left {
display: flex;
align-items: center;
.left {
display: flex;
align-items: center;
.avatar {
width: 80px;
height: 80px;
border-radius: 50%;
font-size: 28px;
font-weight: 500;
color: #FFFFFF;
display: flex;
align-items: center;
justify-content: center;
background: #2266FF;
}
.info {
display: flex;
flex-direction: column;
margin-left: 16px;
.name {
font-size: 32px;
font-weight: 400;
color: #333333;
line-height: 44px;
}
.status {
font-size: 24px;
font-weight: 400;
color: #999999;
line-height: 34px;
}
}
}
.btn {
.avatar {
width: 80px;
height: 80px;
border-radius: 50%;
font-size: 28px;
font-weight: 500;
color: #FFFFFF;
display: flex;
align-items: center;
justify-content: center;
font-size: 28px;
font-weight: 400;
color: #1365DD;
& > img {
width: 40px;
height: 40px;
}
background: #2266FF;
}
.label {
font-size: 30px;
font-family: PingFangSC-Regular, PingFang SC;
color: #999999;
line-height: 42px;
}
.info {
display: flex;
flex-direction: column;
margin-left: 16px;
.value {
font-size: 30px;
font-weight: 400;
color: #343D65;
line-height: 48px;
}
em {
font-style: normal;
font-size: 28px;
color: #1365DD;
}
::v-deep .u-collapse {
position: relative;
&:after {
content: "";
width: 718px;
height: 1px;
background-color: rgba(216, 221, 230, 0.5);
position: absolute;
left: 0;
bottom: 0;
}
.u-collapse-head {
padding: 40px 0;
}
.u-collapse-content {
.name {
font-size: 32px;
font-weight: 400;
color: #333333;
line-height: 48px;
letter-spacing: 1px;
line-height: 44px;
}
.status {
font-size: 24px;
font-weight: 400;
color: #999999;
line-height: 34px;
}
}
}
.btn {
display: flex;
align-items: center;
justify-content: center;
font-size: 28px;
font-weight: 400;
color: #1365DD;
& > img {
width: 40px;
height: 40px;
}
}
.label {
font-size: 30px;
font-family: PingFangSC-Regular, PingFang SC;
color: #999999;
line-height: 42px;
}
.value {
font-size: 30px;
font-weight: 400;
color: #343D65;
line-height: 48px;
}
em {
font-style: normal;
font-size: 28px;
color: #1365DD;
}
::v-deep .u-collapse {
position: relative;
&:after {
content: "";
width: 718px;
height: 1px;
background-color: rgba(216, 221, 230, 0.5);
position: absolute;
left: 0;
bottom: 0;
}
.u-collapse-head {
padding: 40px 0;
}
.u-collapse-content {
font-size: 32px;
color: #333333;
line-height: 48px;
letter-spacing: 1px;
}
}
}
}
</style>

View File

@@ -3,58 +3,58 @@
<div class="card">
<header>
<em>[子任务]</em>
{{detail.taskTitle}}
{{ detail.taskTitle }}
</header>
<u-gap height="16"></u-gap>
<u-row>
<span>任务类型</span>
<span>{{$dict.getLabel("workTaskType",detail.type)}}</span>
<span>{{ $dict.getLabel("workTaskType", detail.type) }}</span>
</u-row>
<u-gap height="8"></u-gap>
<u-row>
<span>开始时间</span>
<span>{{detail.createTime}}</span>
<span>{{ detail.createTime }}</span>
</u-row>
<u-gap height="8"></u-gap>
<u-row>
<span>截止时间</span>
<span>{{detail.lastTime}}</span>
<span>{{ detail.lastTime }}</span>
</u-row>
<u-gap height="8"></u-gap>
<u-row>
<span>剩余时间</span>
<span style="color:#1365DD">{{detail.overTimeStatus}}</span>
<span style="color:#1365DD">{{ detail.overTimeStatus }}</span>
</u-row>
<u-gap height="8"></u-gap>
<u-row>
<span>任务状态</span>
<span style="color:#1365DD">{{$dict.getLabel("workTaskDoStatus",detail.status)}}</span>
<span style="color:#1365DD">{{ $dict.getLabel("workTaskDoStatus", detail.status) }}</span>
</u-row>
<u-gap height="16"></u-gap>
</div>
<div class="card" style="padding-top: 0">
<div class="label">任务说明</div>
<u-read-more close-text="展开" color="#999999" show-height="300">
<span>{{detail.taskDescription}}</span>
<span>{{ detail.taskDescription }}</span>
</u-read-more>
</div>
<div class="card">
<div class="label">当前进度</div>
<text>已完成{{detail.percent}}%</text>
<text>已完成{{ detail.percent }}%</text>
<div class="progress">
<div class="pro-active" :style="{width:detail.percent + '%'}"></div>
</div>
</div>
<div class="card" style="padding-top: 0" v-if="detail.userInfoList && detail.userInfoList.length">
<div class="label title">任务完成进度(<i>{{count}}</i>/{{detail.userInfoList.length}})</div>
<div class="label title">任务完成进度(<i>{{ count }}</i>/{{ detail.userInfoList.length }})</div>
<u-row justify="between" v-for="(item,index) in detail.userInfoList" :key="index" @click="finishDetail(item)">
<div>{{item.userName && item.userName.substr(-2)}}</div>
<div>{{ item.userName && item.userName.substr(-2) }}</div>
<u-row justify="between" class="item">
<text class="name">{{item.userName}}</text>
<text class="name">{{ item.userName }}</text>
<label class="right">
<span>已完成{{item.percent}}%</span>
<span>已完成{{ item.percent }}%</span>
<label class="arrow"></label>
</label>
</u-row>
@@ -75,267 +75,267 @@
</template>
<script>
import AiBack from "../../../components/AiBack";
import AiBack from "../../../components/AiBack";
export default {
name: "subDetail",
components: {AiBack},
data() {
return {
id: null,
detail: {},
show: false,
content: "",
idx: null,
count: 0,
}
export default {
name: "subDetail",
components: {AiBack},
data() {
return {
id: null,
detail: {},
show: false,
content: "",
idx: null,
count: 0,
}
},
onLoad(opt) {
this.id = opt.id
this.$dict.load("workTaskType", "workTaskDoStatus").then(_ => this.getDetail())
},
methods: {
finishDetail({id}) {
uni.navigateTo({
url: "/pages/workTask/components/finishDetail?id=" + id
})
},
onLoad(opt) {
this.id = opt.id
this.$dict.load("workTaskType", "workTaskDoStatus").then(_ => this.getDetail())
confirm() {
this.$http.post(this.idx == 0 ? "/app/appworktaskinfo/stopOrFinish" : "/app/appworktaskuserinfo/sendMesage", null, {
params: {
id: this.id,
status: this.idx == 0 ? 2 : null
}
}).then(res => {
if (res.code == 0) {
this.$u.toast(this.idx == 0 ? "关闭成功" : "催办成功")
this.getDetail()
}
})
},
methods: {
finishDetail({id}){
uni.navigateTo({
url:"/pages/workTask/components/finishDetail?id=" + id
})
},
confirm() {
this.$http.post(this.idx == 0 ? "/app/appworktaskinfo/stopOrFinish" : "/app/appworktaskuserinfo/sendMesage", null, {
params: {
id: this.id,
status: this.idx == 0 ? 2 : null
}
}).then(res => {
if (res.code == 0) {
this.$u.toast(this.idx == 0 ? "关闭成功" : "催办成功")
this.getDetail()
}
})
},
getDetail() {
this.$http.post("/app/appworktaskinfo/queryDetailById", null, {
params: {
id: this.id
}
}).then(res => {
if (res && res.data) {
this.detail = res.data
this.count = res.data?.userInfoList?.reduce((pre,cur)=>{
return pre + (cur.percent==100 ? 1 : 0)
},0)
}
})
}
},
}
getDetail() {
this.$http.post("/app/appworktaskinfo/queryDetailById", null, {
params: {
id: this.id
}
}).then(res => {
if (res && res.data) {
this.detail = res.data
this.count = res.data?.userInfoList?.reduce((pre, cur) => {
return pre + (cur.percent == 100 ? 1 : 0)
}, 0)
}
})
}
},
}
</script>
<style lang="scss" scoped>
.sub-detail {
min-height: 100%;
overflow-x: hidden;
background-color: #F5F5F5;
padding-bottom: 140px;
.sub-detail {
min-height: 100%;
overflow-x: hidden;
background-color: #F5F5F5;
padding-bottom: 140px;
.card {
background-color: #FFFFFF;
margin-bottom: 8px;
box-sizing: border-box;
padding: 16px 32px;
.card {
background-color: #FFFFFF;
margin-bottom: 8px;
box-sizing: border-box;
padding: 16px 32px;
header {
header {
font-size: 40px;
font-weight: 600;
color: #333333;
line-height: 64px;
letter-spacing: 1px;
& > em {
font-style: normal;
color: #1365DD;
font-size: 40px;
font-weight: 600;
color: #333333;
line-height: 64px;
letter-spacing: 1px;
& > em {
font-style: normal;
color: #1365DD;
font-size: 40px;
}
}
.u-row {
flex: 1;
margin-left: 16px;
position: relative;
.item {
height: 112px;
&:after {
width: 622px;
height: 2px;
content: "";
position: absolute;
left: 0;
bottom: 0;
background-color: rgba(216, 221, 230, 0.5);
}
}
& > div {
width: 80px;
height: 80px;
background-color: #4E8EEE;
border-radius: 50%;
text-align: center;
font-size: 28px;
font-weight: bold;
color: #FFFFFF;
display: flex;
align-items: center;
justify-content: center;
}
& > span:first-child {
font-size: 30px;
color: #999999;;
line-height: 48px;
}
& > span:last-child {
font-size: 30px;
color: #343D65;
margin-left: 16px;
line-height: 48px;
}
.name {
font-size: 32px;
font-weight: 400;
color: #333333;
}
.title {
width: 490px;
height: 112px;
display: flex;
align-items: center;
font-size: 32px;
color: #333333;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.right {
font-size: 28px;
color: #1365DD;
display: flex;
align-items: center;
.arrow {
width: 16px;
height: 16px;
border-top: 3px solid #CCCCCC;
border-right: 3px solid #CCCCCC;
transform: rotate(45deg);
}
}
}
& > text {
width: 100%;
display: inline-block;
font-size: 30px;
color: #649EFD;
text-align: center;
}
.progress {
height: 12px;
background: #F2F4FC;
border-radius: 12px;
position: relative;
margin: 16px 0 80px 0;
.pro-active {
height: 12px;
background: #639EFD;
border-radius: 12px;
position: absolute;
left: 0;
top: 0;
}
}
& > span {
font-size: 32px;
color: #333333;
line-height: 48px;
letter-spacing: 1px;
display: inline-block;
}
.label {
height: 80px;
font-size: 32px;
color: #333333;
display: flex;
align-items: center;
margin-bottom: 16px;
& > em {
font-style: normal;
font-size: 32px;
color: #1365DD;
}
& > i {
font-style: normal;
font-size: 32px;
color: #2EA222;
}
}
.title {
font-weight: bold;
height: 96px;
border-bottom: 1px solid rgba(216, 221, 230, 0.5);
}
}
.footer {
height: 112px;
width: 100%;
position: fixed;
left: 0;
bottom: 0;
background: #FFFFFF;
display: flex;
align-items: center;
justify-content: center;
font-size: 36px;
color: #FFFFFF;
.u-row {
flex: 1;
margin-left: 16px;
position: relative;
img {
width: 48px;
height: 48px;
margin-right: 8px;
.item {
height: 112px;
&:after {
width: 622px;
height: 2px;
content: "";
position: absolute;
left: 0;
bottom: 0;
background-color: rgba(216, 221, 230, 0.5);
}
}
& > div:first-child, div:last-child {
width: 50%;
height: 100%;
& > div {
width: 80px;
height: 80px;
background-color: #4E8EEE;
border-radius: 50%;
text-align: center;
font-size: 28px;
font-weight: bold;
color: #FFFFFF;
display: flex;
align-items: center;
justify-content: center;
}
& > div:first-child {
color: #666666;
& > span:first-child {
font-size: 30px;
color: #999999;;
line-height: 48px;
}
& > div:last-child {
background: #1365DD;
& > span:last-child {
font-size: 30px;
color: #343D65;
margin-left: 16px;
line-height: 48px;
}
.name {
font-size: 32px;
font-weight: 400;
color: #333333;
}
.title {
width: 490px;
height: 112px;
display: flex;
align-items: center;
font-size: 32px;
color: #333333;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.right {
font-size: 28px;
color: #1365DD;
display: flex;
align-items: center;
.arrow {
width: 16px;
height: 16px;
border-top: 3px solid #CCCCCC;
border-right: 3px solid #CCCCCC;
transform: rotate(45deg);
}
}
}
& > text {
width: 100%;
display: inline-block;
font-size: 30px;
color: #649EFD;
text-align: center;
}
.progress {
height: 12px;
background: #F2F4FC;
border-radius: 12px;
position: relative;
margin: 16px 0 80px 0;
.pro-active {
height: 12px;
background: #639EFD;
border-radius: 12px;
position: absolute;
left: 0;
top: 0;
}
}
& > span {
font-size: 32px;
color: #333333;
line-height: 48px;
letter-spacing: 1px;
display: inline-block;
}
.label {
height: 80px;
font-size: 32px;
color: #333333;
display: flex;
align-items: center;
margin-bottom: 16px;
& > em {
font-style: normal;
font-size: 32px;
color: #1365DD;
}
& > i {
font-style: normal;
font-size: 32px;
color: #2EA222;
}
}
.title {
font-weight: bold;
height: 96px;
border-bottom: 1px solid rgba(216, 221, 230, 0.5);
}
}
.footer {
height: 112px;
width: 100%;
position: fixed;
left: 0;
bottom: 0;
background: #FFFFFF;
display: flex;
align-items: center;
justify-content: center;
font-size: 36px;
color: #FFFFFF;
img {
width: 48px;
height: 48px;
margin-right: 8px;
}
& > div:first-child, div:last-child {
width: 50%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
& > div:first-child {
color: #666666;
}
& > div:last-child {
background: #1365DD;
}
}
}
</style>

View File

@@ -5,24 +5,24 @@
</ai-top-fixed>
<div class="list" v-if="list.length">
<div class="card" v-for="(item,index) in list" :key="index" @click="handleClick(item)">
<header>{{item.taskTitle}}</header>
<header>{{ item.taskTitle }}</header>
<u-gap height="24"></u-gap>
<u-row>
<text>任务类型</text>
<text>{{$dict.getLabel("workTaskType",item.type)}}</text>
<text>{{ $dict.getLabel("workTaskType", item.type) }}</text>
</u-row>
<u-gap height="8"></u-gap>
<u-row>
<text>截止时间</text>
<text>{{item.lastTime}}</text>
<text>{{ item.lastTime }}</text>
</u-row>
<u-gap height="8"></u-gap>
<u-row>
<text>剩余时间</text>
<text :style="{color:item.isOverTime==1?'#FF4466':'#1365DD'}">{{item.overTimeStatus}}</text>
<text :style="{color:item.isOverTime==1?'#FF4466':'#1365DD'}">{{ item.overTimeStatus }}</text>
</u-row>
<u-gap height="24"></u-gap>
<span>已完成{{item.percent}}%</span>
<span>已完成{{ item.percent }}%</span>
<u-gap height="16"></u-gap>
<div class="progress">
<div class="active" :style="{width: item.percent + '%'}"></div>
@@ -37,186 +37,186 @@
</template>
<script>
import AiTopFixed from "../../components/AiTopFixed";
import AiAdd from "../../components/AiAdd";
import AiEmpty from "../../components/AiEmpty";
import AiTopFixed from "../../components/AiTopFixed";
import AiAdd from "../../components/AiAdd";
import AiEmpty from "../../components/AiEmpty";
export default {
name: "workTask",
components: {AiTopFixed, AiAdd, AiEmpty},
data() {
export default {
name: "workTask",
components: {AiTopFixed, AiAdd, AiEmpty},
data() {
return {
index: 0,
current: 1,
list: [],
status: "加载更多",
userSelect: false,
}
},
computed: {
tabs() {
return [
{name: "我执行的"},
{name: "我完成的"},
{name: "我发起的"},
{name: "我督办的"},
{name: "抄送我的"},
]
},
},
onLoad() {
this.$dict.load("workTaskType")
},
methods: {
tag(status) {
return {
index: 0,
current: 1,
list: [],
status: "加载更多",
userSelect: false,
}
"0": "common/1jxz.png",
"1": "common/1ywc.png",
"2": "common/1ygb.png"
}[status]
},
computed: {
tabs() {
return [
{name: "我执行的"},
{name: "我完成的"},
{name: "我发起的"},
{name: "我督办的"},
{name: "抄送我的"},
]
},
},
onLoad() {
this.$dict.load("workTaskType")
},
methods: {
tag(status) {
return {
"0": "common/1jxz.png",
"1": "common/1ywc.png",
"2": "common/1ygb.png"
}[status]
},
handleClick(item) {
uni.navigateTo({
url: "/pages/workTask/components/detail?id=" + item.id + "&taskCode=" + item.taskCode + "&isMine=" + this.index
})
},
add() {
uni.navigateTo({
url: "/pages/workTask/components/create"
})
},
change(e) {
this.index = e
this.current = 1
this.getList()
},
map(index) {
return {
"0": {
taskRole: 1,
status: 0,
},
"1": {
taskRole: 1,
status: 1,
},
"2": {
taskRole: 0,
},
"3": {
taskRole: 2,
},
"4": {
taskRole: 3,
}
}[index]
},
getList() {
this.$http.post("/app/appworktaskinfo/list", null, {
params: {
...this.map(this.index),
size: 10,
current: this.current
}
}).then(res => {
if (res && res.data) {
if (this.current > 1 && this.current > res.data.pages) {
this.status = "已经到底啦"
}
this.list = this.current > 1 ? [...this.list, ...res.data.records] : res.data.records
}
})
}
},
onReachBottom() {
this.current = this.current + 1;
this.getList()
},
onShow() {
uni.pageScrollTo({
duration: 0,
scrollTop: 0
handleClick(item) {
uni.navigateTo({
url: "/pages/workTask/components/detail?id=" + item.id + "&taskCode=" + item.taskCode + "&isMine=" + this.index
})
},
add() {
uni.navigateTo({
url: "/pages/workTask/components/create"
})
},
change(e) {
this.index = e
this.current = 1
this.getList()
},
map(index) {
return {
"0": {
taskRole: 1,
status: 0,
},
"1": {
taskRole: 1,
status: 1,
},
"2": {
taskRole: 0,
},
"3": {
taskRole: 2,
},
"4": {
taskRole: 3,
}
}[index]
},
getList() {
this.$http.post("/app/appworktaskinfo/list", null, {
params: {
...this.map(this.index),
size: 10,
current: this.current
}
}).then(res => {
if (res && res.data) {
if (this.current > 1 && this.current > res.data.pages) {
this.status = "已经到底啦"
}
this.list = this.current > 1 ? [...this.list, ...res.data.records] : res.data.records
}
})
}
},
onReachBottom() {
this.current = this.current + 1;
this.getList()
},
onShow() {
uni.pageScrollTo({
duration: 0,
scrollTop: 0
})
this.current = 1
this.getList()
}
}
</script>
<style lang="scss" scoped>
.work-task {
min-height: 100%;
background-color: #F5F5F5;
padding-bottom: 32px;
.work-task {
min-height: 100%;
background-color: #F5F5F5;
padding-bottom: 32px;
::v-deep .content {
padding: 0;
}
::v-deep .content {
padding: 0;
}
.list {
.list {
box-sizing: border-box;
padding: 32px 32px 0 32px;
.card {
background: #FFFFFF;
border-radius: 8px;
box-sizing: border-box;
padding: 32px 32px 0 32px;
padding: 32px;
position: relative;
margin-bottom: 32px;
.card {
background: #FFFFFF;
border-radius: 8px;
box-sizing: border-box;
padding: 32px;
& > header {
font-size: 32px;
font-weight: 600;
color: #333333;
}
& > .u-row {
text {
font-size: 30px;
color: #999999;
line-height: 42px;
}
}
& > span {
font-size: 26px;
color: #649EFD;
}
.progress {
width: 100%;
height: 4px;
background: #F0F1F2;
border-radius: 2px;
position: relative;
margin-bottom: 32px;
& > header {
font-size: 32px;
font-weight: 600;
color: #333333;
}
& > .u-row {
text {
font-size: 30px;
color: #999999;
line-height: 42px;
}
}
& > span {
font-size: 26px;
color: #649EFD;
}
.progress {
width: 100%;
height: 4px;
background: #F0F1F2;
border-radius: 2px;
position: relative;
.active {
position: absolute;
left: 0;
top: 0;
height: 4px;
background: #639EFD;
border-radius: 2px;
}
}
& > img {
width: 112px;
height: 112px;
.active {
position: absolute;
left: 0;
top: 0;
right: 0;
height: 4px;
background: #639EFD;
border-radius: 2px;
}
}
& > img {
width: 112px;
height: 112px;
position: absolute;
top: 0;
right: 0;
}
}
}
}
</style>