12 changed files with 1404 additions and 60 deletions
@ -0,0 +1,75 @@
|
||||
<template> |
||||
<view class="page-bg"> |
||||
<view class="btn" @click="next(-1)">上一页</view> |
||||
<view class="c-box">第<input class="input" v-model='crrPage' @blur="blurInput" />/{{pageNumAll}}页 共{{totalNum}}条 |
||||
</view> |
||||
<view class="btn" @click="next(1)">下一页</view> |
||||
</view> |
||||
</template> |
||||
|
||||
<script> |
||||
export default { |
||||
props: ["totalNum", "pageCount", "crrNum"], |
||||
data() { |
||||
return { |
||||
crrPage: this.crrNum, //当前页 |
||||
pageNumAll: 1, //总页数 |
||||
} |
||||
}, |
||||
watch: { |
||||
crrNum() { |
||||
this.crrPage = this.crrNum |
||||
console.log(this.crrNum) |
||||
}, |
||||
totalNum() { |
||||
this.pageNumAll = Math.ceil(this.totalNum / this.pageCount); |
||||
if (this.pageNumAll < 1) this.pageNumAll = 1 |
||||
} |
||||
}, |
||||
created() { |
||||
|
||||
}, |
||||
methods: { |
||||
next(page) { |
||||
let num = this.crrPage + page |
||||
if (page == -1 && num < 1) return |
||||
if (num > this.pageNumAll) return |
||||
this.$emit('pageClick', num) |
||||
}, |
||||
blurInput() { |
||||
let num = parseInt(this.crrPage) |
||||
if (num < 1) num = 1 |
||||
if (num > this.pageNumAll) num = this.pageNumAll |
||||
this.crrPage = num |
||||
this.$emit('pageClick', this.crrPage) |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style scoped lang="scss"> |
||||
.page-bg { |
||||
display: flex; |
||||
align-items: center; |
||||
justify-content: center; |
||||
font-size: 28rpx; |
||||
|
||||
.btn { |
||||
padding: 10rpx 20rpx; |
||||
border-radius: 5rpx; |
||||
background-color: #fff; |
||||
} |
||||
|
||||
.c-box { |
||||
display: flex; |
||||
align-items: center; |
||||
margin: 0 20rpx; |
||||
} |
||||
|
||||
.input { |
||||
width: 100rpx; |
||||
border-bottom: 1px solid #666; |
||||
text-align: center; |
||||
} |
||||
} |
||||
</style> |
@ -0,0 +1,405 @@
|
||||
<template> |
||||
<view class="page-bg"> |
||||
<u-navbar title="指标编辑" bgColor="rgb(211, 131, 42)" leftIconColor="#fff" titleStyle="color:#fff" placeholder |
||||
border=true :autoBack="true" leftIconSize='35'></u-navbar> |
||||
|
||||
<view class="content-box"> |
||||
<uni-forms :modelValue="formData" ref="form" :rules="rules" label-width="90"> |
||||
<uni-forms-item label="考核部门" name="assessDept" required> |
||||
<view :class="['pick-input',check?'dsb-color':'']" @click="showCheck"> |
||||
{{formData.assessDeptName||'请选择'}} |
||||
</view> |
||||
<!-- <uni-data-select v-model="formData.assessDept" :localdata="deepList" |
||||
@change="changeByName($event,deepList,'assessDeptName')"></uni-data-select> --> |
||||
</uni-forms-item> |
||||
<uni-forms-item label="指标分类" name="type" required> |
||||
<uni-data-select v-model="formData.type" :disabled="check" :localdata="range1" |
||||
@change="changeType"></uni-data-select> |
||||
</uni-forms-item> |
||||
<uni-forms-item label="指标项目" name="classifyId" required> |
||||
<uni-data-select v-model="formData.classifyId" :disabled="check" :localdata="range2" |
||||
@change="changeByName($event,range2,'classifyName')"></uni-data-select> |
||||
</uni-forms-item> |
||||
<uni-forms-item label="指标分数" name="point" required> |
||||
<uni-data-select v-model="formData.point" :disabled="check" :localdata="pointList" |
||||
@change="change"></uni-data-select> |
||||
</uni-forms-item> |
||||
<uni-forms-item label="照片上传"> |
||||
<uni-file-picker limit="9" :class="check?'dsb-up':''" v-model="fileList1" :disabled="check" |
||||
:auto-upload="false" @select="selectFile($event,1)" |
||||
@delete="deletea($event,1)"></uni-file-picker> |
||||
</uni-forms-item> |
||||
<uni-forms-item label="附件上传"> |
||||
<uni-file-picker limit="5" :class="check?'dsb-up':''" v-model="fileList2" :disabled="check" |
||||
:auto-upload="false" @select="selectFile($event,2)" @delete="deletea($event,2)" |
||||
file-mediatype="all" title="最多选择5个文件"></uni-file-picker> |
||||
</uni-forms-item> |
||||
<uni-forms-item label="分数备注"> |
||||
<uni-easyinput type="textarea" :disabled="check" autoHeight v-model="formData.remark" |
||||
placeholder="请输入内容"></uni-easyinput> |
||||
</uni-forms-item> |
||||
|
||||
<uni-forms-item label="异议描述" v-if="formData.isObjection"> |
||||
<uni-easyinput type="textarea" disabled autoHeight v-model="formData.objectionRemark" |
||||
placeholder="请输入内容"></uni-easyinput> |
||||
</uni-forms-item> |
||||
</uni-forms> |
||||
|
||||
<view class="btns"> |
||||
<view class="cancel" @click="goBack">取消</view> |
||||
<view class="confirm" v-if="!check" @click="submit">确定</view> |
||||
<!-- 没异议过才可以异议 --> |
||||
<view class="confirm" v-else-if="!formData.isObjection" @click="show=true">异议</view> |
||||
</view> |
||||
|
||||
</view> |
||||
|
||||
<u-modal :show="show" title="异议" :showCancelButton="true" confirmColor="#D3832A" @cancel="show=false" |
||||
@confirm="confirm"> |
||||
<view class="slot-content"> |
||||
<uni-easyinput type="textarea" autoHeight v-model="formData.objectionRemark" |
||||
placeholder="请输入异议描述"></uni-easyinput> |
||||
</view> |
||||
</u-modal> |
||||
|
||||
|
||||
<u-popup :show="deepShow" :round="10" closeOnClickOverlay @close="deepShow=false"> |
||||
<view class="pop-box"> |
||||
<u-search placeholder="输入关键字搜索" v-model="keyword" clearabled :height="60" :showAction="false" |
||||
@change="searchDeep"></u-search> |
||||
<view class="list"> |
||||
<view class="item" @click="checkDeep(item)" v-for="item,index in popList" :key="index"> |
||||
{{item.deptName}} |
||||
</view> |
||||
</view> |
||||
</view> |
||||
</u-popup> |
||||
</view> |
||||
</template> |
||||
|
||||
<script> |
||||
import utils from '@/utils/functions.js'; |
||||
import { |
||||
deptTree, |
||||
classifyList, |
||||
saveApiIndicators, |
||||
updateApiIndicators, |
||||
myApiIndicatorsDetail |
||||
} from '@/api/user.js' |
||||
export default { |
||||
data() { |
||||
return { |
||||
show: false, |
||||
fileList1: [], |
||||
fileList2: [], |
||||
range1: [], |
||||
range2: [], |
||||
pointList: [], |
||||
deepList: [], |
||||
formData: { |
||||
remark: "" |
||||
}, |
||||
rules: { |
||||
assessDept: { |
||||
rules: [{ |
||||
required: true, |
||||
errorMessage: '请选择', |
||||
}] |
||||
}, |
||||
type: { |
||||
rules: [{ |
||||
required: true, |
||||
errorMessage: '请选择', |
||||
}] |
||||
}, |
||||
classifyId: { |
||||
rules: [{ |
||||
required: true, |
||||
errorMessage: '请选择', |
||||
}] |
||||
}, |
||||
point: { |
||||
rules: [{ |
||||
required: true, |
||||
errorMessage: '请选择', |
||||
}] |
||||
}, |
||||
|
||||
}, |
||||
check: false, //是否只能查看 |
||||
deepShow: false, |
||||
keyword: '', |
||||
popList: [] |
||||
} |
||||
}, |
||||
async onLoad(e) { |
||||
if (e.check) { |
||||
this.check = true |
||||
} |
||||
let res = await classifyList({}) |
||||
this.range1 = res.data.map(item => { |
||||
return { |
||||
value: item.id, |
||||
text: item.name, |
||||
children: item.children |
||||
} |
||||
}) |
||||
//通过折叠列表点击过来--回显选项 |
||||
if (e.oneId) { |
||||
this.formData.type = e.oneId |
||||
this.changeType(e.oneId) |
||||
this.formData.classifyId = e.twoId; |
||||
this.formData.classifyName = e.twoName |
||||
this.changeByName(e.twoId, this.range2, 'classifyName') |
||||
} |
||||
|
||||
//查看详情 |
||||
if (e.id) { |
||||
this.getInfo(e.id) |
||||
} |
||||
this.getDeep() |
||||
}, |
||||
methods: { |
||||
searchDeep(e) { |
||||
console.log(e) |
||||
this.popList = this.deepList.filter(item => !e || item.deptName.indexOf(e) != -1) |
||||
}, |
||||
checkDeep(item) { |
||||
this.formData.assessDept = item.id; |
||||
this.formData.assessDeptName = item.deptName; |
||||
this.deepShow = false |
||||
}, |
||||
showCheck() { |
||||
if (this.check) return |
||||
this.deepShow = true |
||||
}, |
||||
async getInfo(id) { |
||||
let res = await myApiIndicatorsDetail({ |
||||
id |
||||
}) |
||||
this.formData = res.data |
||||
this.range1.forEach(item => { |
||||
item.children && item.children.forEach(item2 => { |
||||
if (item2.id == res.data.classifyId) { |
||||
console.log(item.value) |
||||
this.formData.type = item.value |
||||
this.range2 = item.children.map(item3 => { |
||||
return { |
||||
value: item3.id, |
||||
text: item3.name, |
||||
pointsVOS: item3.pointsVOS |
||||
} |
||||
}) |
||||
this.pointList = item2.pointsVOS.map(item => { |
||||
return { |
||||
value: item.point, |
||||
text: item.point + '', |
||||
} |
||||
}) |
||||
} |
||||
}) |
||||
}) |
||||
this.fileList1 = res.data.pictures |
||||
this.fileList2 = res.data.files |
||||
console.log(this.formData) |
||||
}, |
||||
submit() { |
||||
this.$refs.form.validate().then(async () => { |
||||
uni.showLoading() |
||||
uni.hideLoading() |
||||
this.formData.resourceList = [...this.fileList1, ...this.fileList2] |
||||
let res; |
||||
if (this.formData.id) { |
||||
res = await updateApiIndicators(this.formData) |
||||
} else { |
||||
res = await saveApiIndicators(this.formData) |
||||
} |
||||
if (res.code == 200) { |
||||
uni.showToast({ |
||||
title: "提交成功", |
||||
icon: "none" |
||||
}) |
||||
setTimeout(() => { |
||||
uni.navigateBack() |
||||
}, 2000) |
||||
} |
||||
}) |
||||
}, |
||||
async getDeep() { |
||||
let res = await deptTree({}) |
||||
this.deepList = res.data |
||||
this.popList = res.data |
||||
// .map(item => { |
||||
// return { |
||||
// value: item.id, |
||||
// text: item.deptName |
||||
// } |
||||
// }) |
||||
// this.deepList = utils.formatTree(res.data, 0, 'parentId') |
||||
// console.log(this.deepList) |
||||
}, |
||||
changeType(e) { |
||||
this.formData.classifyId = ''; |
||||
this.formData.classifyName = "" |
||||
this.range2 = this.range1.find(fd => fd.value == e).children.map(item => { |
||||
return { |
||||
value: item.id, |
||||
text: item.name, |
||||
pointsVOS: item.pointsVOS |
||||
} |
||||
}) |
||||
}, |
||||
changeByName(e, list, key) { |
||||
let fds = list.find(fd => fd.value == e) |
||||
this.formData[key] = fds.text |
||||
if (key == 'classifyName') { |
||||
this.formData.point = "" |
||||
this.pointList = fds.pointsVOS.map(item => { |
||||
return { |
||||
value: item.point, |
||||
text: item.point + '', |
||||
} |
||||
}) |
||||
} |
||||
}, |
||||
async confirm() { |
||||
if (!this.formData.objectionRemark) { |
||||
return uni.showToast({ |
||||
title: "请输入异议描述", |
||||
icon: "none" |
||||
}) |
||||
} |
||||
this.formData.isObjection = 1 |
||||
let res = await updateApiIndicators(this.formData) |
||||
if (res.code == 200) { |
||||
this.show = false |
||||
uni.showToast({ |
||||
title: "提交成功", |
||||
icon: "none" |
||||
}) |
||||
setTimeout(() => { |
||||
uni.navigateBack() |
||||
}, 2000) |
||||
} |
||||
}, |
||||
selectFile(e, type) { |
||||
const files = e.tempFiles; |
||||
files.forEach(async item => { |
||||
let res = await utils.upfile(item.path) |
||||
this['fileList' + type].push({ |
||||
url: res.link, |
||||
name: item.path, |
||||
type |
||||
}) |
||||
}) |
||||
|
||||
}, |
||||
deletea(e, type) { |
||||
const num = this['fileList' + type].findIndex(v => v.name === e.tempFilePath); |
||||
this['fileList' + type].splice(num, 1); |
||||
}, |
||||
goBack() { |
||||
uni.navigateBack() |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style scoped lang="scss"> |
||||
.pop-box { |
||||
padding: 20rpx; |
||||
|
||||
.list { |
||||
height: 800rpx; |
||||
overflow-y: auto; |
||||
font-size: 30rpx; |
||||
color: #303133; |
||||
|
||||
.item { |
||||
display: flex; |
||||
box-sizing: border-box; |
||||
padding: 20rpx 30rpx; |
||||
align-items: center; |
||||
border-bottom: 1px solid #eee; |
||||
} |
||||
} |
||||
} |
||||
|
||||
.dsb-up { |
||||
::v-deep .icon-del-box { |
||||
display: none; |
||||
} |
||||
|
||||
::v-deep .is-add, |
||||
::v-deep .files-button { |
||||
display: none; |
||||
} |
||||
} |
||||
|
||||
::v-deep uni-button[type='primary'] { |
||||
background-color: #D3832A; |
||||
} |
||||
|
||||
.slot-content { |
||||
width: 100%; |
||||
} |
||||
|
||||
.pick-input { |
||||
font-size: 14px; |
||||
border: 1px solid #e5e5e5; |
||||
box-sizing: border-box; |
||||
border-radius: 4px; |
||||
padding: 0 5px; |
||||
padding-left: 10px; |
||||
position: relative; |
||||
display: flex; |
||||
-webkit-user-select: none; |
||||
user-select: none; |
||||
flex-direction: row; |
||||
align-items: center; |
||||
border-bottom: solid 1px #e5e5e5; |
||||
width: 100%; |
||||
flex: 1; |
||||
height: 35px; |
||||
} |
||||
|
||||
.dsb-color { |
||||
background-color: #f5f7fa; |
||||
cursor: not-allowed; |
||||
} |
||||
|
||||
.content-box { |
||||
background-color: #fff; |
||||
margin: 10rpx; |
||||
padding: 15rpx; |
||||
font-size: 28rpx; |
||||
|
||||
.btns { |
||||
display: flex; |
||||
align-items: center; |
||||
justify-content: center; |
||||
margin-bottom: 20rpx; |
||||
|
||||
view { |
||||
width: 200rpx; |
||||
height: 60rpx; |
||||
display: flex; |
||||
align-items: center; |
||||
justify-content: center; |
||||
border-radius: 10rpx; |
||||
margin: 0 10rpx; |
||||
} |
||||
|
||||
.cancel { |
||||
border: 1px solid #333; |
||||
|
||||
} |
||||
|
||||
.confirm { |
||||
background-color: #D3832A; |
||||
border: 1px solid #D3832A; |
||||
color: #fff; |
||||
} |
||||
} |
||||
} |
||||
</style> |
@ -0,0 +1,347 @@
|
||||
<template> |
||||
<view> |
||||
<u-navbar title="积分指标" bgColor="rgb(211, 131, 42)" leftIconColor="#fff" titleStyle="color:#fff" placeholder |
||||
border=true :autoBack="true" leftIconSize='35'></u-navbar> |
||||
<view class="tabtip"> |
||||
<view @click="setstate(0)"> |
||||
<view :class="status==0?'xz':''">积分项</view> |
||||
</view> |
||||
<view @click="setstate(1)"> |
||||
<view :class="status==1?'xz':''">已提交积分</view> |
||||
</view> |
||||
</view> |
||||
|
||||
<view v-show="status==0" class="content-box"> |
||||
<view class="collapse"> |
||||
<view v-for="item,index in collapse" :key="index"> |
||||
<view class="title-box" @click="crrColl=index"> |
||||
<view class="title">{{item.name}}</view> |
||||
<u-icon :name="crrColl==index?'arrow-up':'arrow-down'" color="#303133" size="28"></u-icon> |
||||
</view> |
||||
<view class="sub" @click="goEdit(item,sub)" v-show="crrColl==index" v-for="sub,idx in item.children" |
||||
:key="idx">{{sub.name}} |
||||
</view> |
||||
</view> |
||||
</view> |
||||
</view> |
||||
|
||||
<view v-show="status==1"> |
||||
<view class="content-box"> |
||||
<view class="schbox"> |
||||
<view>提交时间:</view> |
||||
<view @click='showCalendar' class="inputsr"> |
||||
<view class="timeInput"> |
||||
{{datatime|| '请选择时间'}} |
||||
</view> |
||||
<view @click.stop.prevent> |
||||
<u-icon @click='showCalendar' style="margin-right: 10rpx;" v-if="!datatime" name="calendar" |
||||
color="#999999" size="50"></u-icon> |
||||
<u-icon @click="cleartime" style="margin-right: 10rpx;" v-else name="close-circle" |
||||
color="#999999" size="40"></u-icon> |
||||
</view> |
||||
</view> |
||||
</view> |
||||
<view class="schbox"> |
||||
<view>考核部门:</view> |
||||
<view class="searchBox"> |
||||
<uni-data-select v-model="assessDept" :localdata="deepList" @change="change"></uni-data-select> |
||||
</view> |
||||
<view @click="pageClick()">查询</view> |
||||
</view> |
||||
<uni-table border stripe emptyText="暂无更多数据" style="width:100%"> |
||||
<uni-tr> |
||||
<uni-th align="center" width="40rpx">序号</uni-th> |
||||
<uni-th align="center" width="100rpx">提交时间</uni-th> |
||||
<uni-th align="center" width="100rpx">考核部门</uni-th> |
||||
<uni-th align="center" width="150rpx">考核指标</uni-th> |
||||
<uni-th align="center" width="40rpx">分数</uni-th> |
||||
</uni-tr> |
||||
<block v-for="item,index in dataList" :key="index"> |
||||
<uni-tr @click="goDetail(item)"> |
||||
<uni-td align="center">{{index+1}}</uni-td> |
||||
<uni-td align="center" |
||||
:style="{color:item.isObjection?'#D3832A':''}">{{item.createTime}}</uni-td> |
||||
<uni-td align="center">{{item.assessDeptName}}</uni-td> |
||||
<uni-td align="center">{{item.classifyName}}</uni-td> |
||||
<uni-td align="center">{{item.point}}</uni-td> |
||||
</uni-tr> |
||||
</block> |
||||
</uni-table> |
||||
|
||||
</view> |
||||
<pageView :totalNum="totalNum" :pageCount="pageCount" :crrNum="crrNum" @pageClick="pageClick" /> |
||||
</view> |
||||
|
||||
<l-calendar v-model:value="show" :initStartDate='date[0]' :initEndDate='date[1]' @hide='showCalendar' |
||||
@change="onConfirm"></l-calendar> |
||||
</view> |
||||
</template> |
||||
|
||||
<script> |
||||
import pageView from '@/compoment/pageView/pageView.vue' |
||||
import { |
||||
classifyList, |
||||
deptTree, |
||||
myApiIndicators |
||||
} from '@/api/user.js' |
||||
export default { |
||||
components: { |
||||
pageView |
||||
}, |
||||
data() { |
||||
return { |
||||
crrNum: 1, |
||||
pageCount: 10, |
||||
totalNum: 0, |
||||
status: 1, |
||||
collapse: [], |
||||
crrColl: 0, |
||||
show: false, |
||||
date: [], |
||||
datatime: '', |
||||
assessDept: null, |
||||
deepList: [], |
||||
dataList: [] |
||||
} |
||||
}, |
||||
created() { |
||||
this.getTypeList() |
||||
this.initData() |
||||
}, |
||||
onShow() { |
||||
this.getList() |
||||
}, |
||||
methods: { |
||||
getList() { |
||||
let json = { |
||||
current: this.crrNum, |
||||
size: this.pageCount, |
||||
assessDept: this.assessDept |
||||
} |
||||
if (this.date && this.date.length) { |
||||
json.startTime = this.date[0] |
||||
json.endTime = this.date[1] |
||||
} |
||||
myApiIndicators(json).then(res => { |
||||
this.totalNum = res.data.total; |
||||
this.dataList = res.data.records.map(item => { |
||||
item.createTime = uni.$u.timeFormat(item.createTime, 'yyyy-mm-dd'); |
||||
return item |
||||
}) |
||||
}) |
||||
}, |
||||
async initData() { |
||||
let res = await deptTree({}) |
||||
this.deepList = res.data.map(item => { |
||||
return { |
||||
value: item.id, |
||||
text: item.deptName |
||||
} |
||||
}) |
||||
}, |
||||
async getTypeList() { |
||||
let res = await classifyList({}) |
||||
this.collapse = res.data |
||||
}, |
||||
pageClick(e) { |
||||
this.crrNum = e || 1; |
||||
this.getList() |
||||
}, |
||||
setstate(status) { |
||||
this.status = status |
||||
}, |
||||
showCalendar() { |
||||
this.show = !this.show |
||||
}, |
||||
onConfirm(e) { |
||||
this.date[0] = e.startDate |
||||
this.date[1] = e.endDate |
||||
this.datatime = e.startDate + ' 至 ' + e.endDate |
||||
}, |
||||
cleartime() { |
||||
this.date = [] |
||||
this.datatime = '' |
||||
}, |
||||
goEdit(item, sub) { |
||||
uni.navigateTo({ |
||||
url: `/pagesHome/pages/integral/edit?oneId=${item.id}&twoId=${sub.id}&twoName=${sub.name}` |
||||
}) |
||||
}, |
||||
goDetail(item) { |
||||
uni.navigateTo({ |
||||
url: `/pagesHome/pages/integral/edit?id=${item.id}` |
||||
}) |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style lang="scss" scoped> |
||||
::v-deep .uni-table-th, |
||||
::v-deep .uni-table-td { |
||||
padding: 10rpx 0; |
||||
} |
||||
|
||||
.my-table { |
||||
text-align: center; |
||||
|
||||
|
||||
.tb-head { |
||||
display: flex; |
||||
align-items: center; |
||||
font-size: 28rpx; |
||||
} |
||||
|
||||
.tb-body { |
||||
display: flex; |
||||
align-items: center; |
||||
font-size: 26rpx; |
||||
padding: 5rpx 0; |
||||
} |
||||
|
||||
.td1 { |
||||
width: 80rpx; |
||||
} |
||||
|
||||
.td2 { |
||||
width: 200rpx; |
||||
} |
||||
|
||||
.td3 { |
||||
flex: 1; |
||||
overflow: hidden; //超出隐藏 |
||||
text-overflow: ellipsis; //文本超出时显示省略号 |
||||
white-space: nowrap; //设置文本不换行 |
||||
} |
||||
|
||||
.td4 { |
||||
flex: 1; |
||||
overflow: hidden; //超出隐藏 |
||||
text-overflow: ellipsis; //文本超出时显示省略号 |
||||
white-space: nowrap; //设置文本不换行 |
||||
} |
||||
|
||||
.td5 { |
||||
width: 80rpx; |
||||
} |
||||
} |
||||
|
||||
.content-box { |
||||
background-color: #fff; |
||||
margin: 10rpx; |
||||
} |
||||
|
||||
.inputsr { |
||||
width: 400upx !important; |
||||
height: 64upx; |
||||
border-radius: 8upx 8upx 8upx 8upx; |
||||
opacity: 1; |
||||
border: 2upx solid #EEEEEE; |
||||
padding: 16upx 18upx; |
||||
box-sizing: border-box; |
||||
padding-right: 0; |
||||
display: flex; |
||||
align-items: center; |
||||
justify-content: space-between; |
||||
font-size: 26upx; |
||||
font-weight: 400; |
||||
color: #092C4D; |
||||
|
||||
>.timeInput { |
||||
overflow: hidden; |
||||
text-overflow: ellipsis; |
||||
white-space: nowrap; |
||||
flex: 1; |
||||
font-size: 26upx; |
||||
} |
||||
} |
||||
|
||||
.schbox { |
||||
display: flex; |
||||
align-items: center; |
||||
justify-content: space-between; |
||||
padding: 15upx 32upx; |
||||
box-sizing: border-box; |
||||
background-color: #ffffff; |
||||
|
||||
>view:nth-of-type(1) { |
||||
font-size: 28upx; |
||||
font-weight: 400; |
||||
color: #092C4D; |
||||
} |
||||
|
||||
>view:nth-of-type(2) { |
||||
flex: 1; |
||||
} |
||||
|
||||
>view:nth-of-type(3) { |
||||
margin-left: 10upx; |
||||
width: 128upx; |
||||
height: 64upx; |
||||
background: #D3832A; |
||||
border-radius: 8upx; |
||||
display: flex; |
||||
align-items: center; |
||||
justify-content: center; |
||||
font-size: 32upx; |
||||
font-weight: 400; |
||||
color: #FFFFFF; |
||||
} |
||||
} |
||||
|
||||
.collapse { |
||||
font-size: 30rpx; |
||||
color: #303133; |
||||
|
||||
.title-box { |
||||
display: flex; |
||||
box-sizing: border-box; |
||||
padding: 20rpx 30rpx; |
||||
align-items: center; |
||||
border-bottom: 1px solid #eee; |
||||
|
||||
.title { |
||||
flex: 1; |
||||
} |
||||
} |
||||
|
||||
.sub { |
||||
display: flex; |
||||
align-items: center; |
||||
padding: 20rpx 30rpx 20rpx 60rpx; |
||||
border-bottom: 1px solid #eee; |
||||
color: #666; |
||||
} |
||||
} |
||||
|
||||
.tabtip { |
||||
display: flex; |
||||
align-items: center; |
||||
justify-content: space-between; |
||||
|
||||
>view { |
||||
width: 50%; |
||||
display: flex; |
||||
align-items: center; |
||||
justify-content: center; |
||||
background-color: #ffffff; |
||||
font-size: 32upx; |
||||
font-weight: 400; |
||||
color: #90A0AF; |
||||
|
||||
>view { |
||||
height: 80upx; |
||||
border-bottom: 8upx solid #ffffff; |
||||
display: flex; |
||||
align-items: center; |
||||
justify-content: center; |
||||
} |
||||
} |
||||
|
||||
.xz { |
||||
color: #D3832A; |
||||
border-bottom: 8upx solid #D3832A; |
||||
// border-radius: 5upx; |
||||
} |
||||
} |
||||
</style> |
@ -0,0 +1,330 @@
|
||||
<template> |
||||
<view> |
||||
<u-navbar title="考核我的指标" bgColor="rgb(211, 131, 42)" leftIconColor="#fff" titleStyle="color:#fff" placeholder |
||||
border=true :autoBack="true" leftIconSize='35'></u-navbar> |
||||
<view v-show="status==1"> |
||||
<view class="content-box"> |
||||
<view class="schbox"> |
||||
<view>考核时间:</view> |
||||
<view @click='showCalendar' class="inputsr"> |
||||
<view class="timeInput"> |
||||
{{datatime|| '请选择时间'}} |
||||
</view> |
||||
<view @click.stop.prevent> |
||||
<u-icon @click='showCalendar' style="margin-right: 10rpx;" v-if="!datatime" name="calendar" |
||||
color="#999999" size="50"></u-icon> |
||||
<u-icon @click="cleartime" style="margin-right: 10rpx;" v-else name="close-circle" |
||||
color="#999999" size="40"></u-icon> |
||||
</view> |
||||
</view> |
||||
<view @click="pageClick()" class="btn">查询</view> |
||||
</view> |
||||
|
||||
<view class="count-box"> |
||||
<view>总积分:<text>{{infos.totalPoints||0}}</text>分</view> |
||||
<view>加分:<text>{{infos.bonusPoins||0}}</text>分</view> |
||||
<view>减分:<text>{{infos.deductionPoints||0}}</text>分</view> |
||||
</view> |
||||
|
||||
<uni-table border stripe emptyText="暂无更多数据"> |
||||
<uni-tr> |
||||
<uni-th align="center" width="40rpx">序号</uni-th> |
||||
<uni-th align="center" width="100rpx">提交时间</uni-th> |
||||
<uni-th align="center" width="100rpx">考核人员</uni-th> |
||||
<uni-th align="center" width="150rpx">考核指标</uni-th> |
||||
<uni-th align="center" width="40rpx">分数</uni-th> |
||||
</uni-tr> |
||||
<block v-for="item,index in dataList" :key="index"> |
||||
<uni-tr @click="goDetail(item)"> |
||||
<uni-td align="center">{{index+1}}</uni-td> |
||||
<uni-td align="center" |
||||
:style="{color:item.isObjection?'#D3832A':''}">{{item.createTime}}</uni-td> |
||||
<uni-td align="center">{{item.createdUserName}}</uni-td> |
||||
<uni-td align="center">{{item.classifyName}}</uni-td> |
||||
<uni-td align="center">{{item.point}}</uni-td> |
||||
</uni-tr> |
||||
</block> |
||||
</uni-table> |
||||
</view> |
||||
<pageView :totalNum="totalNum" :pageCount="pageCount" :crrNum="crrNum" @pageClick="pageClick" /> |
||||
</view> |
||||
|
||||
<l-calendar v-model:value="show" :initStartDate='date[0]' :initEndDate='date[1]' @hide='showCalendar' |
||||
@change="onConfirm"></l-calendar> |
||||
</view> |
||||
</template> |
||||
|
||||
<script> |
||||
import pageView from '@/compoment/pageView/pageView.vue' |
||||
import { |
||||
beMyApiIndicators |
||||
} from '@/api/user.js' |
||||
export default { |
||||
components: { |
||||
pageView |
||||
}, |
||||
data() { |
||||
return { |
||||
crrNum: 1, |
||||
pageCount: 10, |
||||
totalNum: 0, |
||||
status: 1, |
||||
crrColl: 0, |
||||
show: false, |
||||
date: [], |
||||
datatime: '', |
||||
value: 0, |
||||
dataList: [], |
||||
infos: {} |
||||
} |
||||
}, |
||||
created() { |
||||
this.initTime() |
||||
|
||||
}, |
||||
onShow() { |
||||
this.getList() |
||||
}, |
||||
methods: { |
||||
getList() { |
||||
let json = { |
||||
current: this.crrNum, |
||||
size: this.pageCount, |
||||
} |
||||
if (this.date && this.date.length) { |
||||
json.startTime = this.date[0] |
||||
json.endTime = this.date[1] |
||||
} |
||||
beMyApiIndicators(json).then(res => { |
||||
this.infos = res.data; |
||||
let data = res.data.indicatorsVOS; |
||||
this.totalNum = data.total; |
||||
this.dataList = data.records.map(item => { |
||||
item.createTime = uni.$u.timeFormat(item.createTime, 'yyyy-mm-dd'); |
||||
return item |
||||
}) |
||||
|
||||
}) |
||||
}, |
||||
initTime() { |
||||
let date = new Date(); |
||||
let year = date.getFullYear() |
||||
let month = date.getMonth() + 1 |
||||
if (month < 10) month = '0' + month |
||||
let start = year + '-' + month + '-01' |
||||
date.setDate(0); |
||||
let lastDay = date.getDate(); |
||||
let end = year + '-' + month + '-' + lastDay |
||||
this.date = [start, end] |
||||
this.datatime = start + ' 至 ' + end |
||||
}, |
||||
pageClick(e) { |
||||
this.crrNum = e || 1; |
||||
this.getList() |
||||
}, |
||||
setstate(status) { |
||||
this.status = status |
||||
}, |
||||
showCalendar() { |
||||
this.show = !this.show |
||||
}, |
||||
onConfirm(e) { |
||||
this.date[0] = e.startDate |
||||
this.date[1] = e.endDate |
||||
this.datatime = e.startDate + ' 至 ' + e.endDate |
||||
}, |
||||
cleartime() { |
||||
this.date = [] |
||||
this.datatime = '' |
||||
}, |
||||
goDetail(item) { |
||||
uni.navigateTo({ |
||||
url: `/pagesHome/pages/integral/edit?check=1&id=${item.id}` |
||||
}) |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style lang="scss" scoped> |
||||
::v-deep .uni-table-th, |
||||
::v-deep .uni-table-td { |
||||
padding: 10rpx 0; |
||||
} |
||||
|
||||
.count-box { |
||||
display: flex; |
||||
justify-content: space-around; |
||||
align-items: center; |
||||
font-size: 28rpx; |
||||
|
||||
text { |
||||
font-size: 30rpx; |
||||
} |
||||
|
||||
margin: 20rpx; |
||||
} |
||||
|
||||
.my-table { |
||||
text-align: center; |
||||
|
||||
|
||||
.tb-head { |
||||
display: flex; |
||||
align-items: center; |
||||
font-size: 28rpx; |
||||
} |
||||
|
||||
.tb-body { |
||||
display: flex; |
||||
align-items: center; |
||||
font-size: 26rpx; |
||||
padding: 5rpx 0; |
||||
} |
||||
|
||||
.td1 { |
||||
width: 80rpx; |
||||
} |
||||
|
||||
.td2 { |
||||
width: 200rpx; |
||||
} |
||||
|
||||
.td3 { |
||||
flex: 1; |
||||
overflow: hidden; //超出隐藏 |
||||
text-overflow: ellipsis; //文本超出时显示省略号 |
||||
white-space: nowrap; //设置文本不换行 |
||||
} |
||||
|
||||
.td4 { |
||||
flex: 1; |
||||
overflow: hidden; //超出隐藏 |
||||
text-overflow: ellipsis; //文本超出时显示省略号 |
||||
white-space: nowrap; //设置文本不换行 |
||||
} |
||||
|
||||
.td5 { |
||||
width: 80rpx; |
||||
} |
||||
} |
||||
|
||||
.content-box { |
||||
background-color: #fff; |
||||
margin: 10rpx; |
||||
} |
||||
|
||||
.inputsr { |
||||
flex: 1; |
||||
height: 64upx; |
||||
border-radius: 8upx 8upx 8upx 8upx; |
||||
opacity: 1; |
||||
border: 2upx solid #EEEEEE; |
||||
padding: 16upx 18upx; |
||||
box-sizing: border-box; |
||||
padding-right: 0; |
||||
display: flex; |
||||
align-items: center; |
||||
justify-content: space-between; |
||||
font-size: 26upx; |
||||
font-weight: 400; |
||||
color: #092C4D; |
||||
|
||||
>.timeInput { |
||||
overflow: hidden; |
||||
text-overflow: ellipsis; |
||||
white-space: nowrap; |
||||
flex: 1; |
||||
font-size: 26upx; |
||||
} |
||||
} |
||||
|
||||
.schbox { |
||||
display: flex; |
||||
align-items: center; |
||||
justify-content: space-between; |
||||
padding: 15rpx 10rpx; |
||||
box-sizing: border-box; |
||||
background-color: #ffffff; |
||||
|
||||
>view:nth-of-type(1) { |
||||
font-size: 28upx; |
||||
font-weight: 400; |
||||
color: #092C4D; |
||||
} |
||||
|
||||
>view:nth-of-type(2) { |
||||
flex: 1; |
||||
} |
||||
|
||||
.btn { |
||||
margin-left: 10upx; |
||||
width: 128upx; |
||||
height: 64upx; |
||||
background: #D3832A; |
||||
border-radius: 8upx; |
||||
display: flex; |
||||
align-items: center; |
||||
justify-content: center; |
||||
font-size: 32upx; |
||||
font-weight: 400; |
||||
color: #FFFFFF; |
||||
} |
||||
} |
||||
|
||||
.collapse { |
||||
font-size: 30rpx; |
||||
color: #303133; |
||||
|
||||
.title-box { |
||||
display: flex; |
||||
box-sizing: border-box; |
||||
padding: 20rpx 30rpx; |
||||
align-items: center; |
||||
border-bottom: 1px solid #eee; |
||||
|
||||
.title { |
||||
flex: 1; |
||||
} |
||||
} |
||||
|
||||
.sub { |
||||
display: flex; |
||||
align-items: center; |
||||
padding: 20rpx 30rpx 20rpx 60rpx; |
||||
border-bottom: 1px solid #eee; |
||||
color: #666; |
||||
} |
||||
} |
||||
|
||||
.tabtip { |
||||
display: flex; |
||||
align-items: center; |
||||
justify-content: space-between; |
||||
|
||||
>view { |
||||
width: 50%; |
||||
display: flex; |
||||
align-items: center; |
||||
justify-content: center; |
||||
background-color: #ffffff; |
||||
font-size: 32upx; |
||||
font-weight: 400; |
||||
color: #90A0AF; |
||||
|
||||
>view { |
||||
height: 80upx; |
||||
border-bottom: 8upx solid #ffffff; |
||||
display: flex; |
||||
align-items: center; |
||||
justify-content: center; |
||||
} |
||||
} |
||||
|
||||
.xz { |
||||
color: #D3832A; |
||||
border-bottom: 8upx solid #D3832A; |
||||
// border-radius: 5upx; |
||||
} |
||||
} |
||||
</style> |
Binary file not shown.
Loading…
Reference in new issue