Compare commits

...

2 Commits

4 changed files with 38 additions and 14 deletions

View File

@@ -1,4 +1,9 @@
// 设置ticket // 设置ticket
export function SetTicket(data) { export function SetTicket(data) {
window.sessionStorage.setItem("ticket", data); window.sessionStorage.setItem("ticket", data);
}
// 设置项目id
export function SetProjectId(data) {
window.sessionStorage.setItem("projectId", data);
} }

View File

@@ -99,7 +99,8 @@ export default {
dataType: "JSON", dataType: "JSON",
type: "POST", type: "POST",
data: { data: {
ticket: this.$route.params.ticket ticket:
this.$route.params.ticket || window.sessionStorage.getItem("ticket")
}, },
appKey: "es4b8zmz+2001833218+dehllx", appKey: "es4b8zmz+2001833218+dehllx",
onSuccess: data => { onSuccess: data => {

View File

@@ -3,13 +3,11 @@
<div class="image"> <div class="image">
<img alt src="@/assets/img/agreement.png" /> <img alt src="@/assets/img/agreement.png" />
</div> </div>
<div class="text"> <div class="text">为您查询到{{ prjListLength }}条结果</div>
为您查询到{{ this.info.prjList[0].bcxyList.length }}条结果
</div>
<div <div
:key="index" :key="index"
@click="showPdf(item.url)" @click="showPdf(item.url)"
v-for="(item, index) in info.prjList[0].bcxyList" v-for="(item, index) in prjList.bcxyList"
> >
<el-card body-style="padding:10px 10px 0"> <el-card body-style="padding:10px 10px 0">
<div> <div>
@@ -30,7 +28,7 @@
<div> <div>
<img alt src="@/assets/img/money.png" /> <img alt src="@/assets/img/money.png" />
评估总金额 评估总金额
<b style="color: red">{{ info.prjList[0].fhpgList[0].countValue }}</b> <b style="color: red">{{ item.countValue }}</b>
</div> </div>
<div> <div>
<img alt src="@/assets/img/money.png" /> <img alt src="@/assets/img/money.png" />
@@ -43,7 +41,7 @@
<div class="flex"> <div class="flex">
<div class="flex backgroundColor"> <div class="flex backgroundColor">
<img alt src="@/assets/img/shijian.png" /> <img alt src="@/assets/img/shijian.png" />
<span>签订日期{{ item.date }}</span> <span>签订日期{{ item.signTime }}</span>
</div> </div>
</div> </div>
</el-card> </el-card>
@@ -52,6 +50,7 @@
</template> </template>
<script> <script>
import { mgop } from "@aligov/jssdk-mgop"; import { mgop } from "@aligov/jssdk-mgop";
import { SetProjectId } from "@/common/util/tools";
export default { export default {
data() { data() {
return { return {
@@ -70,7 +69,9 @@ export default {
fhpgList: [{ countValue: "无数据", assessmentNo: "无数据" }] fhpgList: [{ countValue: "无数据", assessmentNo: "无数据" }]
} }
] ]
} },
prjList: [],
prjListLength: ""
}; };
}, },
created() { created() {
@@ -79,13 +80,17 @@ export default {
methods: { methods: {
onInit() { onInit() {
this.type = this.$route.params.type; this.type = this.$route.params.type;
if (!window.sessionStorage.getItem("projectId")) {
SetProjectId(this.$route.params.prjId);
}
mgop({ mgop({
api: "mgop.kykj.houseexpropriat.getprjlist", api: "mgop.kykj.houseexpropriat.getprjlist",
host: "https://mapi.zjzwfw.gov.cn/", host: "https://mapi.zjzwfw.gov.cn/",
dataType: "JSON", dataType: "JSON",
type: "POST", type: "POST",
data: { data: {
ticket: this.$route.params.ticket ticket:
this.$route.params.ticket || window.sessionStorage.getItem("ticket")
}, },
appKey: "es4b8zmz+2001833218+dehllx", appKey: "es4b8zmz+2001833218+dehllx",
onSuccess: data => { onSuccess: data => {
@@ -93,10 +98,15 @@ export default {
console.log("res", res); console.log("res", res);
this.info = res; this.info = res;
const prjList = res.prjList.find((item, index) => { const prjList = res.prjList.find((item, index) => {
return item.prjId == this.$route.params.prjId; return (
item.prjId ==
(this.$route.params.prjId ||
window.sessionStorage.getItem("projectId"))
);
}); });
console.log("协议", prjList);
this.prjList = prjList; this.prjList = prjList;
this.prjListLength = prjList.fhpgList.length; this.prjListLength = prjList.bcxyList.length;
}, },
onFail: err => { onFail: err => {
console.log("用户无数据,不展示"); console.log("用户无数据,不展示");

View File

@@ -49,6 +49,7 @@
</template> </template>
<script> <script>
import { mgop } from "@aligov/jssdk-mgop"; import { mgop } from "@aligov/jssdk-mgop";
import { SetProjectId } from "@/common/util/tools";
export default { export default {
data() { data() {
return { return {
@@ -77,22 +78,29 @@ export default {
// 获取数据 // 获取数据
onInit() { onInit() {
this.type = this.$route.params.type; this.type = this.$route.params.type;
if (!window.sessionStorage.getItem("projectId")) {
SetProjectId(this.$route.params.prjId);
}
mgop({ mgop({
api: "mgop.kykj.houseexpropriat.getprjlist", api: "mgop.kykj.houseexpropriat.getprjlist",
host: "https://mapi.zjzwfw.gov.cn/", host: "https://mapi.zjzwfw.gov.cn/",
dataType: "JSON", dataType: "JSON",
type: "POST", type: "POST",
data: { data: {
ticket: this.$route.params.ticket ticket:
this.$route.params.ticket || window.sessionStorage.getItem("ticket")
}, },
appKey: "es4b8zmz+2001833218+dehllx", appKey: "es4b8zmz+2001833218+dehllx",
onSuccess: data => { onSuccess: data => {
const { data: res } = data.data; const { data: res } = data.data;
this.info = res; this.info = res;
const prjList = res.prjList.find((item, index) => { const prjList = res.prjList.find((item, index) => {
return item.prjId == this.$route.params.prjId; return (
item.prjId ==
(this.$route.params.prjId ||
window.sessionStorage.getItem("projectId"))
);
}); });
console.log("find", prjList);
this.prjList = prjList; this.prjList = prjList;
this.prjListLength = prjList.fhpgList.length; this.prjListLength = prjList.fhpgList.length;
}, },