|
@@ -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 || formData.displayRewardTaskEditable"
|
|
|
@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: [],
|
|
@@ -153,6 +158,7 @@ export default {
|
|
|
spanArr: [],
|
|
spanArr: [],
|
|
|
pos: 0,
|
|
pos: 0,
|
|
|
mediaIds: [],
|
|
mediaIds: [],
|
|
|
|
|
+ editFlag: true,
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
activated() {
|
|
activated() {
|
|
@@ -175,6 +181,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)) {
|
|
@@ -213,6 +252,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;
|
|
|
}
|
|
}
|
|
@@ -229,11 +269,21 @@ 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() {
|
|
|
|
|
+ // processStatus 是否有权限编辑,displayRewardTaskEditable 只能编辑一次,
|
|
|
|
|
+ if (
|
|
|
|
|
+ (this.insert == 'false' && this.formData.processStatus != 1) ||
|
|
|
|
|
+ this.formData.displayRewardTaskEditable
|
|
|
|
|
+ ) {
|
|
|
|
|
+ this.getTicketFunfun();
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
openDialog(item) {
|
|
openDialog(item) {
|
|
|
this.vanPopup = true;
|
|
this.vanPopup = true;
|
|
|
console.log(item);
|
|
console.log(item);
|
|
@@ -268,7 +318,7 @@ export default {
|
|
|
storeGroupId: this.$route.query.storeGroupId,
|
|
storeGroupId: this.$route.query.storeGroupId,
|
|
|
visitsId: this.visitsId,
|
|
visitsId: this.visitsId,
|
|
|
taskList: this.taskIds.split(',').map((val) => Number(val)),
|
|
taskList: this.taskIds.split(',').map((val) => Number(val)),
|
|
|
- insert: true,
|
|
|
|
|
|
|
+ insert: this.insert,
|
|
|
collectionAnswers: [],
|
|
collectionAnswers: [],
|
|
|
checkUnManage: 'N',
|
|
checkUnManage: 'N',
|
|
|
deviceCode: '',
|
|
deviceCode: '',
|
|
@@ -323,6 +373,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%;
|