repairsDetail.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817
  1. <template>
  2. <view class="incidentDetail">
  3. <view class="head">
  4. <view class="tab" :class="{active: tab.value === dataInfo.tabActiveValue}" v-for="tab in dataInfo.tabs" :key="tab.id" @click="clickTab(tab.value)">
  5. {{tab.name}}<text v-if="tab.num !== ''">({{tab.num}})</text>
  6. </view>
  7. </view>
  8. <scroll-view scroll-y class="body">
  9. <!-- 工单信息 -->
  10. <template v-if="dataInfo.tabActiveValue === '1'">
  11. <view class="detail_head">
  12. <text class="title">报修信息</text>
  13. <view class="other">
  14. <text class="priority" :style="priorityStyle(dataInfo.incidentData.priority)">{{dataInfo.incidentData.priority ? dataInfo.incidentData.priority.name + ' ' : ''}}</text>
  15. <view class="status" :style="stateStyle(dataInfo.incidentData.state)">{{dataInfo.incidentData.state ? dataInfo.incidentData.state.name : ''}}</view>
  16. </view>
  17. </view>
  18. <view class="detail_item_wrap">
  19. <view class="deital_item">
  20. <text class="name">故障描述:</text>
  21. <text class="value">{{dataInfo.incidentData.description || '无'}}</text>
  22. </view>
  23. <view class="deital_item">
  24. <text class="name">关联资产:</text>
  25. <text class="value">{{dataInfo.incidentData.assetDTO && dataInfo.incidentData.assetDTO.name || '无'}}</text>
  26. </view>
  27. <view class="deital_item">
  28. <text class="name">报修图片:</text>
  29. <view class="value img">
  30. <image class="imgItem" :src="img.thumbFilePath" mode="aspectFill" v-for="(img, i) in dataInfo.repairImgs" :key="i" @click="previewImg(i, 'repairImgs')"></image>
  31. <!-- <image class="imgItem" src="/static/img/300.jpg" v-for="(img, i) in dataInfo.repairVideo" :key="i" @click="videoView(img)"></image> -->
  32. </view>
  33. </view>
  34. <view class="deital_item">
  35. <text class="name">录音:</text>
  36. <view class="value img" v-if="dataInfo.repairAudio.length>0">
  37. <sy-audio class="resourceItem-audio" ref="audio" isCountDown :src="img.thumbFilePath" v-for="(img, i) in dataInfo.repairAudio" :key="i" ></sy-audio>
  38. </view>
  39. </view>
  40. <view class="deital_item">
  41. <text class="name">联系人:</text>
  42. <text class="value">{{dataInfo.incidentData.contacts || '无'}}</text>
  43. <text v-if="dataInfo.incidentData.contactsInformation" @click="makePhoneCall(dataInfo.incidentData.contactsInformation)">{{dataInfo.incidentData.contactsInformation}}<uni-icons type="phone-filled" class="phone-filled" :size="18" :color="primaryColor"></uni-icons></text>
  44. </view>
  45. <!-- <view class="deital_item">
  46. <text class="name">联系电话:</text>
  47. <view class="value" @click="makePhoneCall(dataInfo.incidentData.incomingPhone)" v-if="dataInfo.incidentData.incomingPhone">{{dataInfo.incidentData.incomingPhone}}<uni-icons type="phone-filled" class="phone-filled" :size="18" :color="primaryColor"></uni-icons></view>
  48. <text class="value" v-else>无</text>
  49. <uni-icons v-if="dataInfo.incidentData.callID" @click="attachmentClick" type="mic-filled" class="mic-filled" :size="22" :color="primaryColor"></uni-icons>
  50. </view> -->
  51. <view class="deital_item" v-if="isDept && isDept.valueconfig==1">
  52. <text class="name">报修科室:</text>
  53. <text class="value">{{dataInfo.incidentData.department ? dataInfo.incidentData.department.dept : '无'}}</text>
  54. </view>
  55. <view class="deital_item">
  56. <text class="name">详细地址:</text>
  57. <text class="value" v-if="dataInfo.incidentData.place || dataInfo.incidentData.houseNumber">{{dataInfo.incidentData.place ? (dataInfo.incidentData.place.building.buildingName + dataInfo.incidentData.place.floorName) : ''}}<text v-if="dataInfo.incidentData.place && dataInfo.incidentData.place.floorName">层</text> {{dataInfo.incidentData.houseNumber || ''}}</text>
  58. <text class="value" v-else>无</text>
  59. </view>
  60. <view class="deital_item">
  61. <text class="name">报修人:</text>
  62. <text class="value">{{dataInfo.incidentData.requester ? dataInfo.incidentData.requester.name : '无'}}</text>
  63. </view>
  64. <view class="deital_item">
  65. <text class="name">报修类型:</text>
  66. <text class="value" v-if="dataInfo.incidentData.repairIncidentType">{{dataInfo.incidentData.repairIncidentType.name}}</text>
  67. </view>
  68. </view>
  69. <view class="detail_head">
  70. <text class="title">处理信息</text>
  71. </view>
  72. <view class="detail_item_wrap" v-if="dataInfo.incidentData && dataInfo.isLoading">
  73. <view class="deital_item">
  74. <text class="name">处理人:</text>
  75. <text class="value" v-if="dataInfo.incidentData.state.value == 'pending' && dataInfo.incidentData.currentLog">{{dataInfo.incidentData.currentLog.workerName}}<text @click="makePhoneCall(dataInfo.incidentData.currentLog.workerPhone)" v-if="dataInfo.incidentData.currentLog.workerPhone">({{dataInfo.incidentData.currentLog.workerPhone}})<uni-icons type="phone-filled" class="phone-filled" :size="18" :color="primaryColor"></uni-icons></text></text>
  76. <text class="value" v-else-if="dataInfo.incidentData.state.value != 'pending' && dataInfo.incidentData.handlingPersonnelUser">{{dataInfo.incidentData.handlingPersonnelUser.name}}<text @click="makePhoneCall(dataInfo.incidentData.handlingPersonnelUser.phone)" v-if="dataInfo.incidentData.handlingPersonnelUser.phone">({{dataInfo.incidentData.handlingPersonnelUser.phone}})<uni-icons type="phone-filled" class="phone-filled" :size="18" :color="primaryColor"></uni-icons></text></text>
  77. <text class="value" v-else>无</text>
  78. </view>
  79. <!-- <view class="deital_item">
  80. <text class="name">处理人电话:</text>
  81. <view class="value" @click="makePhoneCall(dataInfo.incidentData.incomingPhone)" v-if="dataInfo.incidentData.incomingPhone">{{dataInfo.incidentData.incomingPhone}}<uni-icons type="phone-filled" class="phone-filled" :size="18" :color="primaryColor"></uni-icons></view>
  82. <text class="value" v-else>无</text>
  83. <uni-icons v-if="dataInfo.incidentData.callID" @click="attachmentClick" type="mic-filled" class="mic-filled" :size="22" :color="primaryColor"></uni-icons>
  84. </view> -->
  85. <view class="deital_item">
  86. <text class="name">处理图片:</text>
  87. <view class="value img">
  88. <image class="imgItem" :src="img.thumbFilePath" mode="aspectFill" v-for="(img, i) in dataInfo.handlerImgs" :key="i" @click="previewImg(i, 'handlerImgs')"></image>
  89. </view>
  90. </view>
  91. <view class="deital_item">
  92. <text class="name">维修总价:</text>
  93. <text class="value">{{dataInfo.incidentData.rsPrice === undefined ? '无' : dataInfo.incidentData.rsPrice + '元'}}</text>
  94. </view>
  95. </view>
  96. </template>
  97. <!-- 维修汇总单 -->
  98. <template v-if="dataInfo.tabActiveValue === '2'">
  99. <view class="detail_head">
  100. <text class="title">耗材清单</text>
  101. </view>
  102. <view class="summaryItem_bodyItem" v-for="item in dataInfo.summaryObj.consumableList" :key="item.id">
  103. <view class="summaryItem_bodyItem_top">
  104. <text class="name ellipsis">{{ item.consumableName }}<template v-if="item.consumableBrandModel">({{ item.consumableBrandModel }})</template></text>
  105. <text class="value">{{ item.consumableEndPrice }}元</text>
  106. </view>
  107. <view class="summaryItem_bodyItem_bottom">
  108. <text class="name">x{{ item.consumablesNum }}{{ item.consumablesUnit }}</text>
  109. <text class="value">总价{{item.consumablesNum * item.consumableEndPrice}}元</text>
  110. </view>
  111. </view>
  112. <view class="summaryItem_bodyItem_total">耗材总价:{{dataInfo.summaryObj.consumablePrice}}元</view>
  113. <view class="detail_head">
  114. <text class="title">工时清单</text>
  115. </view>
  116. <view class="summaryItem_bodyItem" v-for="item in dataInfo.summaryObj.workHourManagementList" :key="item.id">
  117. <view class="summaryItem_bodyItem_top">
  118. <text class="name ellipsis">{{ item.workName }}</text>
  119. <text class="value">{{ item.wage }}元</text>
  120. </view>
  121. <view class="summaryItem_bodyItem_bottom">
  122. <text class="name">x{{ item.workHourNum2 }}{{ item.workUnit }}</text>
  123. <text class="value">总价{{item.workHourNum2 * item.wage}}元</text>
  124. </view>
  125. </view>
  126. <view class="summaryItem_bodyItem_total">工时总价:{{dataInfo.summaryObj.workHourPrice}}元</view>
  127. <view class="summaryItem_total">汇总单总价:{{dataInfo.summaryObj.totalMaintenancePrice}}元</view>
  128. </template>
  129. <!-- 处理流程 -->
  130. <template v-if="dataInfo.tabActiveValue === '3'">
  131. <view class="process_item_wrap">
  132. <view class="process_item" v-for="item in dataInfo.incidentLogList" :key="item.id">
  133. <view class="process_item_top">
  134. <view class="name">{{item.logType ? item.logType.name : ''}}</view>
  135. <view class="value" v-if="item.remark">({{item.remark}})</view>
  136. </view>
  137. <view class="process_item_bottom">
  138. <text class="name">{{formatDate(item.startTime, 'yyyy-MM-dd HH:mm:ss')}}</text>
  139. <text class="value" v-if="item.appointorName">{{item.appointorName}}</text>
  140. </view>
  141. </view>
  142. </view>
  143. </template>
  144. <!-- 评价信息 -->
  145. <template v-if="dataInfo.tabActiveValue === '4'">
  146. <view class="detail_head">
  147. <text class="title">评价信息</text>
  148. </view>
  149. <view class="appraise_detail" v-for="item in dataInfo.resolveLogs" :key="item.id">
  150. <view class="appraise_detail_top">
  151. <text>{{formatDate(item.startTime, 'yyyy-MM-dd HH:mm:ss')}}</text>
  152. <view v-if="dataInfo.incidentData.wxdegree">
  153. <uni-rate readonly :value="dataInfo.incidentData.wxdegree.value" />
  154. </view>
  155. </view>
  156. <view class="appraise_detail_bottom">
  157. <text>{{item.remark}}</text>
  158. </view>
  159. </view>
  160. <view class="detail_head">
  161. <text class="title">回访信息</text>
  162. </view>
  163. <view class="appraise_detail" v-for="item in dataInfo.callbackLogs" :key="item.id">
  164. <view class="appraise_detail_top">
  165. <text>{{formatDate(item.startTime, 'yyyy-MM-dd HH:mm:ss')}}</text>
  166. <text v-if="dataInfo.incidentData.degree">{{dataInfo.incidentData.degree.name}}</text>
  167. </view>
  168. <view class="appraise_detail_bottom">
  169. <text>{{item.remark}}</text>
  170. </view>
  171. </view>
  172. </template>
  173. </scroll-view>
  174. <view class="foot_common_btns" v-if="dataInfo.incidentData && dataInfo.isLoading">
  175. <button @click="goBack" type="default" class="primaryButton btn">返回</button>
  176. <button v-if="dataInfo.incidentData.state.value=='accept'" @click="recall" type="default" class="primaryButton btn">撤销</button>
  177. </view>
  178. <IncidentAttachment v-if="dataInfo.isAttachment" @knowEmit="knowAttachment" :incidentData="dataInfo.incidentData"></IncidentAttachment>
  179. <uni-popup ref="inputDialog" background-color="#fff" type="center" :before-close="true">
  180. <view class="ch-class">撤销原因</view>
  181. <view class="popup-content">
  182. <input type="text" focus placeholder="请输入撤销原因" v-model="recallValue">
  183. </view>
  184. <view class="foot_common_btns">
  185. <button @click="closeDialog" size="mini" type="default" class="primaryButton btn">取消</button>
  186. <button @click="dialogInputConfirm" size="mini" type="default" class="primaryButton btn">确定</button>
  187. </view>
  188. </uni-popup>
  189. <uni-popup ref="popup" background-color="#fff" type="center" :before-close="true">
  190. <view class="popup-content">
  191. <video :src="videoUrl" controls></video>
  192. </view>
  193. <view class="foot_common_btns">
  194. <button @click="closePop" type="default" class="primaryButton btn">关闭</button>
  195. </view>
  196. </uni-popup>
  197. </view>
  198. </template>
  199. <script setup>
  200. import { ref, reactive } from 'vue'
  201. import IncidentAttachment from '@/components/IncidentAttachment.vue';
  202. import { onLoad, onShow } from '@dcloudio/uni-app'
  203. import { api_listAttachment, getFetchDataList, api_incidentDetail, api_repairCancel, api_querySummaryDoc, api_incidentLog } from "@/http/api.js"
  204. import { defaultColor } from '@/static/js/theme.js'
  205. import { useSetTitle } from '@/share/useSetTitle.js'
  206. import { useMakePhoneCall } from '@/share/useMakePhoneCall.js'
  207. import { useGoBack } from '@/share/useGoBack.js'
  208. import { useLoginUserStore } from '@/stores/loginUser'
  209. import { computedPriorityStyle } from '@/filters/computedPriorityStyle.js'
  210. import { computedStateStyle } from '@/filters/computedStateStyle.js'
  211. import { filterFormatDate } from '@/filters/filterFormatDate.js'
  212. useSetTitle();
  213. const loginUserStore = useLoginUserStore();
  214. const { makePhoneCall } = useMakePhoneCall();
  215. const { goBack } = useGoBack();
  216. const { priorityStyle } = computedPriorityStyle();
  217. const { stateStyle } = computedStateStyle();
  218. const { formatDate } = filterFormatDate();
  219. // 主题颜色
  220. const primaryColor = ref(defaultColor)
  221. // 撤回原因
  222. const recallValue = ref(null)
  223. const isDept = ref(null)
  224. const videoUrl = ref(null)
  225. const popup = ref(null)
  226. const inputDialog = ref(null)
  227. const stateId = ref(null)
  228. // 数据
  229. const dataInfo = reactive({
  230. tabs: [
  231. {id: 1, name: '工单信息', value: '1', num: ''},
  232. // {id: 2, name: '维修汇总单', value: '2', num: ''},
  233. {id: 3, name: '处理流程', value: '3', num: ''},
  234. {id: 4, name: '评价信息', value: '4', num: ''},
  235. ],
  236. tabActiveValue: 0,//当前选择的tab
  237. incidentId: undefined,//事件ID
  238. incidentData: {},//事件对象
  239. repairImgs: [],//报修图片
  240. repairVideo:[], //视频
  241. repairAudio:[], //录音
  242. handlerImgs: [],//处理图片
  243. summaryObj: {
  244. consumableList: [],//耗材列表
  245. workHourManagementList: [],//工时列表
  246. },//汇总单信息
  247. incidentLogList: [],//流程列表
  248. resolveLogs: [],//评价
  249. callbackLogs: [],//回访
  250. isAttachment: false,//录音开关
  251. summaryData: null,
  252. isLoading: false
  253. })
  254. // 点击录音
  255. function attachmentClick(){
  256. dataInfo.isAttachment = true;
  257. }
  258. // 返回录音
  259. function knowAttachment(){
  260. dataInfo.isAttachment = false;
  261. }
  262. // 获取汇总单信息
  263. function getSummaryList(){
  264. uni.showLoading({
  265. title: "加载中",
  266. mask: true,
  267. });
  268. let postData = {
  269. "incidentId": dataInfo.incidentId,
  270. };
  271. api_querySummaryDoc(postData).then(res => {
  272. uni.hideLoading();
  273. if(res.status == 200){
  274. dataInfo.summaryObj = {...{consumableList:[], workHourManagementList: []}, ...res };
  275. }else{
  276. uni.showToast({
  277. icon: 'none',
  278. title: res.msg || '请求数据失败!'
  279. });
  280. }
  281. })
  282. }
  283. // 获取流程列表
  284. function getIncidentLogList(){
  285. uni.showLoading({
  286. title: "加载中",
  287. mask: true,
  288. });
  289. let postData = {
  290. "idx": 0,
  291. "sum": 9999,
  292. "incidentLog": {
  293. "incidentId": dataInfo.incidentId,
  294. }
  295. };
  296. api_incidentLog(postData).then(res => {
  297. uni.hideLoading();
  298. if(res.status == 200){
  299. let incidentLogList = res.list || [];
  300. dataInfo.incidentLogList = incidentLogList;
  301. }else{
  302. uni.showToast({
  303. icon: 'none',
  304. title: res.msg || '请求数据失败!'
  305. });
  306. }
  307. })
  308. }
  309. function videoView(item){
  310. videoUrl.value = item.thumbFilePath
  311. setTimeout(_=>{
  312. popup.value.open()
  313. },100)
  314. }
  315. function closePop(){
  316. popup.value.close()
  317. }
  318. // 预览图片
  319. function previewImg(index, type){
  320. uni.previewImage({
  321. current: index,
  322. urls: dataInfo[type].map(v => v.thumbFilePath),
  323. longPressActions: {
  324. itemList: ['发送给朋友', '保存图片', '收藏'],
  325. success: function(data) {
  326. console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
  327. },
  328. fail: function(err) {
  329. console.log(err.errMsg);
  330. }
  331. }
  332. });
  333. }
  334. // 初始化表单
  335. function initForm(){
  336. if(dataInfo.tabActiveValue === '1'){
  337. getRepairImgs();
  338. getHandlerImgs();
  339. }else if(dataInfo.tabActiveValue === '2'){
  340. getSummaryList();
  341. }else if(dataInfo.tabActiveValue === '3'){
  342. getIncidentLogList();
  343. }else if(dataInfo.tabActiveValue === '4'){
  344. }
  345. }
  346. // 点击tab
  347. function clickTab(tabValue){
  348. if(dataInfo.tabActiveValue == tabValue){
  349. return;
  350. }
  351. dataInfo.tabActiveValue = tabValue;
  352. initForm()
  353. }
  354. // 获取事件详情
  355. function getIncidentDetail(){
  356. uni.showLoading({
  357. title: "加载中",
  358. mask: true,
  359. });
  360. api_incidentDetail(dataInfo.incidentId).then(res => {
  361. uni.hideLoading();
  362. if(res.status == 200){
  363. dataInfo.isLoading = true
  364. dataInfo.incidentData = res.data || {};
  365. stateId.value = res.data.state.id
  366. let logs = dataInfo.incidentData.logs || [];
  367. dataInfo.resolveLogs = logs.filter(v => v.logType.value == 'resolve').slice(0, 1);
  368. dataInfo.callbackLogs = logs.filter(v => v.logType.value == 'callback').slice(0, 1);
  369. // 维修汇总单
  370. if(dataInfo.incidentData.state.value == 'close' && dataInfo.summaryData.value == 1 && dataInfo.incidentData.summaryId){
  371. let flag = dataInfo.tabs.some(v => v.value === '2');
  372. !flag && dataInfo.tabs.splice(1, 0, {id: 2, name: '维修汇总单', value: '2', num: ''});
  373. }
  374. dataInfo.tabActiveValue = dataInfo.tabs[0].value;
  375. initForm()
  376. }else{
  377. uni.showToast({
  378. icon: 'none',
  379. title: res.msg || '请求数据失败!'
  380. });
  381. }
  382. })
  383. }
  384. // 获取报修图片
  385. function getRepairImgs(){
  386. uni.showLoading({
  387. title: "加载中",
  388. mask: true,
  389. });
  390. api_listAttachment('wechatRequesterIncident', dataInfo.incidentId).then(res => {
  391. res.data = res.data || [];
  392. res.data.forEach(v => {
  393. v.thumbFilePath = location.origin + "/file" + v.relativeFilePath;
  394. })
  395. dataInfo.repairImgs = res.data
  396. })
  397. api_listAttachment('wechatIncidentVideo', dataInfo.incidentId).then(res => {
  398. res.data = res.data || [];
  399. res.data.forEach(v => {
  400. v.thumbFilePath = location.origin + "/file" + v.relativeFilePath;
  401. })
  402. dataInfo.repairVideo = res.data
  403. })
  404. api_listAttachment('wechatIncidentRecord', dataInfo.incidentId).then(res => {
  405. uni.hideLoading();
  406. res.data = res.data || [];
  407. res.data.forEach(v => {
  408. v.thumbFilePath = location.origin + "/file" + v.relativeFilePath;
  409. })
  410. dataInfo.repairAudio = res.data
  411. })
  412. }
  413. // 获取处理图片
  414. function getHandlerImgs(){
  415. uni.showLoading({
  416. title: "加载中",
  417. mask: true,
  418. });
  419. api_listAttachment('incident', dataInfo.incidentId).then(res => {
  420. uni.hideLoading();
  421. res.data = res.data || [];
  422. res.data.forEach(v => {
  423. v.previewUrl = location.origin + "/file" + v.relativeFilePath;
  424. v.thumbFilePath = location.origin + "/file" + v.thumbFilePath;
  425. })
  426. dataInfo.handlerImgs = res.data;
  427. })
  428. }
  429. function closeDialog(){
  430. inputDialog.value.close()
  431. }
  432. function dialogInputConfirm(){
  433. if(!recallValue.value){
  434. uni.showToast({
  435. icon: 'none',
  436. title: '撤销原因不能为空'
  437. });
  438. return
  439. }
  440. uni.showLoading({
  441. title: "加载中",
  442. mask: true,
  443. });
  444. let query={
  445. incident: {...dataInfo.incidentData, ...{cancelRemark: recallValue.value}}
  446. }
  447. api_repairCancel(query).then(res=>{
  448. uni.hideLoading();
  449. if(res.state==200){
  450. inputDialog.value.close()
  451. uni.showToast({
  452. icon: 'none',
  453. title: '撤销成功'
  454. });
  455. setTimeout(_=>{
  456. goBack()
  457. },500)
  458. }else{
  459. uni.showToast({
  460. icon: 'none',
  461. title: res.msg
  462. });
  463. }
  464. })
  465. }
  466. function recall(){
  467. inputDialog.value.open()
  468. }
  469. onShow((option) =>{
  470. if(uni.getStorageSync('sysData')){
  471. let data = JSON.parse(uni.getStorageSync('sysData'))
  472. isDept.value = data.find(i=>i.keyconfig=='deptRepair')
  473. }
  474. // 获取是否开启汇总单、简易处理
  475. let postData = {
  476. idx: 0,
  477. sum: 9999,
  478. hospitalConfig:{
  479. hosId: loginUserStore.loginUser.user.currentHospital.id,
  480. model: "itsm"
  481. }
  482. };
  483. getFetchDataList("simple/data", "hospitalConfig", postData)
  484. .then((res) => {
  485. dataInfo.summaryData = res.list.find(i=>i.key=='itsmSummarySheet')
  486. getIncidentDetail();
  487. });
  488. })
  489. onLoad((option) => {
  490. dataInfo.incidentId = option.incidentId;
  491. // let data = JSON.parse(uni.getStorageSync('sysData'))
  492. // isDept.value = data.find(i=>i.keyconfig=='deptRepair')
  493. // // 获取是否开启汇总单、简易处理
  494. // let postData = {
  495. // idx: 0,
  496. // sum: 9999,
  497. // hospitalConfig:{
  498. // hosId: loginUserStore.loginUser.user.currentHospital.id,
  499. // model: "itsm"
  500. // }
  501. // };
  502. // getFetchDataList("simple/data", "hospitalConfig", postData)
  503. // .then((res) => {
  504. // dataInfo.summaryData = res.list.find(i=>i.key=='itsmSummarySheet')
  505. // getIncidentDetail();
  506. // });
  507. })
  508. </script>
  509. <style scoped>
  510. >>>.uni-input{
  511. height: 80rpx;
  512. background: #eee;
  513. }
  514. >>>.uni-popup .uni-popup__wrapper{
  515. padding: 20rpx 40rpx;
  516. border-radius: 5px;
  517. }
  518. </style>
  519. <style lang="scss" scoped>
  520. .ch-class{
  521. text-align: center;
  522. font-size: 32rpx;
  523. }
  524. .popup-content{
  525. padding: 40rpx;
  526. }
  527. .incidentDetail{
  528. height: 100%;
  529. display: flex;
  530. flex-direction: column;
  531. justify-content: space-between;
  532. .head{
  533. height: 88rpx;
  534. display: flex;
  535. position: fixed;
  536. z-index: 99;
  537. width: 100%;
  538. background-color: #fff;
  539. font-size: 30rpx;
  540. .tab{
  541. flex: 1;
  542. display: flex;
  543. justify-content: center;
  544. align-items: center;
  545. border-bottom: 4rpx solid transparent;
  546. position: relative;
  547. &:last-of-type{
  548. &:after{
  549. display: none;
  550. }
  551. }
  552. &:after{
  553. content: '';
  554. position: absolute;
  555. right: 0;
  556. top: 50%;
  557. transform: translateY(-50%);
  558. width: 1rpx;
  559. height: 44rpx;
  560. background-color: #515151;
  561. }
  562. &.active{
  563. color: $uni-primary;
  564. border-color: $uni-primary;
  565. }
  566. }
  567. }
  568. .body{
  569. margin-top: 88rpx;
  570. box-sizing: border-box;
  571. flex: 1;
  572. min-height: 0;
  573. border-top: 7rpx solid #EBEBEB;
  574. .phone-filled{
  575. margin-left: 5rpx;
  576. }
  577. .mic-filled{
  578. margin-right: 100rpx;
  579. }
  580. .detail_item_wrap{
  581. padding-bottom: 24rpx;
  582. }
  583. .detail_head{
  584. padding: 24rpx;
  585. border-top: 1rpx solid #D2D2D2;
  586. border-bottom: 1rpx solid #D2D2D2;
  587. display: flex;
  588. justify-content: space-between;
  589. align-items: center;
  590. &:first-of-type{
  591. border-top: none;
  592. }
  593. .title{
  594. font-size: 26rpx;
  595. color: $uni-primary;
  596. padding-left: 18rpx;
  597. position: relative;
  598. &:before{
  599. content: '';
  600. width: 8rpx;
  601. height: 25rpx;
  602. background-color: $uni-primary;
  603. position: absolute;
  604. left: 0;
  605. top: 50%;
  606. transform: translateY(-50%);
  607. }
  608. }
  609. .other{
  610. display: flex;
  611. align-items: center;
  612. .priority{
  613. font-size: 26rpx;
  614. margin-right: 15rpx;
  615. }
  616. .status{
  617. padding: 4rpx 10rpx;
  618. border-radius: 20rpx;
  619. background-color: #DBE8FE;
  620. font-size: 22rpx;
  621. color: #006CF9;
  622. }
  623. }
  624. }
  625. .deital_item{
  626. font-size: 26rpx;
  627. color: #555;
  628. padding: 24rpx 24rpx 0;
  629. display: flex;
  630. flex-wrap: wrap;
  631. align-items: center;
  632. .name{
  633. width: 8em;
  634. margin-right: 24rpx;
  635. }
  636. .value{
  637. flex: 1;
  638. word-break: break-all;
  639. &.img{
  640. display: flex;
  641. .imgItem{
  642. width: 150rpx;
  643. height: 150rpx;
  644. margin-right: 24rpx;
  645. &:last-of-type{
  646. margin-right: 0;
  647. }
  648. }
  649. .resourceItem-audio{
  650. width: 300rpx;
  651. height: 60rpx;
  652. }
  653. .videoItem{
  654. width: 150rpx;
  655. height: 150rpx;
  656. margin-right: 24rpx;
  657. &:last-of-type{
  658. margin-right: 0;
  659. }
  660. }
  661. }
  662. }
  663. }
  664. .summaryItem_bodyItem{
  665. padding: 24rpx 24rpx 0;
  666. font-size: 26rpx;
  667. .summaryItem_bodyItem_top{
  668. display: flex;
  669. justify-content: space-between;
  670. align-items: center;
  671. .value{
  672. padding-left: 48rpx;
  673. flex-shrink: 0;
  674. }
  675. }
  676. .summaryItem_bodyItem_bottom{
  677. margin-top: 24rpx;
  678. display: flex;
  679. justify-content: space-between;
  680. align-items: center;
  681. .name{
  682. text-align: right;
  683. flex: 1;
  684. }
  685. .value{
  686. width: 220rpx;
  687. text-align: right;
  688. flex-shrink: 0;
  689. }
  690. }
  691. }
  692. .summaryItem_bodyItem_total{
  693. text-align: right;
  694. padding: 24rpx;
  695. font-size: 26rpx;
  696. }
  697. .summaryItem_total{
  698. text-align: center;
  699. padding-top: 24rpx;
  700. font-size: 32rpx;
  701. font-weight: bold;
  702. color: $uni-primary;
  703. border-top: 1rpx solid #D2D2D2;
  704. }
  705. .process_item_wrap{
  706. padding: 38rpx;
  707. .process_item{
  708. &:last-of-type{
  709. .process_item_bottom{
  710. border-left: none;
  711. }
  712. }
  713. .process_item_top{
  714. padding-left: 30rpx;
  715. display: flex;
  716. align-items: center;
  717. position: relative;
  718. &:before{
  719. content: '';
  720. position: absolute;
  721. left: -13rpx;
  722. top: 50%;
  723. width: 26rpx;
  724. height: 26rpx;
  725. border-radius: 50%;
  726. background-color: $uni-primary;
  727. transform: translateY(-50%);
  728. }
  729. .name{
  730. font-size: 30rpx;
  731. }
  732. .value{
  733. margin-left: 20rpx;
  734. font-size: 22rpx;
  735. color: #A1A1A1;
  736. flex: 1;
  737. }
  738. }
  739. .process_item_bottom{
  740. min-height: 82rpx;
  741. border-left: 1rpx solid #B7BDC6;
  742. margin-top: 5rpx;
  743. padding-left: 30rpx;
  744. display: flex;
  745. font-size: 24rpx;
  746. color: #A1A1A1;
  747. .value{
  748. margin-left: 20rpx;
  749. }
  750. }
  751. }
  752. }
  753. .appraise_detail{
  754. padding: 24rpx 24rpx 24rpx 40rpx;
  755. .appraise_detail_top{
  756. display: flex;
  757. align-items: center;
  758. justify-content: space-between;
  759. font-size: 26rpx;
  760. .name{
  761. color: #A1A1A1;
  762. }
  763. .value{}
  764. }
  765. .appraise_detail_bottom{
  766. font-size: 30rpx;
  767. margin-top: 24rpx;
  768. word-break: break-all;
  769. }
  770. }
  771. }
  772. }
  773. </style>