|
@@ -3,7 +3,7 @@
|
|
|
<van-nav-bar class="navBar" left-arrow title="生动化陈列" @click-left="onClickLeft">
|
|
<van-nav-bar class="navBar" left-arrow title="生动化陈列" @click-left="onClickLeft">
|
|
|
<template #right v-if="formData">
|
|
<template #right v-if="formData">
|
|
|
<span
|
|
<span
|
|
|
- v-if="isEdit && insert == 'true' && formData.processStatus != 1"
|
|
|
|
|
|
|
+ v-if="formData.processStatus != 1"
|
|
|
@click="onSubmit"
|
|
@click="onSubmit"
|
|
|
style="
|
|
style="
|
|
|
color: white;
|
|
color: white;
|
|
@@ -126,9 +126,15 @@
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
<script>
|
|
<script>
|
|
|
-import { getCollectionInfosBatch, addCollectionAnswerBatch, getVisitsDetail } from '@/api/index';
|
|
|
|
|
|
|
+import {
|
|
|
|
|
+ getCollectionInfosBatch,
|
|
|
|
|
+ addCollectionAnswerBatch,
|
|
|
|
|
+ getVisitsDetail,
|
|
|
|
|
+ selectUserDistanceTheStore,
|
|
|
|
|
+} from '@/api/index';
|
|
|
import taskTips from './taskTips';
|
|
import taskTips from './taskTips';
|
|
|
import deleteUploadImgTaskPhoto from '@/components/deleteUploadImgTaskPhoto';
|
|
import deleteUploadImgTaskPhoto from '@/components/deleteUploadImgTaskPhoto';
|
|
|
|
|
+import { getPosition, getTicketFun } from '@/utils/TXApiFun';
|
|
|
import { mapState } from 'vuex';
|
|
import { mapState } from 'vuex';
|
|
|
export default {
|
|
export default {
|
|
|
name: 'abnortaskPhotoTakingmalVisit',
|
|
name: 'abnortaskPhotoTakingmalVisit',
|
|
@@ -140,7 +146,6 @@ export default {
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
- isEdit: true,
|
|
|
|
|
formData: null,
|
|
formData: null,
|
|
|
dataList: null,
|
|
dataList: null,
|
|
|
taskIds: [],
|
|
taskIds: [],
|
|
@@ -154,6 +159,7 @@ export default {
|
|
|
pos: 0,
|
|
pos: 0,
|
|
|
mediaIds: [],
|
|
mediaIds: [],
|
|
|
mediaInfos: [],
|
|
mediaInfos: [],
|
|
|
|
|
+ editFlag: true,
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
activated() {
|
|
activated() {
|
|
@@ -178,6 +184,39 @@ export default {
|
|
|
},
|
|
},
|
|
|
watch: {},
|
|
watch: {},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ // 授权
|
|
|
|
|
+ getTicketFunfun() {
|
|
|
|
|
+ getTicketFun()
|
|
|
|
|
+ .then(() => {
|
|
|
|
|
+ getPosition()
|
|
|
|
|
+ .then((res) => {
|
|
|
|
|
+ let { TXisBD } = res;
|
|
|
|
|
+ // this.lat = TXisBD.lat;
|
|
|
|
|
+ // this.lon = TXisBD.lon;
|
|
|
|
|
+ this.selectUserDistanceTheStoreFun(TXisBD);
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch((error) => {
|
|
|
|
|
+ this.$dialog.alert({
|
|
|
|
|
+ message: error,
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(() => {});
|
|
|
|
|
+ },
|
|
|
|
|
+ selectUserDistanceTheStoreFun(TXisBD) {
|
|
|
|
|
+ selectUserDistanceTheStore({
|
|
|
|
|
+ visitsId: this.visitsId, // Long 拜访id
|
|
|
|
|
+ lon: TXisBD.lon, // String 经度
|
|
|
|
|
+ lat: TXisBD.lat, // String 纬度
|
|
|
|
|
+ }).then((res) => {
|
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
|
+ this.editFlag = true;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.editFlag = true;
|
|
|
|
|
+ this.$toast(res.msg);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
taskObjectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
|
taskObjectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
|
|
const cellValue = row[column.property];
|
|
const cellValue = row[column.property];
|
|
|
if (cellValue && ['conditionIdentifyNum'].includes(column.property)) {
|
|
if (cellValue && ['conditionIdentifyNum'].includes(column.property)) {
|
|
@@ -216,6 +255,7 @@ export default {
|
|
|
if (res.data.sfaTaskList) {
|
|
if (res.data.sfaTaskList) {
|
|
|
this.dataList = res.data.sfaTaskList.filter((val) => val.taskType == '5');
|
|
this.dataList = res.data.sfaTaskList.filter((val) => val.taskType == '5');
|
|
|
this.formData = this.dataList[0];
|
|
this.formData = this.dataList[0];
|
|
|
|
|
+ this.isEditFun();
|
|
|
} else {
|
|
} else {
|
|
|
this.formData = null;
|
|
this.formData = null;
|
|
|
}
|
|
}
|
|
@@ -232,11 +272,15 @@ export default {
|
|
|
if (res.data && res.data.length) {
|
|
if (res.data && res.data.length) {
|
|
|
this.dataList = res.data;
|
|
this.dataList = res.data;
|
|
|
this.formData = res.data[0];
|
|
this.formData = res.data[0];
|
|
|
|
|
+ this.isEditFun();
|
|
|
} else {
|
|
} else {
|
|
|
this.formData = null;
|
|
this.formData = null;
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
+ isEditFun() {
|
|
|
|
|
+ this.getTicketFunfun();
|
|
|
|
|
+ },
|
|
|
openDialog(item) {
|
|
openDialog(item) {
|
|
|
this.vanPopup = true;
|
|
this.vanPopup = true;
|
|
|
console.log(item);
|
|
console.log(item);
|
|
@@ -335,6 +379,7 @@ export default {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
|
padding-bottom: 46px;
|
|
padding-bottom: 46px;
|
|
|
|
|
+ // overflow-y: auto;
|
|
|
.container {
|
|
.container {
|
|
|
background: #fff;
|
|
background: #fff;
|
|
|
width: 100%;
|
|
width: 100%;
|