From 3dd5ee4c8388db7fde47299cbbd8aa999a77a129 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Mon, 25 Oct 2021 08:56:44 +0800
Subject: [PATCH] +
---
pages/examine/examine.vue | 30 +++++----
pages/examine/addpeople.vue | 36 ++++++------
pages/examine/addunit.vue | 58 ++++++++++++++-----
store/index.js | 3
4 files changed, 78 insertions(+), 49 deletions(-)
diff --git a/pages/examine/addpeople.vue b/pages/examine/addpeople.vue
index 613fce3..610d1a9 100644
--- a/pages/examine/addpeople.vue
+++ b/pages/examine/addpeople.vue
@@ -106,12 +106,12 @@
methods: {
peopleClick() {
-
+ console.log(123456)
uni.request({
url: this.$store.state.piAPI + "/blade-user/seleL",
method: "get",
data: {
- type: 1,
+ type: 5,
jurisdiction: this.$store.state
.UserData.jurisdiction,
},
@@ -123,11 +123,11 @@
if (item.id != this.$store.state
.UserData.user_id
) {
-
- item.value = item.cardid
-
+
+ item.value = item.id
+
item.label = item.real_name
-
+
this.peopleList.push(item)
}
@@ -140,7 +140,6 @@
},
peopleConfirm(e) {
-
this.form.people = e[0].value
this.form.peopleText = e[0].label
},
@@ -171,20 +170,21 @@
this.$refs.uForm.validate(valid => {
if (valid) {
+ let d = {
+ examinerId: this.createData.Id,
+ examinerDeptId: this.createData.dept_id,
+ // realname: this.form.peopleText,
+ // sname: this.form.unitText,
+ securityId: this.form.people,
+ // reviewtime: this.getCurrentTime(),
+ content: this.form.content,
+ result: this.form.outcome,
+ url: imgurl
+ };
uni.request({
url: this.$store.state.piAPI + "/seinspect/save",
method: "post",
- data: {
- inspectman: this.createData.nick_name,
- deptname: this.createData.deptName,
- realname: this.form.peopleText,
- sname: this.form.unitText,
- carid: this.form.people,
- reviewtime: this.getCurrentTime(),
- insid: this.form.content,
- examinationType: this.form.outcome,
- url: imgurl
- },
+ data: d,
success: (res) => {
if (res.data.msg.indexOf('成功') != -1) {
this.$refs.uToast.show({
diff --git a/pages/examine/addunit.vue b/pages/examine/addunit.vue
index c113166..e8200b2 100644
--- a/pages/examine/addunit.vue
+++ b/pages/examine/addunit.vue
@@ -15,7 +15,7 @@
<u-input v-model="form.unitText" type="select" placeholder="请选择被检查单位" :border="false"
@click="unitClick" />
- <u-select v-model="unitShow" mode="single-column" :list="unitList" @confirm="unitConfirm">
+ <u-select v-model="unitShow" mode="mutil-column-auto" :list="unitList" @confirm="unitConfirm">
</u-select>
</u-form-item>
@@ -105,7 +105,6 @@
methods: {
unitClick() {
-
uni.request({
url: this.$store.state.piAPI + "/blade-system/dept/security_lazy-tree",
method: "get",
@@ -114,7 +113,6 @@
.UserData.jurisdiction,
},
success: (res) => {
-
this.unitList = []
res.data.data.forEach(item => {
@@ -124,8 +122,28 @@
data.label = item.title
+ if (item.children != undefined) {
+ data.children = []
+
+ item.children.forEach(chi => {
+ var ch = {}
+
+ ch.value = chi.id
+
+ ch.label = chi.title
+
+ data.children.push(ch)
+ })
+ } else {
+ data.children = [{
+ value: 112233,
+ label: "暂无数据"
+ }]
+ }
+
this.unitList.push(data)
})
+ // console.log(this.unitList)
this.unitShow = true;
@@ -135,9 +153,8 @@
},
unitConfirm(e) {
-
- this.form.unit = e[0].value
- this.form.unitText = e[0].label
+ this.form.unit = e[1].value
+ this.form.unitText = e[1].label
},
@@ -165,19 +182,28 @@
}
})
this.$refs.uForm.validate(valid => {
- if (valid) {
+ if (valid && this.form.unit != 112233) {
+ let d = {
+ // name: this.createData.nick_name,
+ // deptname: this.createData.deptName,
+ // sname: this.form.unitText,
+ // reviewtime: this.getCurrentTime(),
+ // insid: this.form.content,
+ // results: this.form.outcome,
+ // url: imgurl
+ examinerId: this.createData.Id,
+ examinerDeptId: this.createData.dept_id,
+ reviewedDeptId: this.form.unit,
+ // reviewtime: this.getCurrentTime(),
+ insid: this.form.content,
+ results: this.form.outcome,
+ url: imgurl
+ };
+ console.log(d, "dddddddddddddddddd")
uni.request({
url: this.$store.state.piAPI + "/coinspect/save",
method: "post",
- data: {
- name: this.createData.nick_name,
- deptname: this.createData.deptName,
- sname: this.form.unitText,
- reviewtime: this.getCurrentTime(),
- insid: this.form.content,
- results: this.form.outcome,
- url: imgurl
- },
+ data: d,
success: (res) => {
if (res.data.msg.indexOf('成功') != -1) {
this.$refs.uToast.show({
diff --git a/pages/examine/examine.vue b/pages/examine/examine.vue
index 1d19f25..39bf787 100644
--- a/pages/examine/examine.vue
+++ b/pages/examine/examine.vue
@@ -71,17 +71,17 @@
</u-search>
<view v-show="current == 0 && newsList.length > 0">
- <view class="inTmain" v-for="(item,index) in newsList">
- <u-card :title="item.realname" @click="goDetail(item)">
+ <view class="inTmain" v-for="(item,index) in newsList" :key="index">
+ <u-card :title="item.securityName" @click="goDetail(item)">
<view class="" slot="body">
<view>
<view style="margin-bottom: 10px;" class="u-body-item-title u-line-1">
- 检查人姓名:{{item.inspectman}}
+ 检查人姓名:{{item.realName}}
</view>
</view>
<view>
<view class="u-body-item-title u-line-1">
- 检查人单位:{{item.deptname}}</view>
+ 检查人单位:{{item.examinerDeptName}}</view>
</view>
</view>
<view class="" slot="foot">
@@ -93,16 +93,16 @@
<view v-show="current == 1 && newsList.length > 0">
<view class="inTmain" v-for="(item,index) in newsList">
- <u-card :title="item.sname" @click="goDetail(item)">
+ <u-card :title="item.reviewedDeptName" @click="goDetail(item)">
<view class="" slot="body">
<view>
<view style="margin-bottom: 10px;" class="u-body-item-title u-line-1">
- 检查人姓名:{{item.name}}
+ 检查人姓名:{{item.realName}}
</view>
</view>
<view>
<view class="u-body-item-title u-line-1">
- 检查人单位:{{item.deptname}}</view>
+ 检查人单位:{{item.examinerDeptName}}</view>
</view>
</view>
<view class="" slot="foot">
@@ -141,7 +141,7 @@
current: 0,
dataList: [],
- newsList: [],
+ // newsList: [],
status: 'loadmore',
keyValue: '',
@@ -215,7 +215,7 @@
}
uni.request({
- url: this.$store.state.piAPI + "/seinspect/list",
+ url: this.$store.state.piAPI + "/seinspect/page",
method: "get",
data: {
deptId: this.$store.state.UserData
@@ -238,6 +238,7 @@
that.status = 'nomore';
return
} else {
+
resdata.forEach(item => {
that.newsList.push(item)
that.dataList.push(item)
@@ -265,8 +266,9 @@
}
uni.request({
- url: this.$store.state.piAPI + "/coinspect/list?deptId=" + this.$store.state.UserData
- .dept_id + '&userId=' + this.$store.state.puserID,
+ // url: this.$store.state.piAPI + "/coinspect/page?deptId=" + this.$store.state.UserData
+ // .dept_id + '&userId=' + this.$store.state.puserID,
+ url: this.$store.state.piAPI + "/coinspect/page",
method: "get",
data: {
current: that.pagelist,
@@ -292,7 +294,7 @@
that.dataList.push(item)
})
}
-
+ console.log(that.newsList)
if (that.pagelist == that.pages) {
that.flag = false
that.status = 'nomore';
@@ -337,7 +339,7 @@
if (that.current == 0) {
uni.request({
- url: this.$store.state.piAPI + "/seinspect/list",
+ url: this.$store.state.piAPI + "/seinspect/page",
method: "get",
data: {
current: 1,
@@ -355,7 +357,7 @@
});
} else {
uni.request({
- url: this.$store.state.piAPI + "/coinspect/list?deptId=" + this.$store.state.UserData
+ url: this.$store.state.piAPI + "/coinspect/page?deptId=" + this.$store.state.UserData
.dept_id + '&userId=' + this.$store.state.puserID,
method: "get",
data: {
diff --git a/store/index.js b/store/index.js
index d567dd0..f9bb215 100644
--- a/store/index.js
+++ b/store/index.js
@@ -33,7 +33,8 @@
useName: '过客 ',
},
logPath: '',
- piAPI: 'http://223.82.109.183:2080/api',
+ // piAPI: 'http://223.82.109.183:2080/api',
+ piAPI: 'http://192.168.0.114:81',
api: 'http://223.82.109.183:2080/api',
// piAPI: 'http://localhost:83/',
// piAPI: 'http://192.168.0.115:83',
--
Gitblit v1.9.3