更新
This commit is contained in:
parent
ff2165e8d5
commit
f54b66140e
@ -5,4 +5,7 @@ import oahttp from "@/utils/oahttp.js";
|
||||
*/
|
||||
export const taskLists = (data) => oahttp.get('/task/lists', data)
|
||||
|
||||
|
||||
/**
|
||||
* 任务:更新档案列表
|
||||
*/
|
||||
export const taskInformationgist = (data) => oahttp.get('/task/informationg_list', data)
|
||||
|
@ -470,7 +470,7 @@
|
||||
}, {
|
||||
"path": "fileTask/fileTask",
|
||||
"style": {
|
||||
"navigationBarTitleText": "任务:档案更新",
|
||||
"navigationBarTitleText": "已更新商机",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarBackgroundColor": "#3175f9",
|
||||
"navigationBarTextStyle": "white"
|
||||
|
@ -7,15 +7,14 @@
|
||||
<view class="body">
|
||||
<view>姓名:<text class="name">{{item.name}}</text></view>
|
||||
<view>
|
||||
片区:<text class="name">{{item.village_name}}</text>
|
||||
<text class="name" style="margin-left: 0;" v-for="brigade_name in item.brigade_name">{{brigade_name.brigade_name}}</text>
|
||||
片区:<text class="name">{{(item.village_name||'')+(item.brigade_name||'')}}</text>
|
||||
</view>
|
||||
<view>电话:<text class="name">{{item.phone}}</text></view>
|
||||
</view>
|
||||
</view>
|
||||
<u-line color="#cccccc"></u-line>
|
||||
<view class="bottom">
|
||||
<view>更新时间: {{item.create_time}}</view>
|
||||
<view>更新时间: {{item.update_time}}</view>
|
||||
<view class="right" v-if="showView">
|
||||
<view class="update" @click="navTo(`/subpkg/updateArchives/updateArchives?id=${item.id}&task_id=${task_id}`)">
|
||||
更新
|
||||
@ -38,7 +37,10 @@
|
||||
<script>
|
||||
import {
|
||||
informationList
|
||||
} from "@/api/information.js"
|
||||
} from "@/api/information.js";
|
||||
import {
|
||||
taskInformationgist
|
||||
} from "@/api/task.js";
|
||||
import {
|
||||
Toast
|
||||
} from "../../libs/uniApi";
|
||||
@ -47,6 +49,7 @@
|
||||
return {
|
||||
user_id: -1,
|
||||
task_id: -1,
|
||||
is_admin: false,
|
||||
list: [],
|
||||
loadConfig: {
|
||||
page: 1,
|
||||
@ -59,10 +62,14 @@
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
// 判断是否包含小队长id
|
||||
if (options.id) this.user_id = options.id;
|
||||
else if (this.$store.state.app.userInfo.admin_id == 0) { //如果用户是小队长,将带上自己的id
|
||||
this.user_id = this.$store.state.app.userInfo.id;
|
||||
}else { // 判断是否为管理员
|
||||
this.is_admin = true;
|
||||
}
|
||||
// 判断是否为任务
|
||||
if(options.task_id) {
|
||||
this.task_id = options.task_id;
|
||||
uni.setNavigationBarTitle({
|
||||
@ -103,14 +110,18 @@
|
||||
this.loadConfig.page = 1;
|
||||
this.loadConfig.status = "loadmore";
|
||||
this.list = [];
|
||||
await this.loadInformationList();
|
||||
this.is_admin?null:await this.loadInformationList();
|
||||
uni.stopPullDownRefresh();
|
||||
},
|
||||
async loadInformationList() {
|
||||
let that = this;
|
||||
if (this.loadConfig.status == "nomore") return;
|
||||
this.loadConfig.status = "loading"
|
||||
let res = await informationList({
|
||||
let res = {};
|
||||
if(this.is_admin) res = await taskInformationgist({
|
||||
id: this.task_id
|
||||
});
|
||||
else res = await informationList({
|
||||
page: this.loadConfig.page,
|
||||
limit: this.loadConfig.limit,
|
||||
user_id: that.user_id
|
||||
|
Loading…
x
Reference in New Issue
Block a user