index.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729
  1. <template>
  2. <com-head :options="headList" v-model="search.state.type" showCtrl>
  3. <el-form label-width="90px" inline="true">
  4. <el-form-item label="楼盘id:">
  5. <el-input v-model="search.state.fcbEstateId" placeholder="请输入"></el-input>
  6. </el-form-item>
  7. <el-form-item label="楼盘名稱:">
  8. <el-input v-model="search.state.estateName" placeholder="请输入"></el-input>
  9. </el-form-item>
  10. <el-form-item label="创建時間:">
  11. <el-date-picker
  12. v-model="createTime"
  13. type="daterange"
  14. range-separator="至"
  15. start-placeholder="开始日期"
  16. end-placeholder="结束日期">
  17. </el-date-picker>
  18. </el-form-item>
  19. <el-form-item label="更新時間:">
  20. <el-date-picker
  21. v-model="updateTime"
  22. type="daterange"
  23. range-separator="至"
  24. start-placeholder="开始日期"
  25. end-placeholder="结束日期">
  26. </el-date-picker>
  27. </el-form-item>
  28. <el-form-item label="审核時間:">
  29. <el-date-picker
  30. v-model="auditTime"
  31. type="daterange"
  32. range-separator="至"
  33. start-placeholder="开始日期"
  34. end-placeholder="结束日期">
  35. </el-date-picker>
  36. </el-form-item>
  37. <el-form-item label="状态:">
  38. <el-select v-model="mpStatus" placeholder="全部">
  39. <el-option v-for="(item) in status" :key="item.value" :label="item.name" :value="item.value"></el-option>
  40. </el-select>
  41. </el-form-item>
  42. <el-form-item class="searh-btns">
  43. <el-button @click="resetSearch">重置</el-button>
  44. <el-button type="primary" @click="search.submit">查询</el-button>
  45. <el-button type="primary" @click="exportExe" :disabled="!pag.state.total" v-if="auth.export">导出</el-button>
  46. </el-form-item>
  47. </el-form>
  48. </com-head>
  49. <div class="body-layer">
  50. <div class="body-head">
  51. <h3>
  52. <span>全部楼盘</span>
  53. </h3>
  54. <div>
  55. <template v-if="search.state.type === 1">
  56. <el-button type="primary" @click="oper.readyInsert" v-if="auth.addProject">创建</el-button>
  57. </template>
  58. <template v-else>
  59. <el-button type="primary">楼盘全景设置</el-button>
  60. <el-button type="primary" @click="oper.readyInsert">添加二手房</el-button>
  61. </template>
  62. <el-button type="primary" @click="dataList.deleteSelect" v-if="auth.deleteProject" :disabled="!dataList.state.length">删除</el-button>
  63. </div>
  64. </div>
  65. <el-table ref="multipleTable" :data="dataList.state" style="width: 100%" @selection-change="dataList.changeSelectRows">
  66. <el-table-column type="selection" width="55" @click.stop v-if="auth.deleteProject"></el-table-column>
  67. <!-- <el-table-column label="封面" v-slot:default="{ row }">
  68. <img :src="row.coverImagUrl" class="cover-img">
  69. </el-table-column> -->
  70. <el-table-column label="楼盘id" v-slot:default="{ row }">
  71. {{row.fcbEstateId}}
  72. </el-table-column>
  73. <el-table-column label="楼盘名稱" v-slot:default="{ row }">
  74. <a class="oper-link" v-if="row.houseId && ~[adoptStatus].indexOf(row.status)" @click="editHouse(row, 1)">{{row.estateName}}</a>
  75. <span v-else>{{row.estateName}}</span>
  76. </el-table-column>
  77. <!-- <el-table-column label="VR项目" v-slot:default="{ row }">
  78. <a class="oper-link" @click="openHouse(row)">{{row.houseTitle}}</a>
  79. </el-table-column> -->
  80. <el-table-column label="航拍数量" prop="building" v-slot:default="{ row }">
  81. {{row.building || 0}}
  82. </el-table-column>
  83. <el-table-column label="景观图数量" prop="garden" v-slot:default="{ row }">
  84. {{row.garden || 0}}
  85. </el-table-column>
  86. <el-table-column label="售楼处数量" prop="sales" v-slot:default="{ row }">
  87. {{row.sales || 0}}
  88. </el-table-column>
  89. <el-table-column label="样板间数量" prop="house" v-slot:default="{ row }">
  90. {{row.house || 0}}
  91. </el-table-column>
  92. <el-table-column label="讲房售楼处数量" prop="points" v-slot:default="{ row }">
  93. {{row.saleVideos || 0}}
  94. </el-table-column>
  95. <el-table-column label="讲房样板间数量" prop="points" v-slot:default="{ row }">
  96. {{row.houseVideos || 0}}
  97. </el-table-column>
  98. <el-table-column label="讲房点位数量" prop="points" v-slot:default="{ row }">
  99. {{row.points || 0}}
  100. </el-table-column>
  101. <el-table-column label="创建人" prop="createByName"></el-table-column>
  102. <el-table-column label="创建時間" prop="createTime"></el-table-column>
  103. <el-table-column label="更新時間" prop="updateTime"></el-table-column>
  104. <el-table-column label="状态" v-slot:default="{row}" width="90">
  105. <div class="status" :class="{interactive: row.countNum > 0}" @click="row.countNum > 0 && selectRow(row)">
  106. <span>{{row.status === adoptStatus ? Number(row.online) ? '已上线': '已审核' : getStatusName(row.status)}}</span>
  107. <template v-if="row.countNum > 0">
  108. <i class="el-icon-document" v-if="row.status !== noAdoptStatus && row.status !== noComAdoptStatus"></i>
  109. <i class="el-icon-warning-outline error" v-else></i>
  110. </template>
  111. </div>
  112. </el-table-column>
  113. <el-table-column label="审核人" prop="auditorName"></el-table-column>
  114. <el-table-column label="审核時間" prop="auditTime"></el-table-column>
  115. <el-table-column label="操作" width="180" v-slot:default="{row}">
  116. <span
  117. class="oper-span"
  118. @click="(row.houseId && ~[draftStatus, noAdoptStatus, noComAdoptStatus].indexOf(row.status)) && editHouse(row)"
  119. :class="{disable: !row.houseId || !~[draftStatus, noAdoptStatus, noComAdoptStatus].indexOf(row.status)}"
  120. v-if="auth.updateProject"
  121. >
  122. 编辑
  123. </span>
  124. <span
  125. class="oper-span"
  126. @click="row.houseId && ~[adoptStatus].indexOf(row.status) && editHouse(row, 1)"
  127. :class="{disable: !row.houseId || (!~[adoptStatus].indexOf(row.status))}" >
  128. 查看
  129. </span>
  130. <!-- <span
  131. class="oper-span"
  132. @click="~[draftStatus, noAdoptStatus, noComAdoptStatus].indexOf(row.status) && editHouse(row)"
  133. :class="{disable: !~[draftStatus, noAdoptStatus, noComAdoptStatus].indexOf(row.status)}"
  134. v-if="auth.deleteProject">
  135. 删除
  136. </span>
  137. -->
  138. <span
  139. v-if="(auth.online && Number(row.online) !== 1) || (auth.offline && Number(row.online) === 1)"
  140. class="oper-span"
  141. :class="{disable: row.status !== adoptStatus}"
  142. @click="row.status === adoptStatus && offlineItem(row)">
  143. {{Number(row.online) === 1 ? '下线' : '上线' }}
  144. </span>
  145. <span
  146. class="oper-span"
  147. v-if="user.role !== 'group'"
  148. :class="{disable: !row.houseId || user.role === 'group' || adoptStatus === row.status}"
  149. @click.stop="(row.houseId && user.role !== 'group' && row.status !== adoptStatus) && examine(row)">
  150. {{ ~[draftStatus, noAdoptStatus, adoptStatus, noComAdoptStatus].indexOf(row.status) ? '提审' : '撤回'}}
  151. </span>
  152. <span class="oper-span" @click.stop="row.houseId && shareRow(row)" :class="{disable: !row.houseId}">预览</span>
  153. </el-table-column>
  154. </el-table>
  155. <com-pagination
  156. @size-change="pag.sizeChange"
  157. @current-change="pag.currentChange"
  158. :current-page="pag.state.currPage"
  159. :page-size="pag.state.size"
  160. layout="total, sizes, prev, pager, next, jumper"
  161. :total="pag.state.total"/>
  162. </div>
  163. <com-record v-model:show="recordData.show" :data="recordData.id" v-if="recordData.show" />
  164. <com-share
  165. :setLogo="auth.updateProject"
  166. v-if="shareData.show"
  167. v-model:show="shareData.show"
  168. :items="shareData.data" />
  169. <com-up-select
  170. v-if="upData.show"
  171. :items="upData.data"
  172. v-model:show="upData.show"
  173. v-model="upData.value"
  174. @online="offlineItem(upData.row, true)"
  175. />
  176. <com-dialog :title="operTitle" v-model:show="oper.state.show" @submit="oper.insert" @quit="oper.quit">
  177. <div class="add-input" v-if="search.state.type === 1">
  178. <label for="add-name"><span>*</span>楼盘名稱:</label>
  179. <el-input v-model="oper.state.name" name="add-name"></el-input>
  180. </div>
  181. <select-vr v-model="oper.state.vrs" v-else />
  182. </com-dialog>
  183. <com-dialog
  184. :title="operTitle" v-model:show="oper.state.show" @submit="insertItem" @quit="oper.quit"
  185. >
  186. <el-form ref="form" :model="form" label-width="100px" class="info-from">
  187. <el-form-item label="楼盘名稱:" class="mandatory" style="margin-top:60px">
  188. <el-autocomplete
  189. popper-class="my-autocomplete"
  190. class="inline-input"
  191. v-model="oper.state.estateName"
  192. :fetch-suggestions="searchName"
  193. @focus="oper.state.fcbEstateId = ''"
  194. placeholder="楼盘名稱:"
  195. @select="handleSelect"
  196. >
  197. <template v-slot="{ item }">
  198. <div class="item-layout" :class="{disable: item.disable}" @click="$event => clickEstateItem($event, item)">
  199. <div class="name">{{ item.prodName }}</div>
  200. <span class="addr">{{ item.prodId }}</span>
  201. </div>
  202. </template>
  203. </el-autocomplete>
  204. <!--
  205. <el-select
  206. v-model="oper.state.fcbEstateId"
  207. filterable
  208. placeholder="楼盘名稱:"
  209. class="estate-search"
  210. :filter-method="searchName"
  211. @focus="focuHandle">
  212. <el-option v-for="item in names" :key="item.prodId" :label="item.prodName" :value="item.prodId" />
  213. </el-select> -->
  214. </el-form-item>
  215. <!-- <el-form-item label="所属公司:" class="mandatory">
  216. <com-company v-model="oper.state.belongCompanyId" v-model:label="oper.state.belongCompanyName" hideAll />
  217. </el-form-item> -->
  218. </el-form>
  219. </com-dialog>
  220. </template>
  221. <script>
  222. import axios from 'axios'
  223. import {computed, ref, watch, watchEffect} from 'vue'
  224. import getTableState, {getParams} from '@/state/tableRef'
  225. import comHead from "@/components/head";
  226. import comDialog from "@/components/dialog";
  227. import comShare from "./share";
  228. import comUpSelect from "./up-select";
  229. import comRecord from "@/components/record";
  230. import auth from "@/state/viewAuth";
  231. import comPagination from "@/components/pagination";
  232. import router from '@/router'
  233. import { dateFormat } from '@/util'
  234. import selectVR from "./select-VR";
  235. import user from '@/state/user'
  236. import {
  237. EXAMINE_SHOW_SELECT_STATUS,
  238. EXAMINE_DRAFT_STATUS,
  239. HOUSE_TYPE,
  240. UN_REQ_NUM,
  241. EXAMINE_NO_ADOPT_STATUS,
  242. EXAMINE_NO_AUDIT_STATUS,
  243. EXAMINE_NO_ADOPT_ALL_STATUS,
  244. EXAMINE_NO_COM_ADOPT_STATUS,
  245. EXAMINE_ADOPT_STATUS,
  246. EXANINE_SUCCESS_STATUS,
  247. getName,
  248. } from '@/constant'
  249. import {
  250. estateOnline,
  251. hasHouseIsDel,
  252. getEstateByHouseId,
  253. getHouseList,
  254. updateHouse,
  255. exportHouseList,
  256. deleteHouse,
  257. getHouseIdAll,
  258. auditHouse,
  259. dismissHouse,
  260. insertHouse,
  261. uploadHouseLogo,
  262. getHouseShares,
  263. getHouseUpShares,
  264. getHdEstateNames
  265. } from '@/request/config'
  266. const getTimeMapSearch = (searchKey, search) => {
  267. const time = ref(null)
  268. const start = `${searchKey}StartTime`
  269. const end = `${searchKey}EndTime`
  270. watch(time, () => {
  271. if (time.value) {
  272. search.value.state[start] = dateFormat(new Date(time.value[0]), 'yyyy-MM-dd hh:mm:ss').toString()
  273. search.value.state[end] = dateFormat(new Date(time.value[1]), 'yyyy-MM-dd 23:59:59').toString()
  274. } else {
  275. search.value.state[start] = search.value.state[end] = ''
  276. }
  277. })
  278. watch(
  279. () => search.value.state[start],
  280. () => {
  281. if (!search.value.state[start]) {
  282. time.value = null
  283. }
  284. }
  285. )
  286. watch(
  287. () => search.value.state[end],
  288. () => {
  289. if (!search.value.state[end]) {
  290. time.value = null
  291. }
  292. }
  293. )
  294. return time
  295. }
  296. export default {
  297. name: 'housing',
  298. setup() {
  299. const mpStatus = ref(UN_REQ_NUM)
  300. const headList = ref(HOUSE_TYPE)
  301. const state = getTableState({
  302. getUrl: getHouseList,
  303. updateUrl: updateHouse,
  304. insertUrl: insertHouse,
  305. delUrl: deleteHouse,
  306. pagAttr: {listMap: {houseId: 'id'}},
  307. operAttr: { name: '', vrs: [2, 3], fcbEstateId: "", estateName: '' },
  308. searchAttr: {
  309. fcbEstateId: null,
  310. estateName: null,
  311. createStartTime: null,
  312. createEndTime: null,
  313. updateStartTime: null,
  314. statuslist: '',
  315. status: mpStatus.value,
  316. updateEndTime: null,
  317. auditTimeStartTime: null,
  318. auditTimeEndTime: null,
  319. type: headList.value[0].value,
  320. estateId: router.currentRoute.value.params.id
  321. }
  322. })
  323. watchEffect(() => {
  324. if (mpStatus.value === EXANINE_SUCCESS_STATUS) {
  325. state.search.value.state.statuslist = EXAMINE_ADOPT_STATUS + ''
  326. state.search.value.state.online = 0
  327. } else if (mpStatus.value === EXAMINE_ADOPT_STATUS) {
  328. state.search.value.state.online = 1
  329. state.search.value.state.statuslist = mpStatus.value + ''
  330. } else if (mpStatus.value === EXAMINE_NO_ADOPT_ALL_STATUS) {
  331. state.search.value.state.online = ''
  332. state.search.value.state.statuslist = [EXAMINE_NO_COM_ADOPT_STATUS, EXAMINE_NO_ADOPT_STATUS].join(',')
  333. } else if (mpStatus.value === UN_REQ_NUM){
  334. state.search.value.state.statuslist = ''
  335. } else {
  336. state.search.value.state.online = ''
  337. state.search.value.state.statuslist = mpStatus.value + ''
  338. }
  339. })
  340. const operTitle = computed(
  341. () => state.search.value.state.type === 1 ?
  342. (
  343. (state.oper.value.state.id ? '修改' : '新增') + '新房'
  344. ) :'选择二手房VR模型'
  345. )
  346. state.dataList.value._delete = async (data) => {
  347. await axios.post(deleteHouse, {}, {params: {estateId: data.estateId} })
  348. }
  349. const names = ref([])
  350. const initNames = ref([])
  351. const searchName = async (keyword = '', cb) => {
  352. if (keyword === '') return cb && cb([])
  353. let {data: existsIds} = await axios.get(getHouseIdAll)
  354. cb && cb(names.value.map(item => ({...item, value: item.prodName})));
  355. let res = await axios.post(getHdEstateNames, {prodName: keyword, size: 100})
  356. names.value = res.data.records
  357. if (!keyword) {
  358. initNames.value = names.value
  359. }
  360. cb && cb(names.value.map(item => ({...item, value: item.prodName, disable: !!~existsIds.indexOf(item.prodId)})))
  361. }
  362. return {
  363. ...state,
  364. headList,
  365. operTitle,
  366. auth,
  367. mpStatus,
  368. user,
  369. searchName,
  370. initNames,
  371. names,
  372. createTime: getTimeMapSearch('create', state.search),
  373. updateTime: getTimeMapSearch('update', state.search),
  374. auditTime: getTimeMapSearch('auditTime', state.search)
  375. };
  376. },
  377. data() {
  378. return {
  379. estateName: '',
  380. status: EXAMINE_SHOW_SELECT_STATUS,
  381. draftStatus: EXAMINE_DRAFT_STATUS,
  382. noAdoptStatus: EXAMINE_NO_ADOPT_STATUS,
  383. noComAdoptStatus: EXAMINE_NO_COM_ADOPT_STATUS,
  384. noAuditStatus: EXAMINE_NO_AUDIT_STATUS,
  385. adoptStatus: EXAMINE_ADOPT_STATUS,
  386. recordData: { show: false, id: 0 },
  387. shareData: { show: false, data: 0, list: [] },
  388. upData: {show: false, data: 0, value: {init: null, vrList: []}, row: null}
  389. }
  390. },
  391. methods: {
  392. async offlineItem(data, isSelect = false) {
  393. if (data.auditStatus === 0) return;
  394. let online = Number(!data.online)
  395. if (!online) {
  396. console.log('--------', data)
  397. let res = await axios.post(hasHouseIsDel, {prodId: data.fcbHouseId})
  398. if (!res.data) {
  399. return this.$alert('下线失败', '提示')
  400. }
  401. if (!(await this.$msgbox({
  402. message: '下线后VR链接将无法继续访问,确定要下线吗?',
  403. title: '下线',
  404. showCancelButton: true,
  405. confirmButtonText: '下线',
  406. cancelButtonText: '取消',
  407. }))) {
  408. return;
  409. }
  410. } else if (!isSelect){
  411. let res = await axios.get(getHouseUpShares, { params: {houseId: data.id} })
  412. this.upData.show = true
  413. this.upData.data = res.data
  414. this.upData.row = data
  415. return;
  416. }
  417. let requestOnlineList = []
  418. if (online) {
  419. requestOnlineList.push(
  420. this.upData.data.find(({id}) => id === this.upData.value.init)
  421. )
  422. requestOnlineList.push(
  423. ...this.upData.value.vrList.map(id => this.upData.data.find(({id: qid}) => qid === id))
  424. )
  425. requestOnlineList = requestOnlineList.map(item => ({
  426. ...item,
  427. isDomeVideo: Number(!!data.points)
  428. }))
  429. }
  430. await axios.post(estateOnline, { houseId: data.id, online: online, requestOnlineList }, {params: {}})
  431. data.online = online
  432. this.$alert((online ? '上' : '下') + '线成功', '提示')
  433. this.dataList.refer()
  434. this.upData.show = false
  435. this.upData.data = null
  436. this.upData.row = null
  437. },
  438. async exportExe() {
  439. let params = {
  440. ...getParams(this.search.state),
  441. pageNum: this.pag.state.currPage,
  442. pageSize: this.pag.state.size
  443. }
  444. if (!params.createStartTime || !params.createEndTime) {
  445. return this.$alert('请先选择创建時間段', '提示')
  446. } else {
  447. const monthDiff = (startDate, endDate) => Math.max(0, (endDate.getFullYear() - startDate.getFullYear()) * 12 - startDate.getMonth() + endDate.getMonth());
  448. if (monthDiff(this.createTime[0], this.createTime[1]) > 2) {
  449. return this.$alert('最多支持导出连续三个月的数据', '提示')
  450. }
  451. }
  452. let res = await axios.get(exportHouseList, { params })
  453. location.href = res.data
  454. },
  455. clickEstateItem(ev, item) {
  456. if (item.disable) {
  457. ev.stopPropagation()
  458. }
  459. },
  460. getStatusName: getName(EXAMINE_SHOW_SELECT_STATUS),
  461. async insertItem() {
  462. if (!this.oper.state.estateName) {
  463. return this.$alert('楼盘名稱不能为空!', '提示')
  464. }
  465. if (!this.oper.state.fcbEstateId.trim()) {
  466. let estate = this.names.find(({prodName}) => prodName === this.oper.state.estateName)
  467. if (!estate) {
  468. return this.$alert('无法匹配当前名稱的楼盘!', '提示')
  469. } else {
  470. this.oper.state.fcbEstateId = estate.prodId
  471. }
  472. }
  473. if (this.oper.state.id) {
  474. this.oper.update();
  475. } else {
  476. this.oper.insert();
  477. }
  478. },
  479. async changeLogo(file) {
  480. let res = await axios.post(uploadHouseLogo, {
  481. houseId: this.shareData.data.id,
  482. file
  483. })
  484. this.shareData.data = {...this.shareData.data, ...res.data}
  485. },
  486. selectRow(data) {
  487. this.recordData.show = true
  488. this.recordData.id = data.id
  489. },
  490. async shareRow(data, type = 1) {
  491. let res = await axios.get(getHouseShares, { params: {houseId: data.id} })
  492. let shareItems = []
  493. if (res.data) {
  494. shareItems = res.data.map(item => ({
  495. QrCode: item.icon,
  496. type: item.type,
  497. houseTitle: item.sceneTitle || data.houseTitle,
  498. epcVrLink: process.env.VUE_APP_DOMAIN + item.webSite.replace('hengda.html', 'epc.html'),
  499. vrLink: process.env.VUE_APP_DOMAIN + item.webSite,
  500. innerVrLink: process.env.VUE_APP_INTRANET_DOMAIN + item.webSite,
  501. online: data.online,
  502. status: data.status,
  503. }))
  504. }
  505. if (shareItems.length) {
  506. if (type === 1) {
  507. this.shareData.show = true
  508. this.shareData.data = shareItems
  509. } else {
  510. window.open(type === 1 ? shareItems[0].vrLink : shareItems[0].epcVrLink)
  511. }
  512. } else {
  513. await this.$confirm('暂无预览链接,请先设置初始场景。', '提示')
  514. }
  515. },
  516. openHouse(data) {
  517. return this.shareRow(data)
  518. // if (data.status === this.adoptStatus) {
  519. // window.open(data.vrLink)
  520. // } else {
  521. // window.open(data.innerVrLink)
  522. // }
  523. },
  524. async examine(data) {
  525. if (~[this.draftStatus, this.noAdoptStatus, this.adoptStatus, this.noComAdoptStatus].indexOf(data.status)) {
  526. await this.shareRow(data)
  527. if (!this.shareData.show) {
  528. return;
  529. }
  530. this.shareData.show = false
  531. let res = await axios.post(auditHouse, { houseId: data.id, auditHouseType: 1 })
  532. data.auditId = res.data.auditId
  533. this.$alert('提审成功', '提示')
  534. } else {
  535. await axios.post(dismissHouse, { houseId: data.id, auditHouseType: 1 })
  536. data.auditId = null
  537. this.$alert('撤销成功', '提示')
  538. }
  539. this.dataList.refer()
  540. },
  541. resetSearch() {
  542. let type = this.search.state.type
  543. this.search.reset()
  544. this.search.state.type = type
  545. },
  546. async insertHouse() {
  547. let res = await axios.post(insertHouse, {}, {params: {estateId: this.$route.params.id}})
  548. this.editHouse({id: res.data.houseId})
  549. },
  550. editHouse(item, isView = 0) {
  551. let link = process.env.VUE_APP_PREFIX + '/vrscene/edit.html?m=' + item.id + '&h=' + item.fcbEstateId + '&canView=' + isView
  552. window.open(link)
  553. }
  554. },
  555. watch: {
  556. '$route': {
  557. immediate: true,
  558. async handler(newVal, oldVal) {
  559. if (newVal.name !== "housing" || (this.search.state.estateId === newVal.params.id && oldVal)) return;
  560. try {
  561. this.search.state.estateId = newVal.params.id
  562. let res = await axios.get(getEstateByHouseId, { params: { estateId: newVal.params.id } })
  563. this.estateName = res.data.estateName
  564. this.fcbEstateId = res.data.fcbEstateId
  565. } catch (e) {
  566. this.$router.back()
  567. }
  568. }
  569. }
  570. },
  571. mounted() {
  572. this.searchName()
  573. },
  574. components: {
  575. "com-head": comHead,
  576. "com-dialog": comDialog,
  577. "select-vr": selectVR,
  578. "com-record": comRecord,
  579. "com-share": comShare,
  580. "com-pagination": comPagination,
  581. comUpSelect
  582. },
  583. };
  584. </script>
  585. <style lang="less">
  586. .my-autocomplete {
  587. li {
  588. line-height: normal;
  589. padding: 0 !important;
  590. .item-layout {
  591. padding: 7px !important;
  592. }
  593. .item-layout.disable {
  594. cursor: not-allowed;
  595. *{
  596. color: #c0c4cc;
  597. }
  598. }
  599. .name {
  600. text-overflow: ellipsis;
  601. overflow: hidden;
  602. line-height: 16px;
  603. }
  604. .addr {
  605. font-size: 12px;
  606. color: #b4b4b4;
  607. }
  608. .highlighted .addr {
  609. color: #ddd;
  610. }
  611. }
  612. }
  613. .info-from .el-form-item__content{
  614. width: calc(100% - 100px);
  615. }
  616. .info-from .el-form-item__content .inline-input {
  617. width: 100%;
  618. }
  619. </style>
  620. <style lang="scss" scoped>
  621. .add-input {
  622. width: 250px;
  623. margin: 40px auto;
  624. padding-left: 80px;
  625. position: relative;
  626. label {
  627. position: absolute;
  628. left: 0;
  629. top: 50%;
  630. transform: translateY(-50%);
  631. span {
  632. color: var(--primaryColor);
  633. }
  634. }
  635. }
  636. .cover-img {
  637. width: 32px;
  638. height: 32px;
  639. }
  640. .status {
  641. &.interactive {
  642. cursor: pointer;
  643. }
  644. i {
  645. vertical-align: text-bottom;
  646. margin-left: 5px;
  647. font-size: 1.2rem;
  648. color: rgb(144,144,150);
  649. &.error {
  650. color: var(--primaryColor);
  651. }
  652. }
  653. }
  654. </style>