bugQuery.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588
  1. <template>
  2. <div class="set-background">
  3. <el-form :model="form">
  4. <div class="block">
  5. <h3 style="margin:0 0 30px 0">标题 :&nbsp;&nbsp;&nbsp;{{ form.bugName }}</h3>
  6. <div style="display:flex;margin-bottom:10px">
  7. <el-form-item label="级别 : " prop="priority" style="display:flex;" label-width="48px">
  8. <el-select v-model="form.priority" placeholder="级别" style="width:80%;" @change="priorityChange">
  9. <el-option v-for="item in bugLevelStr" :key="item.name" :label="item.name" :value="item.code" />
  10. </el-select>
  11. </el-form-item>
  12. <el-form-item label="状态 : " prop="status" style="display:flex;" label-width="48px">
  13. <el-select v-model="form.status" placeholder="状态" style="width:80%;" @change="statusChange">
  14. <el-option v-for="item in bugStatusStr" :key="item.name" :label="item.name" :value="item.code" />
  15. </el-select>
  16. </el-form-item>
  17. <el-button type="primary" style="height:40px" @click="enterUpdate">编 辑</el-button>
  18. </div>
  19. <div class="display-messege">
  20. <span style="white-space:nowrap">描述 :&nbsp;&nbsp;&nbsp;</span><div id="specialP" class="add-border" v-html="form.bugDescribe" />
  21. </div>
  22. <div class="display-messege">
  23. <div class="divide-threeparts">任务 :&nbsp;&nbsp;&nbsp;{{ form.taskName }}</div>
  24. <div class="divide-threeparts">业务线 :&nbsp;&nbsp;&nbsp;{{ bizId }}</div>
  25. <div class="divide-threeparts">平台类型 :&nbsp;&nbsp;&nbsp;{{ form.platformTypeName }}</div>
  26. </div>
  27. <div class="display-messege">
  28. <div class="divide-threeparts">类型 :&nbsp;&nbsp;&nbsp;{{ bugType }}</div>
  29. <div class="divide-threeparts">业务模块 :&nbsp;&nbsp;&nbsp;{{ form.clientName }}</div>
  30. <div class="divide-threeparts">所处阶段 :&nbsp;&nbsp;&nbsp;{{ form.stageName }}</div>
  31. </div>
  32. <div class="display-messege-end">
  33. <div class="divide-threeparts">发现方式 :&nbsp;&nbsp;&nbsp;{{ form.discoveryMethodName }}</div>
  34. <div class="divide-threeparts">问题原因 :&nbsp;&nbsp;&nbsp;{{ form.reasomName }}</div>
  35. <div class="divide-threeparts">工程模块 :&nbsp;&nbsp;&nbsp;{{ form.bizModuleName }}</div>
  36. </div>
  37. </div>
  38. <div class="block">
  39. <div class="display-messege">
  40. <div class="divide-threeparts">创建人 :&nbsp;&nbsp;&nbsp;{{ form.creatorList }}</div>
  41. <div class="divide-threeparts"><span>bug责任人 :</span>&nbsp;&nbsp;&nbsp;{{ form.assignerList }}</div>
  42. <div class="divide-threeparts"><span>当前处理人 :</span>&nbsp;&nbsp;&nbsp;{{ currentHandler }}</div>
  43. </div>
  44. <div class="display-messege">
  45. <div class="divide-threeparts">开始开发时间 :&nbsp;&nbsp;&nbsp;{{ form.startDevTime }}</div>
  46. <div class="divide-threeparts">创建时间 :&nbsp;&nbsp;&nbsp;{{ form.gmtCreate }}</div>
  47. <div class="divide-threeparts">提交测试时间 :&nbsp;&nbsp;&nbsp;{{ form.waitTestTime }}</div>
  48. </div>
  49. <div class="display-messege">
  50. <div class="divide-threeparts">是否过夜 :&nbsp;&nbsp;&nbsp;{{ form.overNigte }}</div>
  51. <div class="divide-threeparts">修复时间 :&nbsp;&nbsp;&nbsp;{{ form.finishTime }}</div>
  52. <div class="divide-threeparts">修复时长 :&nbsp;&nbsp;&nbsp;{{ form.fixTime }}</div>
  53. </div>
  54. <div class="display-messege-end">
  55. <div class="divide-threeparts">reopen次数 :&nbsp;&nbsp;&nbsp;{{ form.reopenTimes }}</div>
  56. <div class="divide-threeparts">reopen原因 :&nbsp;&nbsp;&nbsp;{{ form.reopenReason }}</div>
  57. </div>
  58. </div>
  59. <div class="block-end">
  60. <div class="display-messege">
  61. <div class="divide-threeparts">机型 :&nbsp;&nbsp;&nbsp;{{ form.model }}</div>
  62. <div class="divide-threeparts">地图类型 :&nbsp;&nbsp;&nbsp;{{ form.mapType }}</div>
  63. <div class="divide-threeparts">os类型 :&nbsp;&nbsp;&nbsp;{{ form.osType }}</div>
  64. </div>
  65. <div class="display-messege">
  66. <div class="divide-threeparts">地图版本号 :&nbsp;&nbsp;&nbsp;{{ form.mapVersion }}</div>
  67. <div class="divide-threeparts">网络类型 :&nbsp;&nbsp;&nbsp;{{ form.networkType }}</div>
  68. <div class="divide-threeparts">SDK版本 :&nbsp;&nbsp;&nbsp;{{ form.sdkVersion }}</div>
  69. </div>
  70. <div class="display-messege">
  71. <div class="divide-threeparts">app版本号 :&nbsp;&nbsp;&nbsp;{{ form.appVersion }}</div>
  72. <div class="divide-threeparts">修复结果 :&nbsp;&nbsp;&nbsp;{{ repairResult }}</div>
  73. <div class="divide-threeparts">修复方式 :&nbsp;&nbsp;&nbsp;{{ reasonsAndSolutionForTheProblem }}</div>
  74. </div>
  75. <div class="display-messege-end">
  76. <span style="white-space:nowrap">备注 :&nbsp;&nbsp;&nbsp;</span><div id="specialPAnother" class="add-border" v-html="form.remark" />
  77. </div>
  78. </div>
  79. <div class="block-end cla">
  80. <div class="display-messege">
  81. 附件 :
  82. <el-upload
  83. ref="upload"
  84. class="upload-demo"
  85. list-type="picture-card"
  86. multiple
  87. :on-remove="handleRemove"
  88. :on-preview="handlePictureCardPreview"
  89. accept="image/jpeg, image/png, image/gif, audio/mp4, video/mp4, audio/mpeg, application/vnd.ms-excel"
  90. :file-list="fileList"
  91. action="http://star.xiaojukeji.com/upload/img.node"
  92. :on-success="handleChange"
  93. >
  94. <el-button slot="trigger" size="small" type="primary">上传附件</el-button>
  95. </el-upload>
  96. <el-dialog :visible.sync="dialogVisible" width="80%">
  97. <img width="100%" :src="dialogImageUrl" alt="图片加载失败···">
  98. </el-dialog>
  99. </div>
  100. </div>
  101. </el-form>
  102. <el-dialog :visible.sync="dialogInDevelopment" width="40%" @close="cancelInput()">
  103. <el-form ref="refeshDevelopmentDialog" :model="pauseData" :rules="serviceDataRules">
  104. <el-form-item label="开发RD" prop="pauseCurrentHandler" label-width="30%">
  105. <el-select v-model="pauseData.pauseCurrentHandler" multiple filterable placeholder="公司邮箱前缀" style="width:76%;" @visible-change="realTimeChange">
  106. <el-option
  107. v-for="item in optionsCurrentHandlerRD"
  108. :key="item.id"
  109. :label="item.name"
  110. :value="item.email"
  111. />
  112. </el-select>
  113. </el-form-item>
  114. </el-form>
  115. <div slot="footer" class="dialog-footer">
  116. <el-button @click="dialogInDevelopment = false">取 消</el-button>
  117. <el-button type="primary" @click="queryFormData">确 定</el-button>
  118. </div>
  119. </el-dialog>
  120. <el-dialog :visible.sync="dialogWaitTest" width="40%" @close="cancelInput()">
  121. <el-form ref="refeshWaitTestDialog" :model="pauseData" :rules="serviceDataRules">
  122. <el-form-item label="验收QA" prop="pauseCurrentHandler" label-width="30%">
  123. <el-select v-model="pauseData.pauseCurrentHandler" multiple filterable placeholder="公司邮箱前缀" style="width:76%;" @visible-change="realTimeChange">
  124. <el-option
  125. v-for="item in optionsCurrentHandlerQA"
  126. :key="item.id"
  127. :label="item.name"
  128. :value="item.email"
  129. />
  130. </el-select>
  131. </el-form-item>
  132. <el-form-item style="flex-grow:1" label="问题原因" prop="reasonPause" label-width="30%">
  133. <el-select v-model="pauseData.reasonPause" placeholder="问题原因" style="width:76%;">
  134. <el-option v-for="item in reasonStr" :key="item.name" :label="item.name" :value="item.code" />
  135. </el-select>
  136. </el-form-item>
  137. <el-form-item style="flex-grow:1" label="bug类型" prop="bugTypePause" label-width="30%">
  138. <el-select v-model="pauseData.bugTypePause" placeholder="bug类型" style="width:76%;">
  139. <el-option v-for="item in bugTypeStr" :key="item.code" :label="item.name" :value="item.code" />
  140. </el-select>
  141. </el-form-item>
  142. <el-form-item label="修复方式" label-width="30%"><el-input v-model="pauseData.pauseReasonsAndSolutionForTheProblem" type="textarea" autocomplete="off" rows="3" style="width:76%;" /></el-form-item>
  143. </el-form>
  144. <div slot="footer" class="dialog-footer">
  145. <el-button @click="dialogWaitTest = false">取 消</el-button>
  146. <el-button type="primary" @click="queryFormDataTest">确 定</el-button>
  147. </div>
  148. </el-dialog>
  149. <el-dialog :visible.sync="dialogInRepairResult" width="40%">
  150. <el-form ref="refeshResultDialog" :model="pauseData" :rules="serviceDataRules">
  151. <el-form-item label="修复结果" prop="pauseRepairResult" label-width="30%">
  152. <el-select v-model="pauseData.pauseRepairResult" placeholder="修复结果" style="width:76%;">
  153. <el-option v-for="item in repairStr" :key="item.name" :label="item.name" :value="item.code" />
  154. </el-select>
  155. </el-form-item>
  156. <el-form-item v-show="pauseData.pauseRepairResult === 2 || pauseData.pauseRepairResult === 5" label="原因" label-width="30%"><el-input v-model="formUpdateValue.notFixReason" type="textarea" autocomplete="off" rows="3" style="width:76%;" /></el-form-item>
  157. </el-form>
  158. <div slot="footer" class="dialog-footer">
  159. <el-button @click="dialogInRepairResult = false">取 消</el-button>
  160. <el-button type="primary" @click="queryFormDataRepair">确 定</el-button>
  161. </div>
  162. </el-dialog>
  163. <el-dialog :visible.sync="dialogInReopen" width="40%">
  164. <el-form ref="refeshReopenDialog" :model="pauseData" :rules="serviceDataRules">
  165. <el-form-item label="reopen原因" prop="pauseReopenReason" label-width="30%">
  166. <el-input v-model="pauseData.pauseReopenReason" type="textarea" autocomplete="off" rows="3" style="width:76%;" />
  167. </el-form-item>
  168. </el-form>
  169. <div slot="footer" class="dialog-footer">
  170. <el-button @click="dialogInReopen = false">取 消</el-button>
  171. <el-button type="primary" @click="queryFormDataReopen">确 定</el-button>
  172. </div>
  173. </el-dialog>
  174. </div>
  175. </template>
  176. <script>
  177. import { bugGetEnum, bugUpdate, bugGet } from '@/api/defectManage'
  178. import { teamMembers } from '@/api/projectPage'
  179. import axios from 'axios'
  180. export default {
  181. data() {
  182. return {
  183. form: {
  184. id: ''
  185. },
  186. fileList: [],
  187. dialogInReopen: false,
  188. uptataKey: [],
  189. formUpdateValue: {},
  190. dialogVisible: false,
  191. dialogImageUrl: [],
  192. pauseData: {
  193. reasonPause: '',
  194. bugTypePause: '',
  195. pauseCurrentHandler: '',
  196. pauseRepairResult: '',
  197. pauseReasonsAndSolutionForTheProblem: '',
  198. pauseReopenReason: ''
  199. },
  200. serviceDataRules: {
  201. pauseCurrentHandler: [{ required: true, message: '处理人不能为空', trigger: 'blur' }],
  202. reasonPause: [{ required: true, message: '问题原因不能为空', trigger: 'change' }],
  203. bugTypePause: [{ required: true, message: 'bug类型不能为空', trigger: 'change' }],
  204. pauseRepairResult: [{ required: true, message: '修复结果不能为空', trigger: 'change' }],
  205. pauseReopenReason: [{ required: true, message: 'reopen原因不能为空', trigger: 'change' }]
  206. // pauseReasonsAndSolutionForTheProblem: [{ required: true, message: '修复方式不能为空', trigger: 'change' }]
  207. },
  208. bizId: '',
  209. optionsCurrentHandlerQA: [],
  210. optionsCurrentHandlerRD: [],
  211. currentHandler: '',
  212. formLabelWidth: '5.1%',
  213. twoLable: '20%',
  214. bugLevelStr: [],
  215. bugStatusStr: [],
  216. repairStr: [],
  217. repairResult: '',
  218. reasonsAndSolutionForTheProblem: '',
  219. userData: '',
  220. bugTypeStr: [],
  221. reasonStr: [],
  222. reason: [],
  223. bugType: [],
  224. bizIdEnumList: [],
  225. userInformation: localStorage.getItem('username'),
  226. userNames: localStorage.getItem('realname'),
  227. dialogInDevelopment: false,
  228. dialogWaitTest: false,
  229. dialogInRepairResult: false,
  230. fileDbList: []
  231. }
  232. },
  233. created() {
  234. this._initBegin()
  235. // this.getLocalStor()
  236. },
  237. methods: {
  238. handleRemove(file, fileList) {
  239. this.fileDbList = this.fileDbList.filter(item => {
  240. return item.name !== file.name
  241. })
  242. this.accessory = JSON.stringify(this.fileDbList)
  243. this.createFormData()
  244. },
  245. handlePictureCardPreview(file) {
  246. this.dialogImageUrl = file.url
  247. this.dialogVisible = true
  248. },
  249. handleChange(response, file, fileList) {
  250. this.fileDbList.push({ 'name': file.name, 'url': 'http:' + file.response.url })
  251. this.accessory = JSON.stringify(this.fileDbList)
  252. this.$message({ showClose: true, message: '文件上传成功', type: 'success' })
  253. this.createFormData()
  254. },
  255. createFormData() {
  256. var form = {
  257. id: this.$route.query.id,
  258. accessory: this.accessory
  259. }
  260. this.userData = { id: '', ename: this.userInformation, name: this.userNames }
  261. this.objData = { bugBaseInfo: form, user: this.userData }
  262. bugUpdate(this.objData).then(res => {
  263. res.code === 200 ? this.successFun() : this.errorFun()
  264. })
  265. },
  266. // 先后获取
  267. async _initBegin() {
  268. await bugGetEnum().then(res => {
  269. this.bugStatusStr = res.data.bugEnumList
  270. this.bugLevelStr = res.data.priorityEnumList
  271. this.bizIdEnumList = res.data.bizIdEnumList
  272. this.bugTypeStr = res.data.bugTypeEnumList
  273. this.reasonStr = res.data.reasonEnumList
  274. this.repairStr = res.data.repairResultEnumList
  275. })
  276. bugGet(this.$route.query.id).then(res => {
  277. this.form = res.data
  278. this.$nextTick(() => {
  279. if (document.getElementById('specialP').childNodes[0])document.getElementById('specialP').childNodes[0].style.cssText = 'margin-top:0'
  280. if (document.getElementById('specialPAnother').childNodes[0])document.getElementById('specialPAnother').childNodes[0].style.cssText = 'margin-top:0'
  281. })
  282. this.fileList = []
  283. var str = res.data.accessory
  284. if (str !== '' && str !== null) {
  285. var obj = JSON.parse(str.split('{}')[0])
  286. for (var a of obj) {
  287. this.fileList.push(a)
  288. this.fileDbList.push(a)
  289. }
  290. }
  291. for (const a of this.bizIdEnumList) {
  292. if (this.form.bizId === a.code) {
  293. this.bizId = this.form.bizName
  294. this.currentHandler = this.form.currentHandlerList
  295. this.repairResult = this.form.repairResultName
  296. this.reason = this.form.reason
  297. this.bugType = this.form.bugTypeName
  298. this.reasonsAndSolutionForTheProblem = this.form.reasonsAndSolutionForTheProblem
  299. return
  300. } else {
  301. this.bizId = ''
  302. }
  303. }
  304. })
  305. },
  306. priorityChange() {
  307. this.formUpdateValue.currentHandler = this.form.currentHandler
  308. this.formUpdateValue.id = this.form.id
  309. this.formUpdateValue.priority = this.form.priority
  310. this.userData = { id: '', ename: this.userInformation, name: this.userNames }
  311. this.objData = { bugBaseInfo: this.formUpdateValue, user: this.userData }
  312. bugUpdate(this.objData).then(res => {
  313. if (res.code === 200) {
  314. this.successFun()
  315. if (this.$refs.refeshDevelopmentDialog !== undefined) {
  316. this.$refs.refeshDevelopmentDialog.resetFields()
  317. }
  318. } else {
  319. this.errorFun()
  320. }
  321. this.formUpdateValue = {}
  322. })
  323. },
  324. // 弹窗关闭时重置
  325. cancelInput() {
  326. this.pauseData.pauseCurrentHandler = ''
  327. },
  328. // reopen弹窗
  329. queryFormDataReopen() {
  330. this.$refs.refeshReopenDialog.validate((valid) => {
  331. if (valid) {
  332. this.formUpdateValue.currentHandler = this.form.currentHandler
  333. this.formUpdateValue.id = this.form.id
  334. this.formUpdateValue.status = this.form.status
  335. this.formUpdateValue.reopenReason = this.pauseData.pauseReopenReason
  336. this.userData = { id: '', ename: this.userInformation, name: this.userNames }
  337. this.objData = { bugBaseInfo: this.formUpdateValue, user: this.userData }
  338. bugUpdate(this.objData).then(res => {
  339. if (res.code === 200) {
  340. this.successFun()
  341. this._initBegin()
  342. if (this.$refs.refeshReopenDialog !== undefined) {
  343. this.$refs.refeshReopenDialog.resetFields()
  344. }
  345. } else {
  346. this.errorFun()
  347. }
  348. })
  349. this.dialogInReopen = false
  350. this.formUpdateValue = {}
  351. }
  352. })
  353. },
  354. statusChange(e) {
  355. if (e === 1) {
  356. this.dialogInDevelopment = true
  357. this.getMember() // 人员搜索
  358. this.pauseData.pauseCurrentHandler = this.form.assigner.split(',')
  359. } else if (e === 2) {
  360. this.dialogWaitTest = true
  361. this.getMember() // 人员搜索
  362. this.pauseData.pauseCurrentHandler = this.form.creator.split(',')
  363. this.pauseData.bugTypePause = this.form.bugType
  364. } else if (e === 3) {
  365. this.dialogInRepairResult = true
  366. } else if (e === 4) {
  367. this.dialogInReopen = true
  368. } else {
  369. this.formUpdateValue.currentHandler = this.form.currentHandler
  370. this.formUpdateValue.id = this.form.id
  371. this.formUpdateValue.status = this.form.status
  372. this.userData = { id: '', ename: this.userInformation, name: this.userNames }
  373. this.objData = { bugBaseInfo: this.formUpdateValue, user: this.userData }
  374. bugUpdate(this.objData).then(res => {
  375. if (res.code === 200) {
  376. this.successFun()
  377. this._initBegin()
  378. if (this.$refs.refeshDevelopmentDialog !== undefined) {
  379. this.$refs.refeshDevelopmentDialog.resetFields()
  380. }
  381. } else {
  382. this.errorFun()
  383. }
  384. })
  385. this.formUpdateValue = {}
  386. }
  387. },
  388. // 点击一次更新一次
  389. realTimeChange(e) {
  390. if (e === true) this.getMember()
  391. },
  392. // 人员搜索
  393. getMember() {
  394. const objDataRD = { bizId: this.form.bizId, email: '', role: 'rd' }
  395. const objDataQA = { bizId: this.form.bizId, email: '', role: 'qa' }
  396. axios.all([teamMembers(objDataRD), teamMembers(objDataQA)]).then(axios.spread((resRD, resQA) => {
  397. if (resRD.code === 200 && resQA.code === 200) {
  398. this.optionsCurrentHandlerRD = resRD.data
  399. this.optionsCurrentHandlerQA = resQA.data
  400. } else {
  401. this.errorFun('人员数据获取失败')
  402. }
  403. }))
  404. },
  405. queryFormData() {
  406. this.$refs.refeshDevelopmentDialog.validate((valid) => {
  407. if (valid) {
  408. if (this.dialogWaitTest || this.dialogInDevelopment) {
  409. this.form.currentHandler = this.pauseData.pauseCurrentHandler.join(',')
  410. }
  411. this.formUpdateValue.currentHandler = this.form.currentHandler
  412. this.formUpdateValue.id = this.form.id
  413. this.formUpdateValue.status = this.form.status
  414. this.userData = { id: '', ename: this.userInformation, name: this.userNames }
  415. this.objData = { bugBaseInfo: this.formUpdateValue, user: this.userData }
  416. bugUpdate(this.objData).then(res => {
  417. if (res.code === 200) {
  418. this.successFun()
  419. this._initBegin()
  420. if (this.$refs.refeshDevelopmentDialog !== undefined) {
  421. this.$refs.refeshDevelopmentDialog.resetFields()
  422. }
  423. } else {
  424. this.errorFun()
  425. }
  426. this.dialogInDevelopment = false
  427. this.formUpdateValue = {}
  428. })
  429. }
  430. })
  431. },
  432. queryFormDataTest() {
  433. this.$refs.refeshWaitTestDialog.validate((valid) => {
  434. if (valid) {
  435. if (this.dialogWaitTest || this.dialogInDevelopment) {
  436. this.form.currentHandler = this.pauseData.pauseCurrentHandler.join(',')
  437. this.form.reason = this.pauseData.reasonPause
  438. this.form.bugType = this.pauseData.bugTypePause
  439. }
  440. this.formUpdateValue.currentHandler = this.form.currentHandler
  441. this.formUpdateValue.id = this.form.id
  442. this.formUpdateValue.status = this.form.status
  443. this.formUpdateValue.reason = this.pauseData.reasonPause
  444. this.formUpdateValue.bugType = this.pauseData.bugTypePause
  445. this.formUpdateValue.reasonsAndSolutionForTheProblem = this.pauseData.pauseReasonsAndSolutionForTheProblem
  446. this.userData = { id: '', ename: this.userInformation, name: this.userNames }
  447. this.objData = { bugBaseInfo: this.formUpdateValue, user: this.userData }
  448. bugUpdate(this.objData).then(res => {
  449. if (res.code === 200) {
  450. this.successFun()
  451. this._initBegin()
  452. this.form.reasomName = this.reasonStr.filter(value => value.code === this.pauseData.reasonPause)[0].name
  453. this.bugType = this.bugTypeStr.filter(value => value.code === this.pauseData.bugTypePause)[0].name
  454. this.reasonsAndSolutionForTheProblem = this.form.reasonsAndSolutionForTheProblem
  455. if (this.$refs.refeshWaitTestDialog !== undefined) {
  456. this.$refs.refeshWaitTestDialog.resetFields()
  457. }
  458. } else {
  459. this.errorFun()
  460. }
  461. this.dialogWaitTest = false
  462. this.formUpdateValue = {}
  463. })
  464. }
  465. })
  466. },
  467. queryFormDataRepair() {
  468. this.$refs.refeshResultDialog.validate((valid) => {
  469. if (valid) {
  470. if (this.dialogInRepairResult) {
  471. this.form.repairResult = this.pauseData.pauseRepairResult
  472. }
  473. this.formUpdateValue.currentHandler = this.form.currentHandler
  474. this.formUpdateValue.id = this.form.id
  475. this.formUpdateValue.status = this.form.status
  476. this.formUpdateValue.repairResult = this.form.repairResult
  477. this.userData = { id: '', ename: this.userInformation, name: this.userNames }
  478. this.objData = { bugBaseInfo: this.formUpdateValue, user: this.userData }
  479. bugUpdate(this.objData).then(res => {
  480. if (res.code === 200) {
  481. this.successFun()
  482. this._initBegin()
  483. this.repairResult = this.form.repairResult
  484. if (this.$refs.refeshResultDialog !== undefined) {
  485. this.$refs.refeshResultDialog.resetFields()
  486. }
  487. } else {
  488. this.errorFun()
  489. }
  490. this.dialogInRepairResult = false
  491. this.formUpdateValue = {}
  492. })
  493. }
  494. })
  495. },
  496. enterUpdate() {
  497. this.$router.push({ name: '更新Bug', params: { formData: this.form }, query: { id: this.form.id }})
  498. },
  499. successFun() {
  500. this.$notify({ title: 'Success', message: 'Update Successfully', type: 'success', duration: 2000 })
  501. },
  502. errorFun() {
  503. this.$notify({ title: 'Failed', message: 'Update Failed', type: 'error', duration: 2000 })
  504. }
  505. }
  506. }
  507. </script>
  508. <style>
  509. .cla .el-table td {
  510. padding:0px;
  511. }
  512. </style>
  513. <style lang="stylus" scoped>
  514. .set-background
  515. background-color #F2F3F6
  516. display flex
  517. justify-content center
  518. .block
  519. background-color rgba(255,255,255,1)
  520. box-shadow 0px 0px 11px 0px rgba(238,240,245,1)
  521. border-radius 7px
  522. width 82vw
  523. margin-top 25px
  524. padding 29px 50px
  525. .block >>> .el-form-item__content
  526. margin-left 0 !important
  527. .display-messege
  528. font-size 14px
  529. font-family PingFangSC-Regular,PingFangSC
  530. font-weight 400
  531. color rgba(51,59,74,1)
  532. display flex
  533. width 100%
  534. margin-bottom 40px
  535. .add-border
  536. .add-border >>> table
  537. border-collapse collapse
  538. .add-border >>> table tr td
  539. border solid 1px black
  540. .add-border >>> table tr th
  541. border solid 1px black
  542. .display-messege-end
  543. font-size 14px
  544. font-family PingFangSC-Regular,PingFangSC
  545. font-weight 400
  546. color rgba(51,59,74,1)
  547. display flex
  548. width 100%
  549. .add-border
  550. .add-border >>> table
  551. border-collapse collapse
  552. .add-border >>> table tr td
  553. border solid 1px black
  554. .add-border >>> table tr th
  555. border solid 1px black
  556. .divide-threeparts
  557. width 33.3%
  558. white-space pre-wrap
  559. word-wrap break-word
  560. padding-right 30px
  561. span
  562. white-space nowrap
  563. .block-end
  564. background-color rgba(255,255,255,1)
  565. box-shadow 0px 0px 11px 0px rgba(238,240,245,1)
  566. border-radius 7px
  567. width 82vw
  568. margin-top 25px
  569. padding 29px 50px
  570. margin-bottom 22px
  571. .wrap
  572. display flex
  573. flex-wrap wrap
  574. .wrap >>> .el-form-item__content
  575. width 250px
  576. display block
  577. word-break break-all
  578. word-wrap break-word
  579. // .remark-length >>> .el-form-item__content
  580. // width 450px
  581. // display block
  582. // word-break break-all
  583. // word-wrap break-word
  584. </style>