| | |
| | | */ |
| | | pushClue(clueId) { |
| | | return $clue |
| | | .post(`clue/push?clueId=${clueId}`) |
| | | .post(`clue/push?clueId=${clueId}`, {}) |
| | | .then((res) => res.data); |
| | | } |
| | | }; |
| | |
| | | */ |
| | | deleteClueTask(clueTask) { |
| | | return $clue.post(`clue/task/delete`, clueTask); |
| | | }, |
| | | |
| | | /** |
| | | * å®æçº¿ç´¢ä»»å¡ |
| | | * @param {*} clueTaskId |
| | | * @returns |
| | | */ |
| | | finishClueTask(clueTaskId) { |
| | | return $clue.post( |
| | | `clue/task/finish`, |
| | | {}, |
| | | { |
| | | params: { clueTaskId } |
| | | } |
| | | ); |
| | | } |
| | | }; |
| | |
| | | * èªå¨åå»ºè´¦æ· |
| | | */ |
| | | autoCreateAccount(sId) { |
| | | return $fysp.post(`userinfo/create?sceneId=${sId}`).then((res) => res.data); |
| | | return $fysp.post(`userinfo/create?sceneId=${sId}`, {}).then((res) => res.data); |
| | | }, |
| | | /** |
| | | * è·ååºæ¯å¯¹åºçé£ç¾½ç¯å¢ç³»ç»ç¨æ·id |
| | |
| | | ElForm: typeof import('element-plus/es')['ElForm'] |
| | | ElFormItem: typeof import('element-plus/es')['ElFormItem'] |
| | | ElIcon: typeof import('element-plus/es')['ElIcon'] |
| | | ElImage: typeof import('element-plus/es')['ElImage'] |
| | | ElImageViewer: typeof import('element-plus/es')['ElImageViewer'] |
| | | ElInput: typeof import('element-plus/es')['ElInput'] |
| | | ElOption: typeof import('element-plus/es')['ElOption'] |
| | |
| | | RouterLink: typeof import('vue-router')['RouterLink'] |
| | | RouterView: typeof import('vue-router')['RouterView'] |
| | | } |
| | | export interface ComponentCustomProperties { |
| | | vLoading: typeof import('element-plus/es')['ElLoadingDirective'] |
| | | } |
| | | } |
| | |
| | | } |
| | | }, |
| | | gpsConvert(gps) { |
| | | return new Promise((reject) => { |
| | | return new Promise((resolve) => { |
| | | // åæ°è¯´æï¼éè¦è½¬æ¢çåæ ï¼éè¦è½¬æ¢çåæ ç±»åï¼è½¬æ¢æååçåè°å½æ° |
| | | AMap.convertFrom(gps, 'baidu', function (status, result) { |
| | | if (result.info === 'ok') { |
| | | var lnglats = result.locations; // 转æ¢åçé«å¾·åæ Array.<LngLat> |
| | | reject(lnglats[0]); |
| | | resolve(lnglats[0]); |
| | | } |
| | | }); |
| | | }); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | const PI = 3.1415926535897932384626; |
| | | const a = 6378245.0; //é¿åè½´ |
| | | const ee = 0.00669342162296594323; //æç/*** GCJ02 转æ¢ä¸º WGS84* @param lng* @param lat* @returns {*[]}*/ |
| | | |
| | | function transformlat(lng, lat) { |
| | | // lat = +lat lng = +lng |
| | | let ret = |
| | | -100.0 + |
| | | 2.0 * lng + |
| | | 3.0 * lat + |
| | | 0.2 * lat * lat + |
| | | 0.1 * lng * lat + |
| | | 0.2 * Math.sqrt(Math.abs(lng)); |
| | | ret += |
| | | ((20.0 * Math.sin(6.0 * lng * PI) + |
| | | 20.0 * Math.sin(2.0 * lng * PI)) * |
| | | 2.0) / |
| | | 3.0; |
| | | ret += |
| | | ((20.0 * Math.sin(lat * PI) + 40.0 * Math.sin((lat / 3.0) * PI)) * |
| | | 2.0) / |
| | | 3.0; |
| | | ret += |
| | | ((160.0 * Math.sin((lat / 12.0) * PI) + |
| | | 320 * Math.sin((lat * PI) / 30.0)) * |
| | | 2.0) / |
| | | 3.0; |
| | | return ret; |
| | | } |
| | | |
| | | function transformlng(lng, lat) { |
| | | // lat = +latlng = +lng |
| | | let ret = |
| | | 300.0 + |
| | | lng + |
| | | 2.0 * lat + |
| | | 0.1 * lng * lng + |
| | | 0.1 * lng * lat + |
| | | 0.1 * Math.sqrt(Math.abs(lng)); |
| | | ret += |
| | | ((20.0 * Math.sin(6.0 * lng * PI) + |
| | | 20.0 * Math.sin(2.0 * lng * PI)) * |
| | | 2.0) / |
| | | 3.0; |
| | | ret += |
| | | ((20.0 * Math.sin(lng * PI) + 40.0 * Math.sin((lng / 3.0) * PI)) * |
| | | 2.0) / |
| | | 3.0; |
| | | ret += |
| | | ((150.0 * Math.sin((lng / 12.0) * PI) + |
| | | 300.0 * Math.sin((lng / 30.0) * PI)) * |
| | | 2.0) / |
| | | 3.0; |
| | | return ret; |
| | | } |
| | | |
| | | /** |
| | | * 夿æ¯å¦å¨å½å
ï¼ä¸å¨å½å
åä¸ååç§» |
| | | * @param lng |
| | | * @param lat |
| | | * @returns {boolean} |
| | | */ |
| | | function out_of_china(lng, lat) { |
| | | // 纬度3.86~53.55,ç»åº¦73.66~135.05 |
| | | return !(lng > 73.66 && lng < 135.05 && lat > 3.86 && lat < 53.55); |
| | | } |
| | | |
| | | /** |
| | | * é«å¾·å°å¾åæ 转GPSåæ ç®æ³ |
| | | */ |
| | | function gcj02towgs84(_lng, _lat) { |
| | | // lat = +latlng = +lng |
| | | const lng = parseFloat(_lng); |
| | | const lat = parseFloat(_lat); |
| | | if (out_of_china(lng, lat)) { |
| | | return [lng, lat]; |
| | | } else { |
| | | let dlat = transformlat(lng - 105.0, lat - 35.0); |
| | | let dlng = transformlng(lng - 105.0, lat - 35.0); |
| | | let radlat = (lat / 180.0) * PI; |
| | | let magic = Math.sin(radlat); |
| | | magic = 1 - ee * magic * magic; |
| | | let sqrtmagic = Math.sqrt(magic); |
| | | dlat = |
| | | (dlat * 180.0) / (((a * (1 - ee)) / (magic * sqrtmagic)) * PI); |
| | | dlng = (dlng * 180.0) / ((a / sqrtmagic) * Math.cos(radlat) * PI); |
| | | let mglat = |
| | | Math.round((lat * 2 - lat - dlat) * 1000000) / 1000000; |
| | | let mglng = |
| | | Math.round((lng * 2 - lng - dlng) * 1000000) / 1000000; |
| | | return [mglng, mglat]; |
| | | } |
| | | } |
| | | |
| | | const coor = [ |
| | | [121.451515, 31.312769], |
| | | [121.472702, 31.243941], |
| | | [121.472912, 31.243879], |
| | | [121.475128, 31.245564], |
| | | [121.473722, 31.246219], |
| | | [121.474832, 31.259213], |
| | | [121.475602, 31.261579], |
| | | [121.474975, 31.260291], |
| | | [121.474381, 31.259773], |
| | | [121.47412, 31.261534], |
| | | [121.456066, 31.313411] |
| | | ]; |
| | | |
| | | coor.forEach((e) => { |
| | | const res = gcj02towgs84(e[0], e[1]); |
| | | console.log(res); |
| | | }); |
| | |
| | | >æå线索</el-button |
| | | > |
| | | </div> |
| | | <el-scrollbar height="70vh" class="p-h-1"> |
| | | <el-scrollbar height="70vh" class="p-h-1" v-loading="loading"> |
| | | <ClueList :dataList="clueList" @itemSelected="selectClue"> |
| | | </ClueList> |
| | | </el-scrollbar> |
| | | <el-row justify="space-between" class="p-8"> |
| | | <el-scrollbar v-show="showPage" class="p-8"> |
| | | <el-pagination |
| | | size="small" |
| | | v-model:current-page="currentPage" |
| | |
| | | layout="total, sizes, pager" |
| | | :total="total" |
| | | /> |
| | | </el-row> |
| | | </el-scrollbar> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import clueApi from '@/api/clue/clueApi'; |
| | | import { onMapMounted } from '@/components/map/baseMap'; |
| | | import moment from 'moment'; |
| | | import { ref, onMounted, reactive } from 'vue'; |
| | | import { ref, onMounted, reactive, watch } from 'vue'; |
| | | |
| | | const emits = defineEmits('itemSelected'); |
| | | |
| | |
| | | // 线索æ¸
å |
| | | const clueList = ref([]); |
| | | const currentPage = ref(1); |
| | | const pageSize = ref(100); |
| | | const pageSize = ref(50); |
| | | const total = ref(0); |
| | | const showPage = ref(true); |
| | | const loading = ref(false); |
| | | |
| | | watch([currentPage, pageSize], (nV, oV) => { |
| | | if (nV[0] != oV[0] || nV[1] != oV[1]) { |
| | | getClues(); |
| | | } |
| | | }); |
| | | |
| | | /** |
| | | * æ¥è¯¢å·²ä¸åç线索æ¸
å |
| | | */ |
| | | const getClues = function () { |
| | | showPage.value = true; |
| | | loading.value = true; |
| | | let sTime; |
| | | let eTime; |
| | | if (updateTime.value) { |
| | |
| | | .then((res) => { |
| | | total.value = res.head.totalCount; |
| | | clueList.value = res.data; |
| | | }); |
| | | }) |
| | | .finally(() => (loading.value = false)); |
| | | }); |
| | | }; |
| | | |
| | | function fetchRemoteClue() { |
| | | showPage.value = false; |
| | | loading.value = true; |
| | | const time = moment(updateTime.value).format('YYYY-MM-DD HH:mm:ss'); |
| | | onMapMounted(() => { |
| | | clueApi.fetchRemoteClue(time).then((res) => { |
| | | clueApi |
| | | .fetchRemoteClue(time) |
| | | .then((res) => { |
| | | clueList.value = res; |
| | | }); |
| | | }) |
| | | .finally(() => (loading.value = false)); |
| | | }); |
| | | } |
| | | |
| | |
| | | <el-row align="middle"> |
| | | <el-text type="info" size="small">ç»è®ºï¼</el-text> |
| | | <el-tag |
| | | v-if="!isInternal" |
| | | :type="item.cuploaded ? 'success' : 'danger'" |
| | | effect="dark" |
| | | > |
| | | {{ item.cuploaded ? 'å·²æ¨é' : 'æªæ¨é' }} |
| | | </el-tag> |
| | | <el-tag |
| | | v-else |
| | | :type="item.conclusionCount > 0 ? 'success' : 'danger'" |
| | | effect="dark" |
| | | > |
| | | {{ item.conclusionCount > 0 ? '已填æ¥' : 'æªå¡«æ¥' }} |
| | | </el-tag> |
| | | </el-row> |
| | | <el-divider direction="vertical" /> |
| | |
| | | |
| | | var _marker; |
| | | export default { |
| | | inject: { |
| | | // æ¯å¦æ¯å
é¨çº¿ç´¢ç¸å
³æä½ |
| | | isInternal: { |
| | | default: false |
| | | } |
| | | }, |
| | | props: { |
| | | dataList: Array |
| | | }, |
| | |
| | | </div> |
| | | </el-button> |
| | | <el-button |
| | | v-else-if="clueTask" |
| | | class="push-btn" |
| | | :type="clueTask.finished ? 'success' : 'danger'" |
| | | @click="finishTask" |
| | | :disabled="clueTask.finished" |
| | | > |
| | | <div class="flex-col"> |
| | | <template v-if="clueTask.finished"> |
| | | <el-icon><Check /></el-icon> |
| | | <div>ä»»</div> |
| | | <div>å¡</div> |
| | | <div>å®</div> |
| | | <div>æ</div> |
| | | </template> |
| | | <template v-else> |
| | | <el-icon><Upload /></el-icon> |
| | | <div>ç»</div> |
| | | <div>æ</div> |
| | | <div>ä»»</div> |
| | | <div>å¡</div> |
| | | </template> |
| | | </div> |
| | | </el-button> |
| | | <el-button |
| | | class="task-btn" |
| | | :type="clueTask ? 'success' : 'danger'" |
| | | @click="publishTask" |
| | |
| | | }, |
| | | pushClue() { |
| | | return clueApi.pushClue(this.clueData.cid).then((res) => { |
| | | this.finishTask(); |
| | | this.$emit('pushed', res); |
| | | }); |
| | | }, |
| | |
| | | handelClueTaskEdit() { |
| | | this.getClueTask(); |
| | | this.$emit('onClueTaskChange'); |
| | | }, |
| | | finishTask() { |
| | | useMessageBoxTip({ |
| | | confirmMsg: 'æ¯å¦ç»æçº¿ç´¢ä»»å¡ï¼', |
| | | confirmTitle: 'ç»æçº¿ç´¢ä»»å¡', |
| | | onConfirm: () => { |
| | | return clueTaskApi |
| | | .finishClueTask(this.clueTask.guid) |
| | | .then((res) => { |
| | | if (res.data == 1) { |
| | | this.clueTask.finished = true; |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | }; |
| | |
| | | label="é®é¢åç§°" |
| | | :content="item.cqName" |
| | | /> |
| | | <DescriptionsListItem |
| | | <!-- <DescriptionsListItem |
| | | label="æå¨è¡é" |
| | | :content="item.cqStreet" |
| | | /> --> |
| | | <DescriptionsListItem |
| | | label="详ç»å°å" |
| | | :content="item.cqAddress" |
| | | /> |
| | | <DescriptionsListItem |
| | | label="é®é¢æè¿°" |
| | |
| | | <el-icon><Plus /></el-icon> |
| | | <template #file="{ file }"> |
| | | <div> |
| | | <img |
| | | <el-image |
| | | class="el-upload-list__item-thumbnail" |
| | | :src="file.url" |
| | | fit="cover" |
| | | alt="" |
| | | /> |
| | | <span class="el-upload-list__item-actions"> |
| | |
| | | <template #tip> |
| | | <div class="el-upload__tip"> |
| | | {{ |
| | | `è¯·éæ©å°äº500kbçjpg/pngå¾çï¼æå¤${maxImageCount}å¼ ` |
| | | `è¯·éæ©å°äº5MBçjpg/pngå¾çï¼æå¤${maxImageCount}å¼ ` |
| | | }} |
| | | </div> |
| | | </template> |
| | |
| | | <MapSearch |
| | | v-model:show="mapDialogShow" |
| | | :defaultCoor=" |
| | | formObj.coordinate |
| | | ? formObj.coordinate.split(',') |
| | | : undefined |
| | | formObj.coordinate ? formObj.coordinate.split(',') : undefined |
| | | " |
| | | @on-submit="selectAddress" |
| | | ></MapSearch> |
| | |
| | | import clueQuestionApi from '@/api/clue/clueQuestionApi'; |
| | | import { $clue } from '@/api/index'; |
| | | import MapSearch from '@/components/map/MapSearch.vue'; |
| | | |
| | | // å¾çéå®å¤§å°ï¼åä½ï¼Bï¼ |
| | | const IMG_MAX_SIZE = 4 * 1024 * 1024; |
| | | |
| | | // å³å®å½åæ¯å¦æ¯å
é¨çº¿ç´¢ç¸å
³æä½ |
| | | const isInternal = inject('isInternal', false); |
| | |
| | | } |
| | | |
| | | function handleFileChange(file, files) { |
| | | // console.log('fileSelect', file); |
| | | // 夿 |
| | | if (file.size > IMG_MAX_SIZE) { |
| | | const index = files.indexOf(file); |
| | | files.splice(index, 1); |
| | | ElMessage({ |
| | | message: 'å¾ç大å°è¶
è¿éå¶', |
| | | type: 'error' |
| | | }); |
| | | } else { |
| | | fileList.value = files; |
| | | } |
| | | edit.value = true; |
| | | } |
| | | |