rapidRepNext.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875
  1. <template>
  2. <view class="handler">
  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. <view class="body view-body page_padding">
  9. <!-- 科内报修 -->
  10. <template v-if="dataInfo.tabActiveValue === 'doing'">
  11. <view class="form_item">
  12. <view class="title select"><text class="required newicon newicon-bitian"></text>院区:</view>
  13. <uni-data-picker class="value" placeholder="请选择院区"
  14. v-model="dataInfo.branch" :localdata="branchData" @change="doingDeptChange"
  15. :clear-icon="false" :class="{formRed: isSubmit && !dataInfo.branch}">
  16. </uni-data-picker>
  17. </view>
  18. <view class="form_item">
  19. <view class="title select"><text class="required newicon newicon-bitian"></text>报修科室:</view>
  20. <uni-data-picker class="value" placeholder="请选择报修科室"
  21. v-model="dataInfo.department" :localdata="dataInfo.repairTypeList"
  22. :clear-icon="false" :class="{formRed: isSubmit && !dataInfo.department}">
  23. </uni-data-picker>
  24. </view>
  25. <view class="candidate" v-if="itemUser">
  26. <view class="candidate-item" v-for="(item, index) in itemUser.commonDeptDTO" :key="item" @click="itemCandidate(item)">{{item.dept}}</view>
  27. </view>
  28. <view class="form_item column">
  29. <view class="title"><text class="required newicon newicon-bitian"></text>详细地址:</view>
  30. <uni-easyinput class="value" type="textarea" v-model="dataInfo.address" placeholder="请输入详细地址" :class="{formRed: isSubmit && !dataInfo.address }" />
  31. </view>
  32. <view class="candidate">
  33. <view class="candidate-item" v-for="item in addresData" :key="item" @click="itemAddres(item)">{{item.name}}</view>
  34. </view>
  35. <view class="form_item" :class="{formRed: isSubmit && !dataInfo.contacts}">
  36. <view class="title select"><text class="required newicon newicon-bitian"></text>联系人:</view>
  37. <input class="item-input" placeholder="请输入联系人" v-model="dataInfo.contacts" />
  38. </view>
  39. <view class="form_item" :class="{formRed: isSubmit && !dataInfo.contactsInformation}">
  40. <view class="title select"><text class="required newicon newicon-bitian"></text>联系电话:</view>
  41. <input class="item-input" placeholder="请输入联系电话" v-model="dataInfo.contactsInformation"/>
  42. </view>
  43. </template>
  44. <!-- 公共报修 -->
  45. <template v-if="dataInfo.tabActiveValue === 'overtime'">
  46. <view class="form_item" v-if="isRepair.valueconfig==1">
  47. <view class="title select"><text class="required newicon newicon-bitian"></text>院区:</view>
  48. <uni-data-picker class="value" placeholder="请选择院区" @change="overDeptChange"
  49. v-model="dataInfo.branch" :localdata="branchData"
  50. :clear-icon="false" :class="{formRed: isSubmit && !dataInfo.branch}">
  51. </uni-data-picker>
  52. </view>
  53. <view class="form_item" v-if="isRepair.valueconfig==1">
  54. <view class="title select"><text class="required newicon newicon-bitian"></text>楼栋:</view>
  55. <uni-data-picker class="value" placeholder="请选择楼栋" @change="areaChange"
  56. v-model="dataInfo.areaId" :localdata="dataInfo.buildingTypeList"
  57. :clear-icon="false" :class="{formRed: isSubmit && !dataInfo.areaId}">
  58. </uni-data-picker>
  59. </view>
  60. <view class="form_item" v-if="isRepair.valueconfig==1">
  61. <view class="title select"><text class="required newicon newicon-bitian"></text>楼层:</view>
  62. <uni-data-picker class="value" placeholder="请选择楼层"
  63. v-model="dataInfo.placeId" :localdata="dataInfo.placeTypeList"
  64. :clear-icon="false" :class="{formRed: isSubmit && !dataInfo.placeId}">
  65. </uni-data-picker>
  66. </view>
  67. <view class="form_item column" v-if="isRepair.valueconfig==1">
  68. <view class="title"><text class="required newicon newicon-bitian"></text>详细地址:</view>
  69. <uni-easyinput class="value" type="textarea" v-model="dataInfo.address" placeholder="请输入详细地址" :class="{formRed: isSubmit && !dataInfo.address}" />
  70. </view>
  71. <view class="form_item" :class="{formRed: isSubmit && !dataInfo.contacts}">
  72. <view class="title select"><text class="required newicon newicon-bitian"></text>联系人:</view>
  73. <input class="item-input value" placeholder="请输入联系人" v-model="dataInfo.contacts"/>
  74. </view>
  75. <view class="form_item" :class="{formRed: isSubmit && !dataInfo.contactsInformation}">
  76. <view class="title select"><text class="required newicon newicon-bitian"></text>联系电话:</view>
  77. <input class="item-input value" placeholder="请输入联系电话" v-model="dataInfo.contactsInformation"/>
  78. </view>
  79. </template>
  80. </view>
  81. <view class="foot_common_btns">
  82. <button @click="goBackOrToList" type="default" class="primaryButton btn">上一步</button>
  83. <button @click="submit" type="default" class="primaryButton btn">提交</button>
  84. </view>
  85. <NumberModal v-if="dataInfo.isNumber" @cancelEmit="cancelNumber" @confirmEmit="conformNumber" @removeEmit="removeNumber" :selectData="dataInfo.selectData" :selectType="dataInfo.selectType" :evtNumber="dataInfo.evtNumber" showRemove></NumberModal>
  86. </view>
  87. </template>
  88. <script setup>
  89. import { ref, reactive, computed } from 'vue'
  90. import NumberModal from '@/components/NumberModal.vue';
  91. import { onLoad } from '@dcloudio/uni-app'
  92. import { generateNumberArray } from '@/utils/index.js'
  93. import { api_getDictionary, api_sj,api_request, getFetchDataList, api_place, api_getSolution, api_area, api_user, api_incidentTask, api_branch, api_dutyDepartment, api_department, api_querySummaryDoc, api_addSummaryDoc } from "@/http/api.js"
  94. import { defaultColor } from '@/static/js/theme.js'
  95. import { useSetTitle } from '@/share/useSetTitle.js'
  96. import { useMakePhoneCall } from '@/share/useMakePhoneCall.js'
  97. import { useUploadFile } from '@/share/useUploadFile.js'
  98. import { useGoBack } from '@/share/useGoBack.js'
  99. import { useLoginUserStore } from '@/stores/loginUser'
  100. import { useHandlerStore } from '@/stores/handler'
  101. useSetTitle();
  102. const loginUserStore = useLoginUserStore();
  103. const handlerStore = useHandlerStore();
  104. const { makePhoneCall } = useMakePhoneCall();
  105. const { uploadFile } = useUploadFile();
  106. const { goBack } = useGoBack();
  107. // 主题颜色
  108. const primaryColor = ref(defaultColor)
  109. // 备用机选项
  110. const machineData = ref([
  111. {
  112. text:'是',
  113. value:1
  114. },
  115. {
  116. text:'否',
  117. value:0
  118. },
  119. ])
  120. const isDept = ref({})
  121. const isRepair = ref({})
  122. const branchData = ref([])
  123. const candidateData = ref(loginUserStore.loginUser.user)
  124. const repairIncident = ref(null)
  125. const addresData = ref([
  126. {name:'护士站'},
  127. {name:'卫生间'},
  128. {name:'更衣室'},
  129. {name:'治疗室'}
  130. ])
  131. // 数据
  132. const dataInfo = reactive({
  133. tabs: [
  134. {id: 5, name: '科内报修', value: 'doing', num: ''},
  135. {id: 6, name: '公共报修', value: 'overtime', num: ''},
  136. ],
  137. tabActiveValue: 'doing',//当前选择的tab
  138. incidentId: undefined,//事件ID
  139. incidentData: {
  140. repairIncidentType:{
  141. id:''
  142. },
  143. department:{
  144. id:''
  145. }
  146. },//事件对象
  147. repairTypeList:[],//科室数据
  148. buildingTypeList:[],//楼栋数据
  149. placeTypeList:[],//楼层数据
  150. department:'',//报修科室
  151. address:'',//详细地址
  152. contacts:'',//联系人
  153. contactsInformation:'',//手机
  154. areaId:'',//楼栋
  155. placeId:'',//楼层
  156. branch:'', //院区
  157. })
  158. // 故障处理用是否提供备用机
  159. const newProvideBackupMachine = ref(0)
  160. // 知识库id
  161. const solutionId = ref(null)
  162. // 是否提交
  163. const isSubmit = ref(false)
  164. // 处理图片
  165. const handlerImgRef = ref(null)
  166. // 用户信息
  167. const itemUser = ref(null)
  168. // 是否进入汇总单
  169. const isInSummaryOrder = computed(() => {
  170. return dataInfo.tabActiveValue === 'doing' && dataInfo.incidentData.duty && dataInfo.incidentData.duty.addSummary == 1 && (dataInfo.incidentData.handlingPersonnelUser.id == loginUserStore.loginUser.user.id);
  171. })
  172. // 上一步或者返回列表
  173. function goBackOrToList(){
  174. uni.setStorageSync('rapidRepNext',JSON.stringify(dataInfo))
  175. goBack();
  176. }
  177. // 重置
  178. function reset(){
  179. // dataInfo.department = '',//报修科室
  180. dataInfo.address = '',//详细地址
  181. // dataInfo.contacts = '',//联系人
  182. // dataInfo.contactsInformation = ''//手机
  183. dataInfo.areaId = ''//楼栋
  184. dataInfo.placeId = '' //院区
  185. dataInfo.placeTypeList = []
  186. }
  187. // 初始化表单
  188. function initForm(){
  189. if(dataInfo.tabActiveValue === 'doing'){
  190. // getRepairTypes()
  191. getUserInfo()
  192. }else if(dataInfo.tabActiveValue === 'overtime'){
  193. getbuildingList()
  194. }
  195. }
  196. function itemCandidate(item){
  197. // console.log(55,index)
  198. // let arr = loginUserStore.loginUser.user.commonDept.split(',')
  199. // console.log(66,arr)
  200. dataInfo.department = item.id
  201. }
  202. function itemAddres(item){
  203. dataInfo.address = item.name
  204. }
  205. function getUserInfo(){
  206. let user = loginUserStore.loginUser.user
  207. let postData = {
  208. idx: 0,
  209. sum: 999,
  210. user: {
  211. hospital:{
  212. id:user.currentHospital.id
  213. },
  214. name: user.name,
  215. }
  216. }
  217. api_user(postData).then(res => {
  218. if(res.status == 200){
  219. itemUser.value = res.list.find(i=>i.id==user.id)
  220. }else{
  221. uni.showToast({
  222. icon: 'none',
  223. title: res.msg || '请求数据失败!'
  224. });
  225. }
  226. })
  227. }
  228. // 点击tab
  229. function clickTab(tabValue){
  230. if(dataInfo.tabActiveValue == tabValue){
  231. return;
  232. }
  233. dataInfo.tabActiveValue = tabValue;
  234. isSubmit.value = false;
  235. reset();
  236. if(tabValue=='doing'){
  237. let user = loginUserStore.loginUser.user
  238. if(user){
  239. dataInfo.department = user.dept.id
  240. }
  241. }else{
  242. dataInfo.department = ''
  243. }
  244. dataInfo.category = dataInfo.incidentData.category || {};
  245. dataInfo.synergetic = dataInfo.incidentData.synergetic || [];
  246. newProvideBackupMachine.value = dataInfo.incidentData.provideBackupMachine
  247. initForm();
  248. }
  249. // 获取事件详情
  250. function getIncidentDetail(){
  251. if(uni.getStorageSync('rapidRepNext')){
  252. let data = JSON.parse(uni.getStorageSync('rapidRepNext'))
  253. if(data){
  254. dataInfo.department = data.department//报修科室
  255. dataInfo.address = data.address//详细地址
  256. dataInfo.contacts = data.contacts//联系人
  257. dataInfo.contactsInformation = data.contactsInformation//手机
  258. dataInfo.branch = data.branch//院区
  259. dataInfo.areaId = data.areaId//楼栋
  260. getRepairTypes()
  261. }
  262. }
  263. if(uni.getStorageSync('repairData')){
  264. let data = JSON.parse(uni.getStorageSync('repairData'))
  265. if(data){
  266. dataInfo.description = data.description
  267. dataInfo.handlerImgList = data.handlerImgList
  268. dataInfo.serverId = data.serverId
  269. dataInfo.assetId = data.assetId
  270. }
  271. }
  272. let data = JSON.parse(uni.getStorageSync('sysData'))
  273. isDept.value = data.find(i=>i.keyconfig=='deptRepair')
  274. isRepair.value = data.find(i=>i.keyconfig=='publicRepair')
  275. if(isDept.value.valueconfig==1 && isRepair.value.valueconfig==1){
  276. dataInfo.tabs = [
  277. {id: 5, name: '科内报修', value: 'doing', num: ''},
  278. {id: 6, name: '公共报修', value: 'overtime', num: ''},
  279. ]
  280. dataInfo.tabActiveValue = 'doing'
  281. }else if(isDept.value.valueconfig==1){
  282. dataInfo.tabs = [
  283. {id: 5, name: '科内报修', value: 'doing', num: ''},
  284. ]
  285. dataInfo.tabActiveValue = 'doing'
  286. }else if(isRepair.value.valueconfig==1){
  287. dataInfo.tabs = [
  288. {id: 6, name: '公共报修', value: 'overtime', num: ''},
  289. ]
  290. dataInfo.tabActiveValue = 'overtime'
  291. getbuildingList()
  292. }
  293. let user = loginUserStore.loginUser.user
  294. if(user){
  295. if(user.currentHospital.parent){
  296. dataInfo.branch = user.currentHospital.parent.id
  297. }else{
  298. dataInfo.branch = user.currentHospital.id
  299. }
  300. dataInfo.contacts = user.name
  301. dataInfo.contactsInformation = user.phone
  302. dataInfo.department = user.dept.id
  303. getRepairTypes()
  304. }
  305. let postData = {
  306. "key": 'repair_incident_type',
  307. "type": "list",
  308. };
  309. api_getDictionary(postData).then(res => {
  310. res = res || [];
  311. repairIncident.value = res
  312. })
  313. getBranch()
  314. }
  315. // 获取院区列表
  316. function getBranch(){
  317. let arr = loginUserStore.loginUser.hospital.filter(i=>i.parent==undefined)
  318. branchData.value = arr.map(v => ({
  319. text: v.hosName,
  320. value: v.id,
  321. }));
  322. }
  323. // 科内报修选择院区
  324. function doingDeptChange(){
  325. getRepairTypes()
  326. }
  327. // 公区报修选择院区
  328. function overDeptChange(){
  329. getbuildingList()
  330. }
  331. // 获取报修科室列表
  332. function getRepairTypes(){
  333. uni.showLoading({
  334. title: "加载中",
  335. mask: true,
  336. });
  337. let postData = {
  338. department: {
  339. hospital: dataInfo.branch,
  340. },
  341. idx:0,
  342. sum:9999
  343. }
  344. api_department(postData).then(res => {
  345. uni.hideLoading();
  346. res = res.list || [];
  347. dataInfo.repairTypeList = res.map(v => ({
  348. text: v.dept,
  349. value: v.id,
  350. floor: v.floor
  351. }));
  352. })
  353. }
  354. // 获取楼栋
  355. function getbuildingList(){
  356. uni.showLoading({
  357. title: "加载中",
  358. mask: true,
  359. });
  360. let postData = {
  361. idx: 0,
  362. sum: 9999,
  363. building:{
  364. hosId: dataInfo.branch,
  365. }
  366. };
  367. getFetchDataList("simple/data", "building", postData)
  368. .then((res) => {
  369. uni.hideLoading();
  370. res = res.list || [];
  371. dataInfo.buildingTypeList = res.map(v => ({
  372. text: v.buildingName,
  373. value: v.id
  374. }));
  375. });
  376. }
  377. function areaChange(e){
  378. getPlaceList(dataInfo.areaId)
  379. }
  380. // 获取楼层
  381. function getPlaceList(e){
  382. let postData = {
  383. idx: 0,
  384. sum: 9999,
  385. floor: {
  386. buildId:e,
  387. hosId:dataInfo.branch
  388. }
  389. };
  390. getFetchDataList("simple/data", "floor", postData)
  391. .then((res) => {
  392. uni.hideLoading();
  393. res = res.list || [];
  394. dataInfo.placeTypeList = res.map(v => ({
  395. text: v.floorName,
  396. value: v.id
  397. }));
  398. });
  399. }
  400. // 提交
  401. function submit(){
  402. isSubmit.value = true;
  403. submitHandler()
  404. }
  405. // 处理提交事件
  406. function handlerOrder(){
  407. let postData = {
  408. incident: dataInfo.incidentData,
  409. serverId: ''
  410. }
  411. postData.incident.place = {}
  412. if(dataInfo.tabActiveValue === 'doing'){
  413. let data = repairIncident.value.find(i=>i.value=='dept')
  414. dataInfo.incidentData.repairIncidentType.id = data.id
  415. let deptItem = dataInfo.repairTypeList.find(i=>i.value == dataInfo.department)
  416. postData.incident.place.id = deptItem.floor.id
  417. }else if(dataInfo.tabActiveValue === 'overtime'){
  418. let data = repairIncident.value.find(i=>i.value=='public')
  419. dataInfo.incidentData.repairIncidentType.id = data.id
  420. postData.incident.place.id = dataInfo.placeId;
  421. }
  422. dataInfo.incidentData.department.id = dataInfo.department
  423. postData.incident.description = dataInfo.description;
  424. if(dataInfo.serverId){
  425. postData.serverId = dataInfo.serverId;
  426. }else{
  427. delete postData.serverId
  428. }
  429. postData.incident.assetId = dataInfo.assetId;
  430. postData.incident.houseNumber = dataInfo.address;
  431. postData.incident.contacts = dataInfo.contacts;
  432. postData.incident.contactsInformation = dataInfo.contactsInformation;
  433. postData.incident.hosId = dataInfo.branch;
  434. // postData.incident.buildId = dataInfo.areaId; //areaId:楼栋
  435. // postData.incident.floorId = dataInfo.placeId;//placeId:楼层
  436. // buildId
  437. // floorId
  438. api_getDictionary({
  439. key: "incident_source",
  440. type: "list"
  441. }).then(res1=>{
  442. let incidentSourceList = res1 || [];
  443. let im = incidentSourceList.find(v => v.value === 'im');
  444. // api_sj().then(res2=>{
  445. // postData.incident.incidentsign = res2.data;
  446. postData.incident.source = im;
  447. postData.incident.fromWx = true;
  448. postData.incident.requester = loginUserStore.loginUser.user;
  449. postData.incident.acceptUser = loginUserStore.loginUser.user;
  450. postData.incident.deleteFlag = 0
  451. api_request(postData).then(res=>{
  452. if(res.state == 200){
  453. dataInfo.incidentId = res.data.id
  454. let handlerOrder$ = res.data;
  455. let requestList = [handlerOrder$];
  456. if(dataInfo.handlerImgList.length){ // 有图片
  457. dataInfo.handlerImgList.forEach(v => {
  458. let handlerOrderImg$ = handlerOrderImg(v);
  459. requestList.push(handlerOrderImg$);
  460. })
  461. console.log(9999,requestList);
  462. Promise.all(requestList).then(resList => {
  463. uni.hideLoading();
  464. console.log(9999,resList);
  465. // if(resList[0].state == 200){
  466. uni.showToast({
  467. icon: 'none',
  468. title: '报修成功',
  469. mask: true,
  470. });
  471. setTimeout(() => {
  472. uni.setStorageSync('rapidRepNext','')
  473. uni.setStorageSync('repairData','')
  474. uni.reLaunch({
  475. url: '/pages/repair/home',
  476. })
  477. }, 1500)
  478. // }else{
  479. // uni.showToast({
  480. // icon: 'none',
  481. // title: resList[0].msg || '请求数据失败!'
  482. // });
  483. // }
  484. })
  485. }else{
  486. uni.showToast({
  487. icon: 'none',
  488. title: '报修成功',
  489. mask: true,
  490. });
  491. setTimeout(() => {
  492. uni.setStorageSync('rapidRepNext','')
  493. uni.setStorageSync('repairData','')
  494. uni.reLaunch({
  495. url: '/pages/repair/home',
  496. })
  497. }, 1500)
  498. }
  499. }else{
  500. uni.showToast({
  501. icon: 'none',
  502. title: res.msg || '请求数据失败!'
  503. });
  504. }
  505. })
  506. // })
  507. })
  508. }
  509. // 处理图片
  510. function handlerOrderImg(imgObj){
  511. let allData = null
  512. if(imgObj.extname=='mp4' ||
  513. imgObj.extname=='avi' ||
  514. imgObj.extname=='mpeg' ||
  515. imgObj.extname=='wmv'){
  516. allData = uploadFile(imgObj, 'wechatIncidentVideo', dataInfo.incidentId)
  517. }else{
  518. allData = uploadFile(imgObj, 'wechatRequesterIncident', dataInfo.incidentId)
  519. }
  520. return allData
  521. }
  522. // 处理提交
  523. function submitHandler(){
  524. console.log(dataInfo);
  525. if(dataInfo.tabActiveValue=='doing'){
  526. if(dataInfo.dept==''){
  527. uni.showToast({
  528. icon: 'none',
  529. title: '请选择报修科室'
  530. });
  531. return;
  532. }
  533. }else{
  534. if(dataInfo.branch==''){
  535. uni.showToast({
  536. icon: 'none',
  537. title: '请选择院区'
  538. });
  539. return;
  540. }
  541. if(dataInfo.areaId==''){
  542. uni.showToast({
  543. icon: 'none',
  544. title: '请选择楼栋'
  545. });
  546. return;
  547. }
  548. if(dataInfo.placeId==''){
  549. uni.showToast({
  550. icon: 'none',
  551. title: '请选择楼层'
  552. });
  553. return;
  554. }
  555. }
  556. if(dataInfo.address==''){
  557. uni.showToast({
  558. icon: 'none',
  559. title: '请输入详细地址'
  560. });
  561. return;
  562. }
  563. if(dataInfo.contacts==''){
  564. uni.showToast({
  565. icon: 'none',
  566. title: '请输入联系人'
  567. });
  568. return;
  569. }
  570. if(dataInfo.contactsInformation==''){
  571. uni.showToast({
  572. icon: 'none',
  573. title: '请输入联系电话'
  574. });
  575. return;
  576. }
  577. console.log(dataInfo.handlerImgList)
  578. uni.showLoading({
  579. title: "加载中",
  580. mask: true,
  581. });
  582. handlerOrder()
  583. }
  584. // 获取文本内容
  585. function getHtml(html) {
  586. const tempDiv = document.createElement('div');
  587. tempDiv.innerHTML = html;
  588. return tempDiv.textContent || tempDiv.innerText || '';
  589. }
  590. onLoad((option) => {
  591. initForm()
  592. getIncidentDetail();
  593. })
  594. </script>
  595. <style lang="scss" scoped>
  596. .handler{
  597. height: 100%;
  598. display: flex;
  599. flex-direction: column;
  600. justify-content: space-between;
  601. .head{
  602. height: 88rpx;
  603. display: flex;
  604. position: fixed;
  605. z-index: 99;
  606. width: 100%;
  607. background-color: #fff;
  608. font-size: 30rpx;
  609. .tab{
  610. flex: 1;
  611. display: flex;
  612. justify-content: center;
  613. align-items: center;
  614. border-bottom: 4rpx solid transparent;
  615. &.active{
  616. color: $uni-primary;
  617. border-color: $uni-primary;
  618. }
  619. }
  620. }
  621. .body{
  622. margin-top: 88rpx;
  623. box-sizing: border-box;
  624. flex: 1;
  625. min-height: 0;
  626. &.bg{
  627. background-color: #F7F7F7;
  628. }
  629. .summaryItem{
  630. &:first-of-type{
  631. .summaryItem_head{
  632. border-bottom: 1rpx solid #DDDDDD;
  633. }
  634. }
  635. .summary_total{
  636. padding: 20rpx 0;
  637. display: flex;
  638. justify-content: center;
  639. align-items: center;
  640. }
  641. .summaryItem_head{
  642. padding: 24rpx;
  643. font-size: 26rpx;
  644. color: #3A3A3A;
  645. }
  646. .summaryItem_body{
  647. font-size: 30rpx;
  648. background-color: #fff;
  649. .summaryItem_bodyItem{
  650. padding: 24rpx;
  651. border-bottom: 1rpx solid #DDDDDD;
  652. .summaryItem_bodyItem_top{
  653. display: flex;
  654. justify-content: space-between;
  655. align-items: center;
  656. .value{
  657. padding-left: 48rpx;
  658. flex-shrink: 0;
  659. }
  660. }
  661. .summaryItem_bodyItem_bottom{
  662. margin-top: 24rpx;
  663. display: flex;
  664. justify-content: space-between;
  665. align-items: center;
  666. .name{
  667. text-align: right;
  668. flex: 1;
  669. }
  670. .value{
  671. width: 240rpx;
  672. text-align: right;
  673. padding-left: 48rpx;
  674. flex-shrink: 0;
  675. }
  676. }
  677. }
  678. }
  679. .summaryItem_foot{
  680. font-size: 30rpx;
  681. background-color: #fff;
  682. &.total{
  683. margin-top: 24rpx;
  684. }
  685. .summaryItem_foot_total{
  686. padding: 24rpx 0;
  687. display: flex;
  688. justify-content: center;
  689. align-items: center;
  690. }
  691. .summaryItem_foot_add{
  692. border-top: 1rpx solid #DDDDDD;
  693. padding: 24rpx 0;
  694. display: flex;
  695. justify-content: center;
  696. align-items: center;
  697. .newicon-icon-test{
  698. font-size: 30rpx;
  699. font-weight: bold;
  700. }
  701. }
  702. }
  703. }
  704. .form_item_column{
  705. padding-top: 24rpx;
  706. min-height: 86rpx;
  707. .form_item{
  708. padding-top: 0;
  709. min-height: auto;
  710. }
  711. }
  712. .candidate{
  713. display: flex;
  714. flex-wrap: wrap;
  715. .candidate-item{
  716. padding: 6rpx 15rpx;
  717. font-size: 26rpx;
  718. color: #949494;
  719. background: #E9E9E9;
  720. border-radius: 50rpx;
  721. margin-right: 20rpx;
  722. margin-top: 15rpx;
  723. }
  724. }
  725. .form_item{
  726. display: flex;
  727. align-items: center;
  728. padding-top: 24rpx;
  729. min-height: 86rpx;
  730. &.column{
  731. height: auto;
  732. flex-direction: column;
  733. align-items: flex-start;
  734. .import-rep{
  735. padding: 5rpx 10rpx;
  736. border-radius: 50rpx;
  737. background: #d1fcd5;
  738. color: #49b856;
  739. font-size: 24rpx;
  740. }
  741. .title{
  742. margin-right: 0;
  743. }
  744. .title-width{
  745. width: 100%;
  746. }
  747. .title-fl-sb{
  748. display: flex;
  749. justify-content: space-between;
  750. width: 100%;
  751. }
  752. .value{
  753. margin-top: 10rpx;
  754. padding-left: 20rpx;
  755. box-sizing: border-box;
  756. }
  757. .tips{
  758. padding: 24rpx;
  759. text-align: center;
  760. font-size: 22rpx;
  761. color: #909399;
  762. width: 100%;
  763. box-sizing: border-box;
  764. }
  765. }
  766. .title{
  767. font-size: 26rpx;
  768. display: flex;
  769. align-items: center;
  770. margin-right: 12rpx;
  771. flex-shrink: 0;
  772. &.select{
  773. width: calc(5em + 20rpx);
  774. }
  775. }
  776. .value{
  777. width: 100%;
  778. &.category{
  779. width: 100%;
  780. display: flex;
  781. justify-content: space-between;
  782. align-items: center;
  783. .categoryName{
  784. font-size: 26rpx;
  785. color: #555;
  786. flex: 1;
  787. }
  788. .newicon-weibiaoti2010104{
  789. color: $uni-primary;
  790. margin-left: 24rpx;
  791. }
  792. }
  793. .imgTips{
  794. color: #909399;
  795. font-size: 22rpx;
  796. }
  797. }
  798. .item-input{
  799. border: 1px solid #DBDBDB;
  800. height: 70rpx;
  801. line-height: 70rpx;
  802. padding: 0 10rpx;
  803. border-radius: 4rpx;
  804. width: 100%;
  805. font-size: 14px;
  806. }
  807. .synergeticNames{
  808. font-size: 26rpx;
  809. margin-right: 24rpx;
  810. }
  811. .synergeticAdd{
  812. flex-shrink: 0;
  813. }
  814. }
  815. }
  816. }
  817. </style>