| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143 |
- <!--
- * @Title:
- * @Description: 当前维修任务列表
- * @Author: swp
- * @Date: 2022-08-24 10:49:21
- * @LastEditors:
- * @LastEditTime: 2022-08-24 10:49:21
- -->
- <template>
- <view class="wrap">
- <uni-nav-bar dark :fixed="true" backgroundColor="#3F9EFF" statusBar="false" left-icon="left" left-text="返回"
- @clickLeft="toBack">
- <view class="nav-title">
- <text>{{title}}</text>
- </view>
- </uni-nav-bar>
- <view class="container">
- <uni-section title="人员信息" type="line">
- <uni-list>
- <uni-list-item v-for="item in list" :key="item.id" showArrow clickable @click="onClick(item)">
- <template v-slot:body>
- <view class="list-item-block">
- <view class="line">
- <text class="title">{{item.personName}}</text>
- </view>
- <view class="line">
- <uni-icons class="input-uni-icon" type="person-filled" size="18"
- color="lightblue" />
- <text class="text">岗位:{{item.postName}}</text>
- </view>
- <view class="line">
- <uni-icons class="input-uni-icon" type="phone" size="18" color="lightblue" />
- <text class="text">电话:{{item.contactPhone}}</text>
- </view>
- </view>
- </template>
- </uni-list-item>
- </uni-list>
- <uni-group>
- <view class="pagination-block">
- <uni-pagination show-icon :pageSize="pageSize" :current="pageCurrent" :total="total"
- @change="pageChange" />
- </view>
- </uni-group>
- </uni-section>
- </view>
- </view>
- </template>
- <script>
- import {
- role
- } from "@/api/role.js";
- import http from '@/http/api.js';
- export default {
- components: {
- },
- data() {
- return {
- title: '指定任务负责人',
- pageSize: 10,
- pageCurrent: 1,
- total: 0,
- list: [],
- query: {},
- inputStyles: {
- color: '#808080',
- borderColor: '#d3d3d3'
- },
- }
- },
- computed: {
- },
- onLoad(option) {
- this.pageCurrent = 1;
- this.getPage()
- },
- onShow() {
- this.getPage();
- },
- methods: {
- //返回上一页
- toBack() {
- uni.navigateBack({
- delta: 1
- })
- },
- onBackPress() {
- // #ifdef APP-PLUS
- plus.key.hideSoftKeybord();
- // #endif
- },
- // 分页触发
- pageChange(e) {
- this.pageCurrent = e.current;
- this.getPage()
- },
- onClick(e) {
- console.log('执行click事件', JSON.stringify(e))
- let p = {
- 'taskOwnerId': e.id,
- 'taskOwnerName': e.personName,
- };
- uni.$emit('taskOwnerInfo', JSON.stringify(p))
- this.toBack();
- },
- getPage(params = {}) {
- const current = this.pageCurrent;
- const size = this.pageSize;
- let postData = Object.assign(params, this.query);
- let that = this;
- http.request({
- url: '/galaxy-business/serviceperson/xjgd/org/user/page',
- method: 'GET',
- params: {
- current,
- size,
- },
- data: postData,
- }).then(res => {
- if (res.data.records != null) {
- that.list = res.data.records;
- }
- this.total = res.data.total;
- }).catch(err => {
- console.log(err)
- })
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- .select-checkbox {
- margin-top: 0px;
- margin-bottom: 5px;
- padding-left: 15px;
- }
- </style>
|