Merge remote-tracking branch 'origin/master'
| | |
| | | "fix": "eslint --ext .js,.vue src --fix" |
| | | }, |
| | | "dependencies": { |
| | | "@amap/amap-jsapi-loader": "^1.0.1", |
| | | "@riophae/vue-treeselect": "^0.4.0", |
| | | "@wangeditor/editor": "^5.1.23", |
| | | "@wangeditor/editor-for-vue": "^1.0.2", |
| | |
| | | export function deleteById (id) { |
| | | return request.get(`/visitsAdmin/cloudService/business/ywPatrolPoint/delete/${id}`) |
| | | } |
| | | // 详æ
|
| | | export function detail (id) { |
| | | return request.get(`/visitsAdmin/cloudService/business/ywPatrolPoint/${id}`) |
| | | } |
| | | |
| | | // æ¹éå é¤ |
| | | export function deleteByIdInBatch (ids) { |
| | |
| | | trim: true |
| | | }) |
| | | } |
| | | |
| | | // æ¥è¯¢ |
| | | export function getStaffList (data) { |
| | | return request.post('/visitsAdmin/cloudService/business/member/ywList', data, { |
| | | trim: true |
| | | }) |
| | | } |
| | | // 导åºExcel |
| | | export function exportExcel (data) { |
| | | return request.post('/visitsAdmin/cloudService/business/member/exportExcel', data, { |
| | |
| | | trim: true |
| | | }) |
| | | } |
| | | export function getFloorList (data) { |
| | | return request.post('/visitsAdmin/cloudService/business/ywFloor/list', data, { |
| | | trim: true |
| | | }) |
| | | } |
| | | // 导åºExcel |
| | | export function exportExcel (data) { |
| | | return request.post('/visitsAdmin/cloudService/business/ywFloor/exportExcel', data, { |
| | |
| | | export function fetchList (data) { |
| | | return request.post('/visitsAdmin/cloudService/system/user/page', data) |
| | | } |
| | | // æ¥è¯¢ææå
é¨äººå |
| | | export function getUserList (data) { |
| | | return request.post('/visitsAdmin/cloudService/system/user/findInternalList', data) |
| | | } |
| | | |
| | | // æ°å»º |
| | | export function create (data) { |
| | |
| | | export function create (data) { |
| | | return request.post('/visitsAdmin/cloudService/business/ywWorkorder/create', data) |
| | | } |
| | | |
| | | // ææ´¾ |
| | | export function dispatchOrder (data) { |
| | | return request.post('/visitsAdmin/cloudService/business/ywWorkorder/dispatchOrder', data) |
| | | } |
| | | // å¤ç |
| | | export function dealOrder (data) { |
| | | return request.post('/visitsAdmin/cloudService/business/ywWorkorder/dealOrder', data) |
| | | } |
| | | // ä¿®æ¹ |
| | | export function updateById (data) { |
| | | return request.post('/visitsAdmin/cloudService/business/ywWorkorder/updateById', data) |
| | |
| | | export function deleteById (id) { |
| | | return request.get(`/visitsAdmin/cloudService/business/ywWorkorder/delete/${id}`) |
| | | } |
| | | // æ¥è¯¢è¯¦æ
|
| | | export function detailById (id) { |
| | | return request.get(`/visitsAdmin/cloudService/business/ywWorkorder/${id}`) |
| | | } |
| | | |
| | | // æ¹éå é¤ |
| | | export function deleteByIdInBatch (ids) { |
| | |
| | | }, |
| | | mounted() { |
| | | // needChangePwd 0 : é»è®¤å¯ç éè¦ä¿®æ¹ï¼1 ä¸éè¦ |
| | | if (this.userInfo &&(!this.userInfo.needChangePwd || this.userInfo.needChangePwd == '0')) { |
| | | this.visible.changePwd = true |
| | | } |
| | | // if (this.userInfo &&(!this.userInfo.needChangePwd || this.userInfo.needChangePwd == '0')) { |
| | | // this.visible.changePwd = true |
| | | // } |
| | | }, |
| | | filters: { |
| | | // å±ç¤ºåç§° |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- |
| | | æè¿°ï¼ææ¾å°å¾ç»ä»¶ï¼é»è®¤å°ºå¯¸æ¯ 500 * 300 |
| | | |
| | | æ¥æ¶å±æ§åæ°ï¼ |
| | | lat: 纬度 |
| | | lng: ç»åº¦ |
| | | |
| | | èªå®ä¹äºä»¶ï¼ |
| | | drag: ææ¾å®æäºä»¶ |
| | | |
| | | 示ä¾ï¼ |
| | | <mapDrag @drag="dragMap" lat="22.574405" lng="114.095388"></mapDrag> |
| | | --> |
| | | <template> |
| | | <div class="m-map"> |
| | | <div class="search"> |
| | | <el-form @submit.native.prevent> |
| | | <input |
| | | :id="search_id" |
| | | v-model="input" |
| | | type="text" |
| | | placeholder="请è¾å
¥å
³é®å" |
| | | autocomplete="off" |
| | | > |
| | | <input type="text" style="display: none"> |
| | | <button type="primary" @click="searchMap">æç´¢</button> |
| | | </el-form> |
| | | <div v-show="searchKey" id="js-result" class="result" /> |
| | | </div> |
| | | <!-- <div id="panel" /> --> |
| | | <!-- æç´¢ç»ææ --> |
| | | <div v-if="showsearchResult" class="tool_search_result"> |
| | | <ul> |
| | | <li |
| | | v-for="(item, index) in poiList" |
| | | :key="index" |
| | | @click="markerResult(item)" |
| | | > |
| | | {{ item.name }} |
| | | </li> |
| | | </ul> |
| | | </div> |
| | | <div id="js-container" class="map">æ£å¨å è½½æ°æ® ...</div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | // import remoteLoad from '@/utils/remoteLoad.js' |
| | | import bus from '@/eventBus/eventBus.js' |
| | | // import { MapKey, securityJsCode } from '@/api/config' |
| | | import AMapLoader from '@amap/amap-jsapi-loader' |
| | | const MapKey = 'c477e250c63cde947d7e9072bdcf9e65' |
| | | const securityJsCode = '746ae93f3f20c7fc30134109bd55fd19' |
| | | export default { |
| | | props: { |
| | | lat: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | lng: { |
| | | type: String, |
| | | default: '' |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | autoOptions: { |
| | | input: '' |
| | | }, |
| | | showsearchResult: false, |
| | | search_id: 'searchId', |
| | | input: '', |
| | | searchPlaceInput: '', |
| | | searchKey: '', |
| | | placeSearch: null, |
| | | dragStatus: false, |
| | | AMapUI: null, |
| | | AMap: null, |
| | | positionImage: require('@/assets/icons/position.png'), |
| | | marker: {}, |
| | | map: null, |
| | | poiList: [] |
| | | } |
| | | }, |
| | | watch: { |
| | | searchPlaceInput(newValue) { |
| | | if (newValue != null) { |
| | | // this.placeSearch.search(newValue) |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | bus.$on('share_id', val => { |
| | | this.autoOptions.input = val |
| | | }) |
| | | bus.$on('share', val => { |
| | | this.searchPlaceInput = val |
| | | }) |
| | | }, |
| | | mounted() { |
| | | this.initMap() |
| | | this.sendId() |
| | | }, |
| | | methods: { |
| | | sendMsg() { |
| | | bus.$emit('share', this.input) |
| | | }, |
| | | sendId() { |
| | | bus.$emit('share_id', this.search_id) |
| | | }, |
| | | // å®ä¾åå°å¾ |
| | | initMap() { |
| | | window._AMapSecurityConfig = { securityJsCode } |
| | | AMapLoader.load({ |
| | | key: MapKey, // ç³è¯·å¥½çWeb端å¼åè
Keyï¼é¦æ¬¡è°ç¨ load æ¶å¿
å¡« |
| | | version: '2.0', // æå®è¦å è½½ç JSAPI ççæ¬ï¼ç¼ºçæ¶é»è®¤ä¸º 1.4.15 |
| | | plugins: ['AMap.ToolBar', 'AMap.Geocoder', 'AMap.PlaceSearch', 'AMap.Geolocation', 'AMap.MapType', 'AMap.HawkEye', 'AMap.Scale', 'AMap.AutoComplete'] // éè¦ä½¿ç¨ççæä»¶å表ï¼å¦æ¯ä¾å°º'AMap.Scale'ç |
| | | }).then((AMap) => { |
| | | this.map = new AMap.Map('js-container', { // 设置å°å¾å®¹å¨id |
| | | viewMode: '3D', // æ¯å¦ä¸º3Då°å¾æ¨¡å¼ |
| | | zoom: 11, // åå§åå°å¾çº§å« |
| | | center: [117.279952, 31.850109] // åå§åå°å¾ä¸å¿ç¹ä½ç½® |
| | | }) |
| | | this.map.addControl(new AMap.ToolBar()) |
| | | this.mapOn(AMap) |
| | | }).catch(e => { |
| | | console.log(e) |
| | | }) |
| | | }, |
| | | searchMap() { |
| | | var placeSearch = new AMap.PlaceSearch({ |
| | | // æé å°ç¹æ¥è¯¢ç±» |
| | | pageSize: 30, // å页æ¾ç¤ºç»ææ¡æ° |
| | | pageIndex: 1, // 页ç |
| | | citylimit: false, // æ¯å¦å¼ºå¶éå¶å¨è®¾ç½®çåå¸å
æç´¢ |
| | | map: this.map, // å±ç°ç»æçå°å¾å®ä¾ |
| | | // panel: 'panel', // ç»æå表å°å¨æ¤å®¹å¨ä¸è¿è¡å±ç¤ºã |
| | | autoFitView: true // æ¯å¦èªå¨è°æ´å°å¾è§é使ç»å¶ç Markerç¹é½å¤äºè§å£çå¯è§èå´ |
| | | }) |
| | | // å
³é®åæ¥è¯¢ |
| | | const cur = this |
| | | placeSearch.search(this.input, (status, result) => { |
| | | // æ¥è¯¢æåæ¶ï¼resultå³å¯¹åºå¹é
çPOIä¿¡æ¯ |
| | | console.log(status) |
| | | console.log(result) |
| | | if (status === 'complete' && result.info === 'OK') { |
| | | cur.showsearchResult = true |
| | | cur.poiList = result.poiList.pois |
| | | } else { |
| | | cur.showsearchResult = false |
| | | cur.poiList = [] |
| | | cur.$message({ |
| | | message: 'æ²¡ææ¥å°ç»æ', |
| | | type: 'warning' |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | markerResult(data) { |
| | | // this.input = data.name |
| | | // this.searchMap() |
| | | const that = this |
| | | const { lat, lng } = data.location |
| | | window._AMapSecurityConfig = { securityJsCode } |
| | | AMapLoader.load({ |
| | | key: MapKey, // ç³è¯·å¥½çWeb端å¼åè
Keyï¼é¦æ¬¡è°ç¨ load æ¶å¿
å¡« |
| | | version: '2.0', // æå®è¦å è½½ç JSAPI ççæ¬ï¼ç¼ºçæ¶é»è®¤ä¸º 1.4.15 |
| | | plugins: ['AMap.ToolBar', 'AMap.Geocoder', 'AMap.PlaceSearch', 'AMap.Geolocation', 'AMap.MapType', 'AMap.HawkEye', 'AMap.Scale', 'AMap.AutoComplete'] // éè¦ä½¿ç¨ççæä»¶å表ï¼å¦æ¯ä¾å°º'AMap.Scale'ç |
| | | }).then((AMap) => { |
| | | this.map = new AMap.Map('js-container', { // 设置å°å¾å®¹å¨id |
| | | viewMode: '3D', // æ¯å¦ä¸º3Då°å¾æ¨¡å¼ |
| | | zoom: 18, // åå§åå°å¾çº§å« |
| | | center: [lng, lat] // åå§åå°å¾ä¸å¿ç¹ä½ç½® |
| | | }) |
| | | this.map.addControl(new AMap.ToolBar()) |
| | | const address = data.name |
| | | const marker = new AMap.Marker({ |
| | | position: new AMap.LngLat(lng, lat), |
| | | icon: that.positionImage, |
| | | anchor: 'bottom-center' |
| | | }) |
| | | // map.remove(that.marker) |
| | | this.map.add(marker) |
| | | that.marker = marker |
| | | that.showsearchResult = false |
| | | that.$emit('center', { lnglat: lng + ',' + lat, address }) |
| | | this.mapOn(AMap) |
| | | }).catch(e => { |
| | | console.log(e) |
| | | }) |
| | | // var marker = new AMap.Marker({ |
| | | // position: [Number(data.location.lng), Number(data.location.lat)], |
| | | // cursor: 'pointer', |
| | | // // icon: carIcon, |
| | | // autoRotation: true, |
| | | // angle: 0, |
| | | // offset: new AMap.Pixel(-36, -30), |
| | | // }) |
| | | // marker.setMap(this.mapall) |
| | | // this.mapall.setFitView(); |
| | | }, |
| | | // å°å¾äºä»¶çå¬ |
| | | mapOn(AMap) { |
| | | const { map } = this |
| | | const that = this |
| | | const geocoder = new AMap.Geocoder() |
| | | let address = '' |
| | | // çå¬å°å¾ç¹å»äºä»¶ |
| | | map.on('click', function(e) { |
| | | // è·åç¹å»ä½ç½®åæ |
| | | const { lat, lng } = e.lnglat |
| | | // 设置æ è®°ç¹ |
| | | const marker = new AMap.Marker({ |
| | | position: new AMap.LngLat(lng, lat), |
| | | icon: that.positionImage, |
| | | anchor: 'bottom-center' |
| | | }) |
| | | map.remove(that.marker) |
| | | map.add(marker) |
| | | that.marker = marker |
| | | geocoder.getAddress([lng, lat], function(status, result) { |
| | | address = result.regeocode.formattedAddress |
| | | that.showsearchResult = false |
| | | that.$emit('center', { lng, lat, address }) |
| | | }) |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="css"> |
| | | .m-map { |
| | | min-width: 500px; |
| | | min-height: 300px; |
| | | position: relative; |
| | | } |
| | | .m-map .map { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | .m-map .search { |
| | | position: absolute; |
| | | top: 10px; |
| | | left: 10px; |
| | | width: 285px; |
| | | z-index: 1; |
| | | } |
| | | .m-map .search input { |
| | | width: 220px; |
| | | border: 1px solid #ccc; |
| | | height: 30px; |
| | | box-sizing: border-box; |
| | | line-height: 20px; |
| | | padding: 5px; |
| | | outline: none; |
| | | } |
| | | .m-map .search button { |
| | | line-height: 26px; |
| | | background: #fff; |
| | | border: 1px solid #ccc; |
| | | width: 50px; |
| | | text-align: center; |
| | | } |
| | | .m-map .result { |
| | | max-height: 300px; |
| | | overflow: auto; |
| | | margin-top: 10px; |
| | | } |
| | | #panel { |
| | | position: absolute; |
| | | top: 50px; |
| | | left: 10px; |
| | | width: 270px; |
| | | z-index: 1; |
| | | } |
| | | .tool_search_result { |
| | | position: absolute; |
| | | top: 40px; |
| | | left: 10px; |
| | | width: 270px; |
| | | height: 300px; |
| | | overflow: auto; |
| | | z-index: 1; |
| | | border: 1px solid rgb(175, 175, 173); |
| | | border-top: none; |
| | | background: #fff; |
| | | opacity: 0.8; |
| | | bottom: auto; |
| | | z-index: 12; |
| | | position: absolute; |
| | | text-align: left; |
| | | font-size: 14px; |
| | | |
| | | } |
| | | .tool_search_result ul { |
| | | width: 100%; |
| | | list-style: none; |
| | | margin: 0; |
| | | padding: 0; |
| | | } |
| | | .tool_search_result ul li { |
| | | font-size: 12px; |
| | | cursor: pointer; |
| | | color: rgb(23, 40, 75); |
| | | text-align: center; |
| | | width: 100%; |
| | | line-height: 2; |
| | | padding: 5px 10px; |
| | | box-sizing: border-box; |
| | | border-bottom: 1px dashed rgb(170, 170, 172); |
| | | display: block; |
| | | white-space: nowrap; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | } |
| | | .tool_search_result ul li:last-child { |
| | | border: none; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import Vue from 'vue'
|
| | | // å
å¼ç»ä»¶ä¹é´è¿è¡éè¡
|
| | | export default new Vue()
|
| | |
| | | label: 'name', |
| | | value: 'id', |
| | | children: 'childCategoryList', |
| | | checkStrictly: true |
| | | }"></el-cascader> |
| | | </el-form-item> |
| | | <el-form-item label="ç»çº¬åº¦"> |
| | | |
| | | <el-input v-model="form.lnglat" disabled v-trim /> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <mapDrag class="mapbox" @center="getCenter" /> |
| | | </el-form-item> |
| | | <el-form-item label="å·¡æ£å
容" prop="content"> |
| | | <el-input type="textarea" :rows="4" v-model="form.content" placeholder="请è¾å
¥" /> |
| | | </el-form-item> |
| | | <el-form-item label="ä¸ä¼ å¾ç" prop="imgurl"> |
| | | <UploadAvatarImage :file="{ 'imgurlfull': form.imgurlfull, 'imgurl': form.imgurl }" |
| | | :uploadData="{ folder: 'projects' }" @uploadSuccess="uploadAvatarSuccess" @uploadEnd="isUploading = false" |
| | | :uploadData="{ folder: 'ywPatrol/' }" @uploadSuccess="uploadAvatarSuccess" @uploadEnd="isUploading = false" |
| | | @uploadBegin="isUploading = true" /> |
| | | </el-form-item> |
| | | </el-form> |
| | |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import UploadAvatarImage from '@/components/common/UploadAvatarImage' |
| | | import mapDrag from '@/components/common/map/mapDrag.vue' |
| | | import { fetchList } from '@/api/business/category' |
| | | import { detail } from '@/api/Inspection/ywPatrolPoint' |
| | | export default { |
| | | name: 'OperaYwPatrolPointWindow', |
| | | extends: BaseOpera, |
| | | components: { GlobalWindow, UploadAvatarImage }, |
| | | components: { GlobalWindow, UploadAvatarImage, mapDrag }, |
| | | data() { |
| | | return { |
| | | // è¡¨åæ°æ® |
| | |
| | | code: '', |
| | | content: '', |
| | | imgurl: '', |
| | | areaId: '', |
| | | areaId: 0, |
| | | areaIds: [], |
| | | addr: '' |
| | | }, |
| | | deviceList: [], |
| | |
| | | }) |
| | | }, |
| | | methods: { |
| | | initData() { |
| | | open(title, row) { |
| | | this.title = title |
| | | this.visible = true |
| | | if (row && row.id) { |
| | | this.getDetail(row) |
| | | } |
| | | }, |
| | | getDetail(row) { |
| | | detail(row.id).then(res => { |
| | | this.form = { ...res } |
| | | // this.$set(this.form, 'areaId', res.areaId) |
| | | // console.log('res', res) |
| | | // console.log('res', this.form) |
| | | this.initData(res.areaId) |
| | | }) |
| | | }, |
| | | initData(areaId) { |
| | | fetchList({ |
| | | model: { type: 4 }, |
| | | capacity: 1000, |
| | | page: 1, |
| | | }).then(res => { |
| | | this.cateList = res.records || [] |
| | | console.log('this.form.areaId', this.form) |
| | | |
| | | if (areaId) { |
| | | this.cateList.forEach(item => { |
| | | if (item.childCategoryList) { |
| | | item.childCategoryList.forEach(item2 => { |
| | | if (item2.id == areaId) { |
| | | this.$set(this.form, 'areaIds', [item.id, item2.id]) |
| | | console.log('areaIds', this.form) |
| | | |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | |
| | | }, |
| | | changeSel(e) { |
| | | if (e && e.length == 1) { |
| | | this.$set(this.form, 'catePId', e[0]) |
| | | this.$set(this.form, 'cateId', '') |
| | | } else if (e && e.length == 2) { |
| | | this.$set(this.form, 'catePId', e[0]) |
| | | this.$set(this.form, 'cateId', e[1]) |
| | | getCenter(data) { |
| | | // console.log(data) |
| | | // this.$set(this.form, 'postion', data.address) |
| | | if(data.lng){ |
| | | this.$set(this.form, 'lnglat', data.lng + ',' + data.lat) |
| | | } else { |
| | | this.$set(this.form, 'catePId', '') |
| | | this.$set(this.form, 'cateId', '') |
| | | this.$set(this.form, 'lnglat', '') |
| | | } |
| | | this.search() |
| | | this.$set(this.form, 'longitude', data.lng) |
| | | this.$set(this.form, 'latitude', data.lat) |
| | | }, |
| | | changeSel(e) { |
| | | if (e && e.length == 2) { |
| | | this.$set(this.form, 'areaId', e[1]) |
| | | } else { |
| | | this.$set(this.form, 'areaId', '') |
| | | } |
| | | }, |
| | | uploadAvatarSuccess(file) { |
| | | this.form.imgurl = file.imgurl |
| | |
| | | } |
| | | } |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | .mapbox { |
| | | width: 100%; |
| | | height: 400px; |
| | | margin-bottom: 20px; |
| | | float: left; |
| | | } |
| | | </style> |
| | |
| | | }, |
| | | editClick(row) { |
| | | if (row && row.id) { |
| | | this.$refs.operaYwPatrolPointWindow.open('ç¼è¾å·¡æ£ç¹') |
| | | this.$refs.operaYwPatrolPointWindow.open('ç¼è¾å·¡æ£ç¹', row) |
| | | } else { |
| | | this.$refs.operaYwPatrolPointWindow.open('æ°å»ºå·¡æ£ç¹') |
| | | } |
| | | this.$refs.operaYwPatrolPointWindow.initData() |
| | | // this.$refs.operaYwPatrolPointWindow.initData() |
| | | }, |
| | | changeSel(e) { |
| | | if (e && e.length == 1) { |
| | |
| | | <template> |
| | | <GlobalWindow :title="param.id ? 'ç¼è¾è®¾å¤' : 'æ°å»ºè®¾å¤'" :confirmWorking="subLoading" :visible.sync="isShowModal" width="600px" @close="close" |
| | | @confirm="handleSub"> |
| | | <GlobalWindow :title="param.id ? 'ç¼è¾è®¾å¤' : 'æ°å»ºè®¾å¤'" :confirmWorking="subLoading" :visible.sync="isShowModal" |
| | | width="600px" @close="close" @confirm="handleSub"> |
| | | <el-form :model="param" ref="paramRef" :rules="rules"> |
| | | <el-form-item label="设å¤ç¼ç " prop="code"> |
| | | <el-input v-model="param.code" placeholder="请è¾å
¥" v-trim /> |
| | |
| | | <el-input v-model="param.modelNo" placeholder="请è¾å
¥" v-trim /> |
| | | </el-form-item> |
| | | <el-form-item label="设å¤åç±»" prop=""> |
| | | <el-cascader v-model="param.areaIds" @change="changeSel" placeholder="è¯·éæ©å·¡æ£åºå" clearable :options="cateList" |
| | | <el-cascader v-model="param.areaIds" @change="changeSel" placeholder="è¯·éæ©è®¾å¤åç±»" clearable :options="cateList" |
| | | :props="{ |
| | | label: 'name', |
| | | value: 'id', |
| | | children: 'childCategoryList', |
| | | checkStrictly: true |
| | | children: 'childCategoryList' |
| | | }"></el-cascader> |
| | | </el-form-item> |
| | | <el-form-item label="设å¤ç®¡çå" prop=""> |
| | | <el-select v-model="param.realName" filterable clearable> |
| | | <el-option value="0" label="xxx"></el-option> |
| | | <el-select v-model="param.userId" clearable filterable class="w400"> |
| | | <el-option v-for="item in staffList" :label="item.realname" :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="æå¨ä½ç½®" prop=""> |
| | |
| | | import UploadAvatarImage from '@/components/common/UploadAvatarImage' |
| | | import { fetchList } from '@/api/business/category' |
| | | import { create, updateById } from '@/api/Inspection/device' |
| | | import { getUserList } from '@/api/system/user' |
| | | import { Message } from 'element-ui' |
| | | export default { |
| | | components: { GlobalWindow, UploadAvatarImage }, |
| | |
| | | name: [{ required: true, message: '请è¾å
¥' }], |
| | | code: [{ required: true, message: '请è¾å
¥' }] |
| | | }, |
| | | staffList: [] |
| | | |
| | | } |
| | | }, |
| | |
| | | } |
| | | }) |
| | | }, |
| | | getStaff() { |
| | | getUserList({}).then(res => { |
| | | this.staffList = res |
| | | }) |
| | | }, |
| | | initData() { |
| | | fetchList({ |
| | | model: { type: 5 }, |
| | |
| | | }).then(res => { |
| | | this.cateList = res.records || [] |
| | | }) |
| | | |
| | | this.getStaff() |
| | | }, |
| | | changeSel(e) { |
| | | if (e && e.length == 1) { |
| | | this.$set(this.param, 'catePId', e[0]) |
| | | this.$set(this.param, 'cateId', '') |
| | | } else if (e && e.length == 2) { |
| | | this.$set(this.param, 'catePId', e[0]) |
| | | this.$set(this.param, 'cateId', e[1]) |
| | | if (e && e.length == 2) { |
| | | this.$set(this.param, 'areaId', e[1]) |
| | | } else { |
| | | this.$set(this.param, 'catePId', '') |
| | | this.$set(this.param, 'cateId', '') |
| | | this.$set(this.param, 'areaId', '') |
| | | } |
| | | this.search() |
| | | }, |
| | | uploadAvatarSuccess(file) { |
| | | this.$set(this.param, 'imgurl', file.imgurl) |
| | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped></style> |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="æå±æ¥¼å®" prop="buildingId"> |
| | | <el-select v-model="form.buildingId" placeholder="è¯·éæ©æ¥¼å®" clearable> |
| | | <el-select v-model="form.buildingId" @change="changeBuild" placeholder="è¯·éæ©æ¥¼å®" clearable> |
| | | <el-option v-for="item in buildList" :key="item.id" :label="item.name" :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="楼å±" prop="floor"> |
| | | <el-input v-model="form.floor" placeholder="请è¾å
¥æ¥¼å±" v-trim /> |
| | | <el-select v-model="form.floor" placeholder="è¯·éæ©æ¥¼å±" clearable> |
| | | <el-option v-for="item in floorList" :key="item.id" :label="item.name" :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="æ¿å·" prop="roomNum"> |
| | | <el-input v-model="form.roomNum" placeholder="请è¾å
¥æ¿å·" v-trim /> |
| | |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import { getProjectList } from '@/api/project/ywProject' |
| | | import { getBuildList } from '@/api/project/ywBuilding' |
| | | import { getFloorList } from '@/api/project/yeFloor' |
| | | export default { |
| | | name: 'OperaYwRoomWindow', |
| | | extends: BaseOpera, |
| | |
| | | }, |
| | | projectList: [], |
| | | buildList: [], |
| | | floorList: [], |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | }, |
| | | changeProject(e) { |
| | | this.form.buildingId = '' |
| | | getBuildList({id: e}).then(res => { |
| | | getBuildList({projectId: e}).then(res => { |
| | | this.buildList = res || [] |
| | | }) |
| | | }, |
| | | changeBuild(e) { |
| | | this.form.floor = '' |
| | | getFloorList({buildingId: e}).then(res => { |
| | | this.floorList = res || [] |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | |
| | | let page = pagination.page |
| | | fetchList({ capacity, page, model: { buildingId: id } }).then(res => { |
| | | this.list = res.records |
| | | this.pagination.total = res.total |
| | | }) |
| | | }, |
| | | editClick(row) { |
| | |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | | <el-table-column prop="projectName" label="项ç®" min-width="100px"></el-table-column> |
| | | <el-table-column prop="buildingName" label="楼å®" min-width="70px"></el-table-column> |
| | | <el-table-column prop="floor" label="楼å±" min-width="60px"></el-table-column> |
| | | <el-table-column prop="floorName" label="楼å±" min-width="60px"></el-table-column> |
| | | <el-table-column prop="roomNum" label="æ¿å·" min-width="60px"></el-table-column> |
| | | <el-table-column prop="rentArea" label="计ç§é¢ç§¯(m²)" min-width="80px"></el-table-column> |
| | | <el-table-column prop="feeArea" label="计费é¢ç§¯(m²)" min-width="80px"></el-table-column> |
| | |
| | | <template> |
| | | <GlobalWindow width="800px" :title="title" :visible.sync="visible" :confirm-working="isWorking" @confirm="confirm"> |
| | | <GlobalWindow width="800px" :title="title" :visible.sync="visible" @close="close" :confirm-working="isWorking" @confirm="confirm"> |
| | | <el-form :model="form" ref="form" :rules="rules"> |
| | | <el-form-item label="ä½ç½®ç±»å" prop="areaType"> |
| | | <el-select v-model="form.areaType"> |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="éæ©æ¥¼å±" prop="floorId"> |
| | | <el-form-item v-if="form.areaType == 1" label="éæ©æ¥¼å±" prop="floorId"> |
| | | <el-select v-model="form.floorId"> |
| | | <el-option v-for="item in levelList" clearable filterable :label="item.name" :value="item.id" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item v-if="form.areaType == 0" label="éæ©æ¿é´" prop="roomId"> |
| | | <el-select v-model="form.roomId" clearable filterable> |
| | | <el-option v-for="item in roomList" :label="item.name" :value="item.id" /> |
| | | <el-option v-for="item in roomList" :label="item.roomNum" :value="item.id" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="åç±»" prop="cateId"> |
| | |
| | | import { getProjectList } from '@/api/project/ywProject' |
| | | import { getBuildList } from '@/api/project/ywBuilding' |
| | | import { getRoomList } from '@/api/project/ywRoom' |
| | | import { fetchList } from '@/api/project/yeFloor' |
| | | import { getFloorList } from '@/api/project/yeFloor' |
| | | import { fetchList as getCateList } from '@/api/business/category.js' |
| | | import { rules } from './config' |
| | | export default { |
| | |
| | | uploadImgUrl: process.env.VUE_APP_API_PREFIX + '/visitsAdmin/cloudService/public/uploadBatch', |
| | | fileList: [], |
| | | uploadData: { |
| | | folder: 'HIDDEN_DANGER_FILE' |
| | | folder: 'YW_WORKORDER_FILE' |
| | | }, |
| | | } |
| | | }, |
| | |
| | | } |
| | | }) |
| | | }, |
| | | close() { |
| | | this.visible = false |
| | | this.$emit('close') |
| | | }, |
| | | getProject() { |
| | | getProjectList({}).then(res => { |
| | | this.projectList = res |
| | |
| | | changeBuild(e) { |
| | | this.$set(this.form, 'floorId', '') |
| | | this.$set(this.form, 'roomId', '') |
| | | if(this.form.areaType == 1){ |
| | | this.getLevel(e) |
| | | }else{ |
| | | this.getRoom(e) |
| | | } |
| | | |
| | | |
| | | }, |
| | | getLevel(buildingId) { |
| | | fetchList({ model: { buildingId }, capacity: 9999, page: 1 }).then(res => { |
| | | this.levelList = res.records |
| | | getFloorList({ buildingId}).then(res => { |
| | | this.levelList = res |
| | | }) |
| | | }, |
| | | getRoom(buildingId) { |
| | |
| | | }else{ |
| | | this.$set(this.form, 'cateId', '') |
| | | } |
| | | |
| | | }, |
| | | getCate() { |
| | | getCateList({ |
| | |
| | | fileurlFull: item.url |
| | | }) |
| | | } |
| | | console.log('file', this.fileList) |
| | | // this.$set(this.param, 'faceImg', file.imgurl) |
| | | |
| | | // console.log('file', this.fileList) |
| | | this.$set(this.form, 'fileList', this.fileList) |
| | | // this.$set(this.param, 'faceImgUrl', file.imgurlfull) |
| | | }, |
| | | handleDelImg(i) { |
| | | this.fileList.splice(i, 1) |
| | | this.$set(this.form, 'fileList', this.fileList) |
| | | }, |
| | | close() { |
| | | this.isShowModal = false |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <GlobalWindow width="820px" title="å·¥å详æ
" :visible.sync="visible" :confirm-working="isWorking" @close="close" |
| | | @confirm="confirm"> |
| | | <div class="main"> |
| | | <div class="title"> |
| | | <span>å·¥å详æ
</span> |
| | | <div> |
| | | <div class="status primaryColor" v-if="info.dealStatus == 0 || info.dealStatus == null">å¾
ææ´¾</div> |
| | | <div class="status" v-if="info.dealStatus == 1">å·²ææ´¾</div> |
| | | <div class="status gray" v-if="info.dealStatus == 2">å·²å¤ç</div> |
| | | </div> |
| | | </div> |
| | | <div class="list"> |
| | | <div class="item"> |
| | | <div class="la">ä½ç½®ç±»å</div> |
| | | <div class="val">{{ info.areaType == 0 ? '室å
ç»´ä¿®' : 'å
Œ
±ç»´ä¿®' }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div class="la">对åºä½ç½®</div> |
| | | <div class="val">{{ info.buildingName }} / {{ info.roomNum || info.floorName }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div class="la">å·¥åç±»å«</div> |
| | | <div class="val">{{ info.categoryName }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div class="la">䏿¥äºº</div> |
| | | <div class="val">{{ info.creatorName }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div class="la">䏿¥äººçµè¯</div> |
| | | <div class="val">{{ info.creatorPhone }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div class="la">䏿¥æ¶é´</div> |
| | | <div class="val">{{ info.createDate }}</div> |
| | | </div> |
| | | <div class="item max"> |
| | | <div class="la">ä¸é¨æ¶é´</div> |
| | | <div class="val">{{ info.getDate }}</div> |
| | | </div> |
| | | <div class="item max"> |
| | | <div class="la">é®é¢æè¿°</div> |
| | | <div class="val">{{ info.content }}</div> |
| | | </div> |
| | | <div class="item max"> |
| | | <div class="la">é®é¢å¾ç</div> |
| | | <div class="value" v-if="info.fileList == null || !info.fileList.length">æ </div> |
| | | <div class="value" v-if="info.fileList != null && info.fileList.length"> |
| | | <div v-for="item in info.fileList" :key="item.id" style="display: inline;margin-right: 20px"> |
| | | <video v-if="item.fileurlFull && item.fileurlFull.endsWith('.mp4')" ref="videoRef" controls preload="auto" |
| | | style="width: 80px;height: 80px;object-fit: contain;" :src="item.fileurlFull" /> |
| | | <el-image v-else-if="item.fileurlFull" style="width:80px; height: 80px" :src="item.fileurlFull" |
| | | :preview-src-list="[item.fileurlFull]"> |
| | | </el-image> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="title">å·¥åå¤ç</div> |
| | | <el-form :model="param" ref="form" :rules="rules"> |
| | | <template v-if="info.dealStatus == 0 || info.dealStatus == null"> |
| | | <el-form-item label="å¤çæ¹å¼" prop="dealType"> |
| | | <div> |
| | | <el-radio v-model="param.dealType" :label="0">ææ´¾</el-radio> |
| | | <el-radio v-model="param.dealType" :label="1">ç´æ¥åå¤</el-radio> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item v-if="param.dealType == 0" label="ææ´¾ç»" prop="dealUserId"> |
| | | <el-select v-model="param.dealUserId" clearable filterable class="w400"> |
| | | <el-option v-for="item in staffList" :label="item.realname" :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item v-if="param.dealType == 1" label="åå¤å
容" prop="dealInfo"> |
| | | <el-input type="textarea" class="w400" :rows="4" v-model="param.dealInfo" placeholder="请填å说æ"></el-input> |
| | | </el-form-item> |
| | | </template> |
| | | <template v-if="info.dealStatus == 1 && info.dealUserId === userInfo.id"> |
| | | <el-form-item label="å¤çæ¶é´" prop="getDate"> |
| | | <el-date-picker type="datetime" class="w400" v-model="param.getDate" format="yyyy-MM-dd HH:mm" |
| | | value-format="yyyy-MM-dd HH:mm:ss" placeholder="è¯·éæ©"></el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="åå¤å
容" prop="dealInfo"> |
| | | <el-input type="textarea" class="w400" :rows="4" v-model="param.dealInfo" placeholder="请填å说æ"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="ç°åºå¾ç"> |
| | | <div class="file_list"> |
| | | <el-upload class="avatar-uploader" :data="uploadData" multiple :limit="6" :auto-upload="true" :action="uploadImgUrl" |
| | | :show-file-list="false" :on-success="uploadAvatarSuccess" :on-error="uploadError" |
| | | :before-upload="beforeUpload"> |
| | | <div class="upload_wrap"> |
| | | <i class="el-icon-plus avatar-uploader-icon"></i> |
| | | <div>å¾ç/è§é¢</div> |
| | | </div> |
| | | </el-upload> |
| | | <div v-for="(item, i) in dealFileList" :key="i" class="item"> |
| | | <i @click="handleDelImg(i)" class="el-icon-error close"></i> |
| | | <el-image :src="item.fileurlFull" :preview-src-list="[item.fileurlFull]" v-if="item.type == 0" |
| | | class="img"></el-image> |
| | | <video :src="item.fileurlFull" controls v-if="item.type == 1" class="img"></video> |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | | </template> |
| | | <template v-if="info.dealStatus == 2"> |
| | | <div class="list"> |
| | | <div class="item item2"> |
| | | <div class="la">å¤çæ¶é´ï¼</div> |
| | | <div class="val">{{ info.getDate }}</div> |
| | | </div> |
| | | <div class="item item2"> |
| | | <div class="la">å¤ç夿³¨ï¼</div> |
| | | <div class="val">{{ info.dealInfo }}</div> |
| | | </div> |
| | | <div class="item item2"> |
| | | <div class="la">ç°åºç
§çï¼</div> |
| | | <div class="value" v-if="info.dealFileList == null || !info.dealFileList.length">æ </div> |
| | | <div class="value" v-if="info.dealFileList != null && info.dealFileList.length"> |
| | | <div v-for="item in info.dealFileList" :key="item.id" style="display: inline;margin-right: 20px"> |
| | | <video v-if="item.fileurlFull && item.fileurlFull.endsWith('.mp4')" ref="videoRef" controls |
| | | preload="auto" style="width: 80px;height: 80px;object-fit: contain;" :src="item.fileurlFull" /> |
| | | <el-image v-else-if="item.fileurlFull" style="width:80px; height: 80px" :src="item.fileurlFull" |
| | | :preview-src-list="[item.fileurlFull]"> |
| | | </el-image> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | </el-form> |
| | | </div> |
| | | </GlobalWindow> |
| | | </template> |
| | | |
| | | <script> |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import { detailById, dispatchOrder, dealOrder } from '@/api/workorder/ywWorkorder' |
| | | import { getUserList } from '@/api/system/user' |
| | | import { Message, Loading } from 'element-ui' |
| | | export default { |
| | | components: { |
| | | GlobalWindow |
| | | }, |
| | | extends: BaseOpera, |
| | | data() { |
| | | return { |
| | | id: '', |
| | | visible: false, |
| | | param: { |
| | | dealType: 0 |
| | | }, |
| | | info: {}, |
| | | rules: { |
| | | dealType: [{ required: true, message: 'è¯·éæ©' }], |
| | | dealUserId: [{ required: true, message: 'è¯·éæ©' }], |
| | | }, |
| | | staffList: [], |
| | | |
| | | uploadImgUrl: process.env.VUE_APP_API_PREFIX + '/visitsAdmin/cloudService/public/uploadBatch', |
| | | dealFileList: [], |
| | | uploadData: { |
| | | folder: 'HIDDEN_DANGER_FILE' |
| | | }, |
| | | } |
| | | }, |
| | | computed: { |
| | | userInfo() { |
| | | return this.$store.state.userInfo |
| | | } |
| | | }, |
| | | created() { |
| | | this.getStaff() |
| | | }, |
| | | methods: { |
| | | confirm() { |
| | | this.$refs['form'].validate((valid) => { |
| | | if (valid) { |
| | | const { param, id, dealFileList, info } = this |
| | | let fn = null |
| | | if(info.dealStatus == 0 || info.dealStatus == null){ |
| | | fn = param.dealType == 0 ? dispatchOrder : dealOrder |
| | | }else{ |
| | | fn = dealOrder |
| | | } |
| | | fn({ |
| | | id, |
| | | ...param, |
| | | dealFileList |
| | | }).then(res => { |
| | | Message.success('æäº¤æå') |
| | | this.visible = false |
| | | this.$emit('success') |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | getDetail() { |
| | | const { id } = this |
| | | detailById(id).then(res => { |
| | | this.info = res |
| | | }) |
| | | }, |
| | | getStaff() { |
| | | getUserList({}).then(res => { |
| | | this.staffList = res |
| | | }) |
| | | }, |
| | | beforeUpload(file) { |
| | | if (['video/mp4', 'video/ogg', 'video/flv', 'video/avi', 'video/wmv', 'video/rmvb', 'image/jpeg', 'image/jpg', 'image/png', 'image/gif'].indexOf(file.type) == -1) { |
| | | this.$message.error('请ä¸ä¼ æ£ç¡®çè§é¢/å¾çæ ¼å¼') |
| | | return false |
| | | } |
| | | if (this.dealFileList.length > 8) return Message.warning('ç°åºå¾çä¸è½è¶
è¿9å¼ ') |
| | | this.loadingInstance = Loading.service({ |
| | | lock: true, |
| | | text: 'Loading', |
| | | spinner: 'el-icon-loading', |
| | | background: 'rgba(0, 0, 0, 0.7)' |
| | | }) |
| | | }, |
| | | uploadError() { |
| | | this.$nextTick(() => { // 以æå¡çæ¹å¼è°ç¨ç Loading éè¦å¼æ¥å
³é |
| | | if (this.loadingInstance) { |
| | | this.loadingInstance.close() |
| | | } |
| | | }) |
| | | }, |
| | | uploadAvatarSuccess(file) { |
| | | this.$nextTick(() => { // 以æå¡çæ¹å¼è°ç¨ç Loading éè¦å¼æ¥å
³é |
| | | if (this.loadingInstance) { |
| | | this.loadingInstance.close() |
| | | } |
| | | }) |
| | | console.log('file', file) |
| | | const item = file.data[0] |
| | | if (['.mp4', '.avi', '.flv', '.wmv'].some(char => item.imgaddr.includes(char))) { |
| | | this.dealFileList.push({ |
| | | type: 1, |
| | | fileurl: item.imgaddr, |
| | | fileurlFull: item.url |
| | | }) |
| | | } else { |
| | | this.dealFileList.push({ |
| | | type: 0, |
| | | fileurl: item.imgaddr, |
| | | fileurlFull: item.url |
| | | }) |
| | | } |
| | | console.log('file', this.dealFileList) |
| | | // this.$set(this.param, 'faceImg', file.imgurl) |
| | | // this.$set(this.param, 'faceImgUrl', file.imgurlfull) |
| | | }, |
| | | handleDelImg(i) { |
| | | this.dealFileList.splice(i, 1) |
| | | }, |
| | | close() { |
| | | this.visible = false |
| | | this.$emit('close') |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import '@/assets/style/variables.scss'; |
| | | |
| | | .main { |
| | | padding-top: 20px; |
| | | |
| | | .title { |
| | | font-weight: 500; |
| | | font-size: 18px; |
| | | color: $primary-color; |
| | | margin-bottom: 10px; |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | .status { |
| | | padding: 0 6px; |
| | | height: 22px; |
| | | line-height: 22px; |
| | | border-radius: 2px; |
| | | border: 1px solid #00BA92; |
| | | color: #00BA92; |
| | | font-weight: 400; |
| | | font-size: 12px; |
| | | margin-left: 10px; |
| | | } |
| | | |
| | | .primaryColor { |
| | | border: 1px solid $primary-color; |
| | | } |
| | | |
| | | .gray { |
| | | color: gray; |
| | | border: 1px solid gray; |
| | | } |
| | | } |
| | | |
| | | .list { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | /* background: #F7F7F7; */ |
| | | border-radius: 2px; |
| | | padding: 15px 20px; |
| | | margin-bottom: 16px; |
| | | |
| | | .item { |
| | | width: 33.3%; |
| | | margin-bottom: 12px; |
| | | |
| | | .la { |
| | | color: #7f7f7f; |
| | | margin-top: 2px; |
| | | } |
| | | } |
| | | |
| | | .item2 { |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .max { |
| | | width: 100%; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .file_list { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | |
| | | .avatar-uploader { |
| | | width: 92px; |
| | | height: 92px; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | border: 1px dashed #d9d9d9; |
| | | } |
| | | |
| | | .item { |
| | | width: 92px; |
| | | max-height: 92px; |
| | | margin-left: 10px; |
| | | position: relative; |
| | | border: 1px dashed #d9d9d9; |
| | | border-radius: 4px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | |
| | | .close { |
| | | font-size: 20px; |
| | | position: absolute; |
| | | right: -10px; |
| | | top: -10px; |
| | | z-index: 111; |
| | | color: red; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .img { |
| | | width: 92px; |
| | | max-height: 92px; |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <TableLayout :permissions="['business:ywworkorder:query']"> |
| | | <!-- æç´¢è¡¨å --> |
| | | <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline> |
| | | <el-form-item prop="areaType"> |
| | | <el-form-item prop="areaType" label="ä½ç½®ç±»å«"> |
| | | <el-select v-model="searchForm.areaType"> |
| | | <el-option label="室å
ç»´ä¿®" value="0"></el-option> |
| | | <el-option label="å
Œ
±ç»´ä¿®" value="1"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="è¯·éæ©æ¥ä¿®åºå" prop="buildingId"> |
| | | <el-input v-model="searchForm.buildingId" placeholder="请è¾å
¥æå±é¡¹ç®ç¼ç ï¼å
³èyw_building)" |
| | | @keypress.enter.native="search"></el-input> |
| | | <el-form-item label="鿩项ç®" prop="projectId"> |
| | | <el-select v-model="searchForm.projectId" @change="getBuild" clearable filterable> |
| | | <el-option v-for="item in projectList" :label="item.name" :value="item.id" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item prop="cateId"> |
| | | <el-input v-model="searchForm.cateId" placeholder="æ¥ä¿®ç©åç±»å«" @keypress.enter.native="search"></el-input> |
| | | <el-form-item label="éæ©æ¥¼å®" prop="buildingId"> |
| | | <el-select v-model="searchForm.buildingId" clearable filterable> |
| | | <el-option v-for="item in buildList" :label="item.name" :value="item.id" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item prop="cateId" label="ç©åç±»å«"> |
| | | <el-cascader v-model="searchForm.areaIds" @change="changeSel" placeholder="è¯·éæ©å·¡æ£åºå" clearable |
| | | :options="cateList" :props="{ |
| | | label: 'name', |
| | | value: 'id', |
| | | children: 'childCategoryList' |
| | | }"></el-cascader> |
| | | </el-form-item> |
| | | <el-form-item label="æäº¤æ¥æ"> |
| | | <el-date-picker v-model="searchForm.selDate" @change="changeSelDate" format="yyyy-MM-dd" |
| | | value-format="yyyy-MM-dd" type="daterange"></el-date-picker> |
| | | </el-form-item> |
| | | |
| | | <section> |
| | | <el-button type="primary" @click="search">æç´¢</el-button> |
| | | <el-button type="primary" :loading="isWorking.export" v-permissions="['business:ywworkorder:exportExcel']" |
| | |
| | | <span v-if="scope.row.areaType == 1">å
Œ
񆧆</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="" label="æ¥ä¿®åºå" min-width="100px"></el-table-column> |
| | | <el-table-column prop="cateName" label="æ¥ä¿®ç©åç±»å" min-width="100px"></el-table-column> |
| | | <el-table-column prop="userName" label="䏿¥äºº" min-width="100px"></el-table-column> |
| | | <el-table-column prop="submitDate" label="䏿¥æ¶é´" min-width="100px"></el-table-column> |
| | | <el-table-column prop="" label="æ¥ä¿®åºå" min-width="100px"> |
| | | <template v-slot="scope"> |
| | | <span>{{ scope.row.buildingName }} / {{ scope.row.areaType == 0 ? scope.row.roomNum : scope.row.floorName |
| | | }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="categoryName" label="ç©åç±»å" min-width="100px"></el-table-column> |
| | | <el-table-column prop="creatorName" label="䏿¥äºº" min-width="100px"></el-table-column> |
| | | <el-table-column prop="createDate" label="䏿¥æ¶é´" min-width="100px"></el-table-column> |
| | | <el-table-column prop="dealUserName" label="å¤ç人" min-width="100px"></el-table-column> |
| | | <el-table-column label="å¤çç»æ" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | |
| | | <span v-if="row.dealStatus == 2">å·²å¤ç</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column v-if="containPermissions(['business:ywworkorder:update'])" |
| | | label="æä½" min-width="80" fixed="right"> |
| | | <el-table-column v-if="containPermissions(['business:ywworkorder:update'])" label="æä½" min-width="80" |
| | | fixed="right"> |
| | | <template slot-scope="{row}"> |
| | | <span class="primaryColor cu">æ¥ç详æ
</span> |
| | | <span @click="handleDetail(row)" class="primaryColor cu">æ¥ç详æ
</span> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <pagination @size-change="handleSizeChange" @current-change="handlePageChange" :pagination="tableData.pagination"> |
| | | </pagination> |
| | | </template> |
| | | <Detail v-if="showDetail" ref="DetailRef" @close="showDetail = false" @success="search" /> |
| | | <!-- æ°å»º/ä¿®æ¹ --> |
| | | <OperaYwWorkorderWindow ref="operaYwWorkorderWindow" @success="handlePageChange" /> |
| | | </TableLayout> |
| | |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import OperaYwWorkorderWindow from './components/OperaYwWorkorderWindow' |
| | | import Detail from './components/detail' |
| | | import { getBuildList } from '@/api/project/ywBuilding' |
| | | import { getProjectList } from '@/api/project/ywProject' |
| | | import { fetchList as getCateList } from '@/api/business/category.js' |
| | | export default { |
| | | name: 'YwWorkorder', |
| | | extends: BaseTable, |
| | | components: { TableLayout, Pagination, OperaYwWorkorderWindow }, |
| | | components: { TableLayout, Pagination,Detail, OperaYwWorkorderWindow }, |
| | | data() { |
| | | return { |
| | | // æç´¢ |
| | | showDetail: false, |
| | | searchForm: { |
| | | selDate: [], |
| | | areaType: '', |
| | | creator: '', |
| | | createDate: '', |
| | | editor: '', |
| | | editDate: '', |
| | | isdeleted: '', |
| | | title: '', |
| | | remark: '', |
| | | status: '', |
| | | sortnum: '', |
| | | content: '', |
| | | getDate: '', |
| | | areaIds: '', |
| | | projectId: '', |
| | | buildingId: '', |
| | | roomId: '', |
| | | userId: '', |
| | | phone: '', |
| | | submitDate: '', |
| | | cateId: '', |
| | | code: '', |
| | | dealStatus: '', |
| | | dispatchUserId: '', |
| | | dispatchDate: '', |
| | | dispatchInfo: '', |
| | | dealUserId: '', |
| | | dealDate: '', |
| | | dealInfo: '', |
| | | dealType: '' |
| | | } |
| | | }, |
| | | projectList: [], |
| | | buildList: [], |
| | | cateList: [], |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | 'field.main': 'id' |
| | | }) |
| | | this.search() |
| | | this.initData() |
| | | }, |
| | | methods: { |
| | | handleDetail(row) { |
| | | this.showDetail = true |
| | | this.$nextTick(() => { |
| | | this.$refs.DetailRef.visible = true |
| | | this.$refs.DetailRef.id = row.id |
| | | this.$refs.DetailRef.getDetail() |
| | | |
| | | }) |
| | | }, |
| | | initData() { |
| | | getProjectList({}).then(res => { |
| | | this.projectList = res |
| | | }) |
| | | getCateList({ |
| | | model: { type: 3 }, |
| | | capacity: 1000, |
| | | page: 1, |
| | | }).then(res => { |
| | | this.cateList = res.records || [] |
| | | }) |
| | | }, |
| | | getBuild(projectId) { |
| | | this.$set(this.searchForm, 'buildingId', '') |
| | | getBuildList({ projectId }).then(res => { |
| | | this.buildList = res |
| | | }) |
| | | }, |
| | | changeSel(e) { |
| | | if (e && e.length == 2) { |
| | | this.$set(this.searchForm, 'cateId', e[1]) |
| | | } else { |
| | | this.$set(this.searchForm, 'cateId', '') |
| | | } |
| | | }, |
| | | reset() { |
| | | this.searchForm = { |
| | | selDate: [], |
| | | areaType: '', |
| | | areaIds: '', |
| | | projectId: '', |
| | | buildingId: '', |
| | | cateId: '', |
| | | } |
| | | this.search() |
| | | }, |
| | | changeSelDate(e) { |
| | | if (e && e.length > 0) { |
| | | this.$set(this.searchForm, 'queryStartTime', e[0] + ' 00:00:00') |
| | | this.$set(this.searchForm, 'queryEndTime', e[1] + ' 23:59:59') |
| | | } else { |
| | | this.$set(this.searchForm, 'queryStartTime', '') |
| | | this.$set(this.searchForm, 'queryEndTime', '') |
| | | } |
| | | |
| | | }, |
| | | } |
| | | } |
| | | </script> |