repair-add.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698
  1. <template>
  2. <view class="mx3" style="padding-bottom: 100rpx">
  3. <u-toast ref="uToast" />
  4. <view class="main-color-bg" style="height: 100rpx; margin: 0 -30rpx"></view>
  5. <view class="p3 bg-color-white" style="margin-top: -50rpx; border-radius: 20rpx">
  6. <u-form :model="form" ref="uForm">
  7. <u-form-item label="选择设备" required prop="running" :label-width="150">
  8. <u-input v-model="form.running" disabled @click="handleSelect" placeholder="请选择设备" type="select" />
  9. <!-- <u-select
  10. v-model="haltState"
  11. :list="runningList"
  12. @confirm="runningSubmit"
  13. ></u-select> -->
  14. </u-form-item>
  15. <common-popup :list="runningList" @select="runningSubmit" ref="popup" />
  16. <view class="main-color-text f-size-32 f-weight-6 mt-2">基本信息</view>
  17. <u-form-item label="设备名称" :label-width="150">
  18. <u-input v-model="form.sbName" disabled />
  19. </u-form-item>
  20. <u-form-item label="设备编号" :label-width="150">
  21. <u-input v-model="form.bianhao" disabled />
  22. </u-form-item>
  23. <view class="main-color-text f-size-32 f-weight-6 mt-2">报修信息</view>
  24. <!-- <u-form-item label="报修来源" prop="repair" required :label-width="150">
  25. <u-input
  26. v-model="form.repair"
  27. disabled
  28. @click="repairState = true"
  29. placeholder="请选择报修来源"
  30. type="select"
  31. />
  32. <u-select
  33. v-model="repairState"
  34. :list="repairList"
  35. @confirm="repairSubmit"
  36. ></u-select>
  37. </u-form-item>-->
  38. <!--
  39. <u-form-item label="紧急等级" prop="level" required :label-width="150">
  40. <u-input
  41. v-model="form.level"
  42. disabled
  43. @click="levelState = true"
  44. placeholder="请选择紧急等级"
  45. type="select"
  46. />
  47. <u-select
  48. v-model="levelState"
  49. :list="levelList"
  50. @confirm="levelSubmit"
  51. ></u-select>
  52. </u-form-item>
  53. <u-form-item label="故障类别" required prop="badType" :label-width="150">
  54. <u-input v-model="form.badType" disabled @click="badState = true" type="select" />
  55. <u-select v-model="badState" :list="badList" @confirm="badSubmit"></u-select>
  56. </u-form-item>-->
  57. <!-- <u-form-item
  58. label="工单类别"
  59. required
  60. prop="category"
  61. :label-width="150"
  62. >
  63. <u-input
  64. v-model="category"
  65. disabled
  66. @click="badState = true"
  67. type="select"
  68. />
  69. <u-select
  70. v-model="badState"
  71. :list="categoryMap"
  72. @confirm="badSubmit"
  73. ></u-select>
  74. </u-form-item> -->
  75. <u-form-item label="使用位置" prop="sbCph" required :label-width="150">
  76. <tree-select v-model="form.sbCph" valueName="title" :data="sbPositionData"></tree-select>
  77. </u-form-item>
  78. <u-form-item label="是否停机" required prop="needStop" :label-width="150">
  79. <!-- <u-input v-model="form.halt" disabled @click="haltState = true" placeholder="请选择是否停机"
  80. type="select" /> -->
  81. <u-radio-group v-model="form.needStop" @change="radioGroupChange">
  82. <u-radio :name="0">
  83. 否
  84. </u-radio>
  85. <u-radio :name="1">
  86. 是
  87. </u-radio>
  88. </u-radio-group>
  89. </u-form-item>
  90. <u-form-item label="工单类别" required prop="category" :label-width="150">
  91. <u-input v-model="category" disabled @click="categoryState = true" placeholder="请选择工单类别"
  92. type="select" />
  93. <u-select v-model="categoryState" :list="categoryMap" @confirm="categorySubmit"></u-select>
  94. </u-form-item>
  95. <u-form-item label="紧急程度" required prop="level" :label-width="150">
  96. <u-input v-model="form.level" disabled @click="levelState = true" placeholder="请选择紧急程度"
  97. type="select" />
  98. <u-select v-model="levelState" :list="levelList" @confirm="levelSubmit"></u-select>
  99. </u-form-item>
  100. <u-form-item label="故障类型" required prop="repairErrorTypeId" :label-width="150">
  101. <u-input v-model="form.badType" disabled @click="errorTypeState = true" placeholder="请选择故障类型"
  102. type="select" />
  103. <u-select v-model="errorTypeState" :list="errorTypeList" @confirm="errorTypeSubmit"></u-select>
  104. </u-form-item>
  105. <u-form-item label="要求日期" prop="limitDate" :label-width="150">
  106. <u-input v-model="form.limitDate" disabled @click="limitDateShow = true" placeholder="请选择要求日期"
  107. type="select" />
  108. <u-picker mode="time" v-model="limitDateShow" :params="dateParams"
  109. @confirm="limitDateSubmit"></u-picker>
  110. </u-form-item>
  111. <u-form-item label="要求时间" prop="limitHours" :label-width="150">
  112. <u-input v-model="form.limitHours" type="number" placeholder="请输入要求时间(小时)" />
  113. </u-form-item>
  114. <u-form-item label="报修人" prop="actualUser" required :label-width="150">
  115. <u-input v-model="form.actualUser" :cursor-spacing="cursorSpacing" />
  116. </u-form-item>
  117. <u-form-item label="通知班长" :label-width="150">
  118. <u-input v-model="form.notifyTeamLeaders" disabled @click="openLeaderPopup" type="select"
  119. placeholder="请选择通知班长(可多选,非必填)" />
  120. </u-form-item>
  121. <u-popup v-model="leaderPopupShow" mode="bottom" border-radius="20">
  122. <view class="bg-color-white">
  123. <view class="d-flex j-between a-center p3">
  124. <view class="text-color-6 f-size-28" @click="cancelLeaderSelect">取消</view>
  125. <view class="main-color-text f-size-32 f-weight-6">通知班长(可多选)</view>
  126. <view class="main-color-text f-size-28" @click="confirmLeaderSelect">确定</view>
  127. </view>
  128. <scroll-view scroll-y style="max-height: 500rpx" class="px3">
  129. <u-checkbox-group shape="square">
  130. <view class="py2" v-for="(leader, index) in teamLeaderList" :key="leader.userId">
  131. <u-checkbox v-model="teamLeaderList[index].checked" :name="leader.userId">
  132. {{ leader.realName }}
  133. </u-checkbox>
  134. </view>
  135. </u-checkbox-group>
  136. <view v-if="!teamLeaderList.length" class="p3 text-color-6 f-size-28">
  137. 暂无具有班长身份的人员
  138. </view>
  139. </scroll-view>
  140. </view>
  141. </u-popup>
  142. <u-form-item label="故障描述" prop="content" required :label-width="150">
  143. <u-input v-model="form.content" :cursor-spacing="cursorSpacing" />
  144. </u-form-item>
  145. <!-- <u-select v-model="aShow" mode="mutil-column-auto" :list="aList" @confirm="confirm"></u-select>-->
  146. <u-form-item label="上传图片" :label-width="150">
  147. <u-upload width="180" height="180" max-count="6" :action="action" :file-list="fileList"
  148. @on-success="uploadSuccess" @on-remove="uploadRemove"></u-upload>
  149. </u-form-item>
  150. </u-form>
  151. <!-- <button class="main-color-bg text-color-white" @tap='handleSubmit'>提交</button> -->
  152. <view class="p-fixed d-flex j-around a-center footer">
  153. <view class="main-color-bg text-color-white common" @tap="handleSubmit">提交</view>
  154. </view>
  155. </view>
  156. </view>
  157. </template>
  158. <script>
  159. export default {
  160. data() {
  161. return {
  162. form: {
  163. badType: '',
  164. running: '',
  165. sbName: '',
  166. sbCph: '',
  167. bianhao: '',
  168. halt: '',
  169. repair: '',
  170. remarks: '',
  171. actualUser: '',
  172. content: '',
  173. repairErrorTypeId: '',
  174. photo: '',
  175. level: '',
  176. // 传入的
  177. sbId: '',
  178. needStop: null,
  179. levelValue: '',
  180. source: '',
  181. limitDate: '',
  182. limitHours: '',
  183. // 通知班长:仅展示已选班长姓名,提交用 selectedLeaderIds
  184. notifyTeamLeaders: ''
  185. },
  186. teamLeaderList: [], // 全部具有班长身份的人,带 checked 勾选状态
  187. defaultLeaderIds: [], // 当前用户班组下的班长,默认勾选
  188. selectedLeaderIds: [], // 已选班长用户id
  189. leaderPopupShow: false, // 通知班长多选弹层
  190. category: '',
  191. badState: false,
  192. badList: [],
  193. runningState: false, // 设备选择
  194. runningList: [],
  195. haltState: false, // 是否停机
  196. haltList: [],
  197. repairState: false, // 报修来源
  198. repairList: [],
  199. levelState: false,
  200. levelList: [],
  201. categoryState: false, // 工单类别
  202. errorTypeState: false, // 故障类型
  203. errorTypeList: [],
  204. limitDateShow: false, // 要求日期
  205. dateParams: {
  206. year: true,
  207. month: true,
  208. day: true
  209. },
  210. imagesList: [],
  211. action: this.$BaseTool.UserUtil.getUploadUrlIgnores(),
  212. // action: 'http://39.103.133.141:8000/mock/7/upms/files/upload',
  213. /* header: {
  214. Authorization: 'Bearer ' + uni.getStorageSync('accessToken')
  215. }, */
  216. fileList: [],
  217. sourceMap: {},
  218. levelMap: {},
  219. statusMap: {},
  220. needStopMap: {},
  221. categoryMap: [],
  222. haltDefaultValue: [0],
  223. rules: {
  224. running: [
  225. {
  226. required: true,
  227. message: '请选择设备',
  228. trigger: ['blur', 'change']
  229. }
  230. ],
  231. category: [
  232. {
  233. required: true,
  234. message: '请选择工单类别',
  235. trigger: ['blur', 'change']
  236. }
  237. ],
  238. halt: [
  239. {
  240. required: true,
  241. message: '请选择是否停机',
  242. trigger: ['blur', 'change']
  243. }
  244. ],
  245. repair: [
  246. {
  247. required: true,
  248. message: '请选择报修来源',
  249. trigger: ['blur', 'change']
  250. }
  251. ],
  252. actualUser: [
  253. {
  254. required: true,
  255. message: '请填写报修人',
  256. trigger: ['blur', 'change']
  257. }
  258. ],
  259. sbCph: [
  260. {
  261. required: true,
  262. message: '请填写设备使用位置',
  263. trigger: ['blur', 'change']
  264. }
  265. ],
  266. level: [
  267. {
  268. required: true,
  269. message: '请选择紧急等级',
  270. trigger: ['blur', 'change']
  271. }
  272. ],
  273. content: [
  274. {
  275. required: true,
  276. message: '请输入问题描述',
  277. trigger: ['blur', 'change']
  278. }
  279. ],
  280. repairErrorTypeId: [
  281. {
  282. required: true,
  283. message: '请选择故障类型',
  284. trigger: ['blur', 'change']
  285. }
  286. ]
  287. },
  288. // #ifdef MP-WEIXIN
  289. cursorSpacing: 50,
  290. // #endif
  291. // #ifndef MP-WEIXIN
  292. cursorSpacing: 0,
  293. // #endif
  294. sbBackId: '',
  295. aShow: false,
  296. address: '',
  297. sbPositionData: [],
  298. sbId: null,
  299. aList: []
  300. }
  301. },
  302. onShow() {
  303. this.userInfo = this.$BaseTool.UserUtil.getUserInfo()
  304. if (this.userInfo) {
  305. this.form.actualUser = this.userInfo.realName
  306. }
  307. const pages = getCurrentPages()
  308. const currPage = pages[pages.length - 1]
  309. this.sbBackId = currPage.sbBackId
  310. this.sbId = currPage.sbBackId
  311. if (this.sbBackId) {
  312. this.$Http
  313. .fetchSbInfoIgnores({
  314. id: this.sbBackId
  315. })
  316. .then(res => {
  317. this.form.bianhao = res.data.no
  318. this.form.sbName = res.data.name
  319. this.form.sbCph = res.data.positionName
  320. this.form.running = res.data.name
  321. this.form.sbId = this.sbBackId
  322. })
  323. }
  324. },
  325. onLoad(options) {
  326. if (options && options.detailId) {
  327. this.sbId = options.detailId
  328. this.$Http
  329. .fetchSbInfoIgnores({
  330. id: options.detailId
  331. })
  332. .then(res => {
  333. this.form.bianhao = res.data.no
  334. this.form.sbName = res.data.name
  335. this.form.running = res.data.name
  336. this.form.sbId = options.detailId
  337. this.form.sbCph = res.data.positionName
  338. })
  339. }
  340. // this.sourceMap = this.$DictCache.getLabelByValueMapByType(
  341. // this.$DictCache.TYPE.REPAIR_APPLICATION_FORM_SOURCE
  342. // );
  343. // for (const key in this.sourceMap) {
  344. // this.repairList.push({
  345. // label: this.sourceMap[key],
  346. // value: key
  347. // });
  348. // }
  349. // this.form.repair = this.repairList[0].label;
  350. // this.form.source = this.repairList[0].value;
  351. // this.levelMap = this.$DictCache.getLabelByValueMapByType(
  352. // this.$DictCache.TYPE.REPAIR_APPLICATION_FORM_LEVEL
  353. // );
  354. // for (const key in this.levelMap) {
  355. // this.levelList.push({
  356. // label: this.levelMap[key],
  357. // value: key
  358. // });
  359. // }
  360. // this.form.level = this.levelList[0].label;
  361. // this.form.levelValue = this.levelList[0].value;
  362. // this.statusMap = this.$DictCache.getLabelByValueMapByType(
  363. // this.$DictCache.TYPE.REPAIR_APPLICATION_FORM_STATUS
  364. // );
  365. console.log(22)
  366. // 同步 PC 端报修提交字段:工单类别、紧急程度、故障类型字典
  367. const categoryMap = this.$DictCache.getLabelByValueMapByType(
  368. this.$DictCache.TYPE.REPAIR_APPLICATION_FORM_CATEGORY
  369. )
  370. for (const key in categoryMap) {
  371. this.categoryMap.push({
  372. label: categoryMap[key],
  373. value: key
  374. })
  375. }
  376. const levelMap = this.$DictCache.getLabelByValueMapByType(
  377. this.$DictCache.TYPE.REPAIR_APPLICATION_FORM_LEVEL
  378. )
  379. for (const key in levelMap) {
  380. this.levelList.push({
  381. label: levelMap[key],
  382. value: key
  383. })
  384. }
  385. // 紧急程度默认一级,与 PC 端默认值保持一致
  386. // if (levelMap && levelMap['1']) {
  387. // this.form.level = levelMap['1']
  388. // this.form.levelValue = '1'
  389. // }
  390. this.$Http
  391. .getDictType({
  392. type: 'REPAIR_ERROR_TYPE'
  393. })
  394. .then(res => {
  395. this.errorTypeList = (res.data || []).map(item => ({
  396. label: item.label,
  397. value: item.value
  398. }))
  399. })
  400. this.$Http
  401. .getSbPositionTree().then(res => {
  402. this.sbPositionData = res.data
  403. })
  404. this.getTeamLeaders()
  405. // const categoryMap = this.$DictCache.getLabelByValueMapByType(
  406. // this.$DictCache.TYPE.REPAIR_APPLICATION_FORM_CATEGORY
  407. // )
  408. // for (const key in categoryMap) {
  409. // this.categoryMap.push({
  410. // label: categoryMap[key],
  411. // value: key
  412. // });
  413. // }
  414. // console.log(this.categoryMap)
  415. // this.needStopMap = this.$DictCache.getLabelByValueMapByType(
  416. // this.$DictCache.TYPE.YES_NO
  417. // )
  418. // for (const key in this.needStopMap) {
  419. // this.haltList.push({
  420. // label: this.needStopMap[key],
  421. // value: key
  422. // });
  423. // }
  424. // this.form.halt = this.haltList[this.haltDefaultValue].label;
  425. // this.form.needStop = this.haltList[this.haltDefaultValue].value;
  426. this.getType()
  427. // 获取设备数据
  428. // this.initSb();
  429. },
  430. onReady() {
  431. this.$refs.uForm.setRules(this.rules)
  432. },
  433. methods: {
  434. // 获取通知班长候选人:默认带出当前用户班组下的班长,找不到则空着
  435. getTeamLeaders() {
  436. this.$Http
  437. .queryRepairTeamLeaders()
  438. .then(res => {
  439. const data = res.data || {}
  440. const defaultIds = data.defaultIds || []
  441. // 每项附加 checked 勾选状态,默认勾选本班组班长
  442. this.teamLeaderList = (data.leaders || []).map(item => ({
  443. ...item,
  444. checked: defaultIds.indexOf(item.userId) > -1
  445. }))
  446. this.defaultLeaderIds = defaultIds
  447. this.selectedLeaderIds = defaultIds.slice()
  448. this.syncLeaderDisplay()
  449. })
  450. },
  451. // 已选班长id同步到表单展示姓名
  452. syncLeaderDisplay() {
  453. const names = this.teamLeaderList
  454. .filter(item => this.selectedLeaderIds.indexOf(item.userId) > -1)
  455. .map(item => item.realName)
  456. this.form.notifyTeamLeaders = names.join('、')
  457. },
  458. // 用已选id刷新弹层勾选状态
  459. resetLeaderChecked() {
  460. this.teamLeaderList.forEach((item, index) => {
  461. this.$set(this.teamLeaderList[index], 'checked', this.selectedLeaderIds.indexOf(item.userId) > -1)
  462. })
  463. },
  464. openLeaderPopup() {
  465. if (!this.teamLeaderList.length) {
  466. uni.showToast({ icon: 'none', title: '暂无具有班长身份的人员' })
  467. return
  468. }
  469. this.resetLeaderChecked()
  470. this.leaderPopupShow = true
  471. },
  472. confirmLeaderSelect() {
  473. this.selectedLeaderIds = this.teamLeaderList
  474. .filter(item => item.checked)
  475. .map(item => item.userId)
  476. this.syncLeaderDisplay()
  477. this.leaderPopupShow = false
  478. },
  479. cancelLeaderSelect() {
  480. // 取消:丢弃弹层内未确认的勾选
  481. this.resetLeaderChecked()
  482. this.leaderPopupShow = false
  483. },
  484. //
  485. confirm(e) {
  486. console.log(e)
  487. this.address = ''
  488. for (let i = 0; i < e.length; i++) {
  489. this.address += e[i].label
  490. }
  491. },
  492. badSubmit(data) {
  493. this.category = data[0].label
  494. this.form.category = data[0].value
  495. },
  496. // 工单类别
  497. categorySubmit(data) {
  498. this.category = data[0].label
  499. this.form.category = data[0].value
  500. },
  501. // 故障类型
  502. errorTypeSubmit(data) {
  503. this.form.badType = data[0].label
  504. this.form.repairErrorTypeId = data[0].value
  505. },
  506. // 要求日期
  507. limitDateSubmit(e) {
  508. this.form.limitDate = `${e.year}-${e.month}-${e.day}`
  509. },
  510. getType() {
  511. /* this.$Http
  512. .fetchErrorTypeTree({
  513. id: this.detailId
  514. })
  515. .then((res) => {
  516. console.log(res.data);
  517. const temp = []
  518. res.data.forEach(item => {
  519. temp.push({
  520. label: item.title,
  521. value: item.id
  522. })
  523. })
  524. this.badList = temp
  525. console.log(this.badList);
  526. }) */
  527. },
  528. handleSelect() {
  529. uni.navigateTo({
  530. url: '/pages/search/search'
  531. })
  532. },
  533. // 是否停机切换
  534. radioGroupChange(value) {
  535. this.form.needStop = value
  536. },
  537. handleSubmit() {
  538. const params = {
  539. content: this.form.content,
  540. actualUser: this.form.actualUser,
  541. needStop: this.form.needStop,
  542. sbId: this.form.sbId,
  543. sbName: this.form.sbName,
  544. sbCph: this.form.sbCph,
  545. category: this.form.category ? Number(this.form.category) : null,
  546. level: this.form.levelValue ? Number(this.form.levelValue) : null,
  547. repairErrorTypeId: this.form.repairErrorTypeId || null,
  548. limitDate: this.form.limitDate || null,
  549. limitHours: this.form.limitHours || null,
  550. // 与 PC 端 BaseForm 一致:提交当前登录人部门
  551. deptId: this.userInfo ? this.userInfo.deptId : null,
  552. // 通知班长:选中班长的用户id,逗号分隔,与 PC 端保持一致
  553. notifyTeamLeaders: this.selectedLeaderIds.join(','),
  554. applicationFileList: this.imagesList
  555. }
  556. // this.form.photo = a.join(',');
  557. var that = this
  558. this.$refs.uForm.validate(valid => {
  559. if (valid) {
  560. this.$Http.addRepairApplicationForm(params).then(res => {
  561. const sbId = that.form.sbId
  562. that.resetForm()
  563. uni.showToast({
  564. icon: 'none',
  565. title: '报修单已提交!',
  566. duration: 2000
  567. })
  568. setTimeout(function () {
  569. uni.navigateTo({
  570. url: '/pages/equipment-detail/equipment-detail?detailId=' + sbId
  571. })
  572. }, 2000)
  573. })
  574. }
  575. })
  576. },
  577. // 报修提交成功后清除表单数据
  578. resetForm() {
  579. this.form = {
  580. badType: '',
  581. running: '',
  582. sbName: '',
  583. sbCph: '',
  584. bianhao: '',
  585. halt: '',
  586. repair: '',
  587. remarks: '',
  588. actualUser: this.userInfo ? this.userInfo.realName : '',
  589. content: '',
  590. repairErrorTypeId: '',
  591. photo: '',
  592. level: '',
  593. sbId: '',
  594. needStop: 0,
  595. levelValue: '',
  596. source: '',
  597. limitDate: '',
  598. limitHours: '',
  599. notifyTeamLeaders: ''
  600. }
  601. this.category = ''
  602. this.imagesList = []
  603. this.fileList = []
  604. // 通知班长恢复默认本班组班长
  605. this.selectedLeaderIds = this.defaultLeaderIds.slice()
  606. this.syncLeaderDisplay()
  607. },
  608. // 紧急等级
  609. levelSubmit(data) {
  610. this.form.level = data[0].label
  611. this.form.levelValue = data[0].value
  612. },
  613. // 选择设备
  614. runningSubmit(data) {
  615. console.log(data)
  616. this.form.sbId = data.value
  617. this.$Http
  618. .fetchSbInfo({
  619. id: data.value
  620. })
  621. .then(res => {
  622. this.form.bianhao = res.data.no
  623. this.form.sbName = res.data.name
  624. this.form.sbCph = res.data.cph
  625. })
  626. this.form.running = data.label
  627. },
  628. // 是否
  629. haltSubmit(data) {
  630. this.form.halt = data[0].label
  631. this.form.needStop = data[0].value
  632. },
  633. repairSubmit(data) {
  634. this.form.repair = data[0].label
  635. this.form.source = data[0].value
  636. },
  637. // 删除成功
  638. uploadRemove(index, lists, name) {
  639. this.fileList = lists
  640. this.imagesList.splice(index, 1)
  641. console.log(this.imagesList)
  642. },
  643. // 上传成功
  644. uploadSuccess(data, index, lists, name) {
  645. this.fileList = lists
  646. this.imagesList.push(data.data)
  647. console.log(this.imagesList)
  648. }
  649. // initSb() {
  650. // this.$Http
  651. // .getSbInfoPage({
  652. // pageNum: 1,
  653. // pageSize: 1000,
  654. // filter: 0,
  655. // })
  656. // .then((res) => {
  657. // let data = res.data.rows;
  658. // console.log(data);
  659. // data.forEach((item) => {
  660. // this.runningList.push({
  661. // label: item.nameModel,
  662. // value: item.id,
  663. // });
  664. // });
  665. // });
  666. // },
  667. }
  668. }
  669. </script>
  670. <style lang="less">
  671. .footer {
  672. bottom: 0;
  673. left: 0;
  674. right: 0;
  675. background-color: #fff;
  676. z-index: 10000;
  677. border-top: 1rpx solid #f4f4f4;
  678. height: 100rpx;
  679. .common {
  680. padding: 15rpx 200rpx;
  681. border-radius: 30rpx;
  682. background-color: #0082ff;
  683. color: #fff;
  684. }
  685. }
  686. </style>