submitPopup.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670
  1. <template>
  2. <div>
  3. <el-dialog title="提交初审"
  4. :close-on-click-modal="false"
  5. :visible.sync="dialogVisibleCom"
  6. width="520px">
  7. <el-form ref="searchForm"
  8. label-width="100px">
  9. <el-row>
  10. <el-col :span="24">
  11. <el-form-item label="初审人员">
  12. <el-select ref="selectAuditer"
  13. v-model="auditer"
  14. placeholder="请选择初审人"
  15. style="width: 100%"
  16. filterable
  17. default-first-option
  18. @change="auditOrgChang()">
  19. <el-option v-for="item in firOptions"
  20. :key="item.Id"
  21. :label="item.Realname"
  22. :value="item.Id">
  23. </el-option>
  24. </el-select>
  25. </el-form-item>
  26. <el-form-item label="复审人员">
  27. <el-select ref="selectAuditer"
  28. v-model="fushenauditer"
  29. placeholder="请选择复审人"
  30. style="width: 100%"
  31. filterable
  32. default-first-option>
  33. <el-option v-for="item in secauditerOptions"
  34. :key="item.Id"
  35. :label="item.Realname"
  36. :value="item.Id">
  37. </el-option>
  38. </el-select>
  39. </el-form-item>
  40. <el-form-item label="专业处室">
  41. <el-select v-model="selectDept"
  42. filterable
  43. placeholder="请选择"
  44. style="width: 100%"
  45. @change="changeOrgUnit">
  46. <el-option v-for="item in allorgunitOptions"
  47. :key="item.Id"
  48. :label="item.Fullname"
  49. :value="item.Id">
  50. </el-option>
  51. </el-select>
  52. </el-form-item>
  53. </el-col>
  54. <el-col :span="24">
  55. <el-form-item label="备注">
  56. <el-input v-model="auditform.AuditRemark"
  57. type="textarea"
  58. placeholder="请输入备注内容">
  59. </el-input>
  60. </el-form-item>
  61. </el-col>
  62. </el-row>
  63. </el-form>
  64. <span slot="footer"
  65. class="dialog-footer">
  66. <el-button size="mini"
  67. @click="dialogVisibleCom = false">取 消</el-button>
  68. <el-button size="mini"
  69. type="primary"
  70. @click="secondaryUnitSubmitApply" :loading="loading">确定</el-button>
  71. </span>
  72. </el-dialog>
  73. <!-- 复审 -->
  74. <el-dialog title="审核" :close-on-click-modal="false" :visible.sync="dialogCommonAuditMakeSureVisible">
  75. <el-form :model="shenheForm" label-width="100px" ref="shenheForm">
  76. <el-form-item label="审核状态">
  77. <template>
  78. <el-radio class="radio" v-model="shenheForm.SuccessStatus" :label="1" @change="radioChange">通过</el-radio>
  79. <el-radio class="radio" v-model="shenheForm.SuccessStatus" :label="0" @change="radioChange">退回</el-radio>
  80. </template>
  81. </el-form-item>
  82. <el-form-item label="意见" :rules="[{ required: true, message: '请输入审批意见', trigger: 'blur' }]">
  83. <el-input type="textarea" v-model="shenheForm.AuditorRemark" :placeholder="textplaceholder">
  84. </el-input>
  85. </el-form-item>
  86. </el-form>
  87. <div slot="footer" class="dialog-footer" style="margin-top: -25px">
  88. <el-button size="small" @click="dialogCommonAuditMakeSureVisible = false">取 消</el-button>
  89. <el-button type="primary" size="small" @click="commonAuditMakeSure()" :loading="btnloading">确 定</el-button>
  90. </div>
  91. </el-dialog>
  92. <!-- 专业科室接收 -->
  93. <el-dialog title="分配" :close-on-click-modal="false" :visible.sync="dialogBusinessOfficeSeparateAuditVisible">
  94. <el-form :model="shenheForm" label-width="100px" ref="shenheForm">
  95. <el-form-item label="审批人">
  96. <el-select ref="selectAuditer" v-model="ProfessionalAudit" placeholder="请选择" style="width: 100%" filterable
  97. default-first-option>
  98. <el-option v-for="item in secauditerOptions" :key="item.Id" :label="item.Realname" :value="item.Id">
  99. </el-option>
  100. </el-select>
  101. </el-form-item>
  102. <el-form-item label="意见">
  103. <el-input type="textarea" v-model="shenheForm.AuditorRemark" placeholder="请输入审核意见"></el-input>
  104. </el-form-item>
  105. </el-form>
  106. <div slot="footer" class="dialog-footer" style="margin-top: -25px">
  107. <el-button size="small" @click="dialogBusinessOfficeSeparateAuditVisible = false">取 消</el-button>
  108. <el-button type="primary" size="small" @click="businessOfficeSeparateAuditMakeSure()" :loading="btnloading">确
  109. </el-button>
  110. </div>
  111. </el-dialog>
  112. <!-- 专业科室接收 批量审批 -->
  113. <el-dialog title="分配" :close-on-click-modal="false" :visible.sync="dialogBusinessOfficeSeparateBatchAuditVisible">
  114. <el-form :model="shenheForm" label-width="100px" ref="shenheForm">
  115. <el-form-item label="审批人">
  116. <el-select ref="selectAuditer" v-model="ProfessionalAudit" placeholder="请选择" style="width: 100%" filterable
  117. default-first-option>
  118. <el-option v-for="item in secauditerOptions" :key="item.Id" :label="item.Realname" :value="item.Id">
  119. </el-option>
  120. </el-select>
  121. </el-form-item>
  122. <el-form-item label="意见">
  123. <el-input type="textarea" v-model="shenheForm.AuditorRemark" placeholder="请输入审核意见"></el-input>
  124. </el-form-item>
  125. </el-form>
  126. <div slot="footer" class="dialog-footer" style="margin-top: -25px">
  127. <el-button size="small" @click="dialogBusinessOfficeSeparateBatchAuditVisible = false">取 消</el-button>
  128. <el-button type="primary" size="small" @click="businessOfficeSeparateBatchAuditMakeSure()" :loading="btnloading">确
  129. </el-button>
  130. </div>
  131. </el-dialog>
  132. <choose-auditor-fen ref="chooseAuditorFen"
  133. @close="setAuditerFen"
  134. @hideChooseAuditer="chooseAuditorVisibleFen=false"
  135. :visible="chooseAuditorVisibleFen"></choose-auditor-fen>
  136. </div>
  137. </template>
  138. <script>
  139. import {mapGetters} from 'vuex'
  140. import ChooseAuditorFen from '@/components/oilsupplier/chooseauditorfenban'
  141. import api from '@/api/oilsupplier/supplier'
  142. import apiCert from '@/api/oilsupplier/suppliercert'
  143. import apiOilcontract from '@/api/oilcontract/contract'
  144. export default {
  145. computed: {
  146. ...mapGetters({
  147. authUser: 'authUser'
  148. })
  149. },
  150. name: 'submitPopup',
  151. components: {
  152. ChooseAuditorFen
  153. },
  154. props: {
  155. // 从合同进来还是从编辑进来 1合同2编辑
  156. eveId: {
  157. type: null,
  158. default: 0
  159. },
  160. formData: {
  161. type: Object,
  162. default: function () {
  163. return {}
  164. }
  165. },
  166. examineType: {
  167. type: Number,
  168. default: 0
  169. },
  170. selectDeptBoolean: {
  171. type: Boolean,
  172. default: true
  173. },
  174. selectDeptBoolean2: {
  175. type: Boolean,
  176. default: false
  177. }
  178. },
  179. data () {
  180. return {
  181. dialogVisibleCom: false, // 初审
  182. dialogCommonAuditMakeSureVisible: false, // 复审
  183. dialogBusinessOfficeSeparateAuditVisible: false, // 专业科室接收
  184. dialogBusinessOfficeSeparateBatchAuditVisible: false, // 专业科室接收批量审批
  185. chooseAuditorVisibleFen: false,
  186. auditer: '',
  187. auditerName: '',
  188. firOptions: [],
  189. fushenauditer: '', // 复审人员
  190. selectDept: this.selectDeptBoolean2 ? 100000662 : (this.selectDeptBoolean ? 100000653 : ''),
  191. allorgunitOptions: [],
  192. auditform: {
  193. FirstAuditName: '',
  194. SecondAudit: '',
  195. ThirdAudit: '',
  196. CertId: '',
  197. AuditRemark: '',
  198. TypeCode: '02'
  199. },
  200. majorDept: [100000000, 100000004, 100000662],
  201. // 复审的变量
  202. shenheForm: {
  203. SuccessStatus: 1,
  204. AuditorRemark: '',
  205. AppendId: 0,
  206. Auditer: '',
  207. MajorDept: ''
  208. },
  209. btnloading: false,
  210. textplaceholder: '审核意见须具体、明确(含企业资质、资信、能力等内容)',
  211. // 专业科室接收
  212. ProfessionalAudit: '',
  213. secauditerOptions: [],
  214. loading: false,
  215. UnitOrgOptions: [],
  216. UnitOrg: ''
  217. }
  218. },
  219. created () {
  220. console.log(this.eveId, 'eveId')
  221. this.getFirAuditerByDept()
  222. this.getDictOptions()
  223. this.orgtreeChange(this.majorDept)
  224. },
  225. methods: {
  226. // 专业科室接收
  227. // 数据
  228. auditOrgChange () {
  229. let auditstepcode = ''
  230. if (this.formData.Status === '1') {
  231. auditstepcode = 'SECOND_TRIAL'
  232. } else if (this.formData.Status === '3') {
  233. auditstepcode = 'PROF_AUDIT'
  234. } else if (this.formData.Status === '10') {
  235. auditstepcode = 'SECOND_TRIAL'
  236. } else {
  237. return
  238. }
  239. api.getAuditerByDept(this.authUser.Profile.DepartmentId, auditstepcode, this.$axios).then(res => {
  240. this.secauditerOptions = res.data.item
  241. }).catch(err => {
  242. console.error(err)
  243. })
  244. },
  245. // 业务处室分办 单条(待办入口)
  246. businessOfficeSeparateAuditMakeSure () {
  247. if (this.ProfessionalAudit === '') {
  248. this.$message({
  249. type: 'warning',
  250. message: '请选择审批人!'
  251. })
  252. return
  253. }
  254. let params = {
  255. ProfessionalAudit: this.ProfessionalAudit,
  256. AuditRemark: this.shenheForm.AuditorRemark
  257. }
  258. this.btnloading = true
  259. console.log('业务处室专业审批, 提交参数: ', params)
  260. let _this = this
  261. var apiName = ['businessSeparateAudit', 'businessSeparateAuditYear']
  262. apiOilcontract[apiName[this.examineType]](this.formData.Id, params, this.$axios).then(res => {
  263. if (res.data.code === 0) {
  264. console.log('审批提交,成功返回')
  265. this.$message({
  266. type: 'success',
  267. message: res.data.message
  268. })
  269. setTimeout(function () {
  270. _this.$nextTick(() => {
  271. _this.$emit('refreshPage', {})
  272. // TODO loading
  273. })
  274. }, 5000)
  275. // _this.$refs['WfHistory'].getHistoryTask()
  276. } else {
  277. this.$message({
  278. type: 'warning',
  279. message: res.data.message
  280. })
  281. }
  282. _this.dialogBusinessOfficeSeparateAuditVisible = false
  283. _this.btnloading = false
  284. }).catch(err => {
  285. console.error(err)
  286. })
  287. },
  288. // 日常评价业务处室分办 批量审批
  289. businessOfficeSeparateBatchAuditMakeSure () {
  290. if (this.ProfessionalAudit === '') {
  291. this.$message({
  292. type: 'warning',
  293. message: '请选择审批人!'
  294. })
  295. return
  296. }
  297. let params = {
  298. ProfessionalAudit: this.ProfessionalAudit,
  299. AuditRemark: this.shenheForm.AuditorRemark
  300. }
  301. this.btnloading = true
  302. let _this = this
  303. apiOilcontract['businessSeparateAudit'](this.eveId, params, this.$axios).then(res => {
  304. if (res.data.code === 0) {
  305. this.$message({
  306. type: 'success',
  307. message: res.data.message
  308. })
  309. setTimeout(function () {
  310. _this.$nextTick(() => {
  311. _this.$emit('refreshPage', {})
  312. // TODO loading
  313. })
  314. }, 5000)
  315. } else {
  316. this.$message({
  317. type: 'warning',
  318. message: res.data.message
  319. })
  320. }
  321. _this.dialogBusinessOfficeSeparateBatchAuditVisible = false
  322. _this.btnloading = false
  323. }).catch(err => {
  324. console.error(err)
  325. })
  326. },
  327. // 复审的方法。。。。。。。。。。。。。。。
  328. // 选择审批选项
  329. radioChange () {
  330. if (this.shenheForm.SuccessStatus === 1) {
  331. // this.textplaceholder = '审核意见须具体、明确(含企业资质、资信、能力等内容)'
  332. if (this.formData.Status === '5') {
  333. this.textplaceholder = '请填写审批意见'
  334. } else {
  335. this.textplaceholder = '审核意见须具体、明确(含企业资质、资信、能力等内容)'
  336. }
  337. } else {
  338. if (this.formData.Status === '5') {
  339. this.textplaceholder = ''
  340. } else {
  341. this.textplaceholder = '退回意见不能少于2个字'
  342. }
  343. this.shenheForm.AuditorRemark = ''
  344. }
  345. },
  346. // 确定提交
  347. commonAuditMakeSure () {
  348. let checkRes = this.commonAuditParamsCheck()
  349. console.log('审批结果公共提交,参数检查结果', checkRes)
  350. if (!checkRes) {
  351. return false
  352. }
  353. this.btnloading = true
  354. let params = {
  355. result: this.shenheForm.SuccessStatus,
  356. AuditRemark: this.shenheForm.AuditorRemark
  357. }
  358. console.log('审批结果提交参数:', params)
  359. let _this = this
  360. var apiName = ['contractCommonAudit', 'contractCommonAuditYear']
  361. apiOilcontract[apiName[this.examineType]](this.eveId, params, this.$axios).then(res => {
  362. if (res.data.code === 0) {
  363. console.log('审批提交,成功返回')
  364. this.$message({
  365. type: 'success',
  366. message: res.data.message
  367. })
  368. setTimeout(function () {
  369. _this.$nextTick(() => {
  370. _this.$emit('refreshPage', {})
  371. // TODO loading
  372. })
  373. }, 5000)
  374. } else {
  375. this.$message({
  376. type: 'warning',
  377. message: res.data.message
  378. })
  379. }
  380. _this.dialogCommonAuditMakeSureVisible = false
  381. _this.btnloading = false
  382. }).catch(err => {
  383. console.error(err)
  384. _this.btnloading = false
  385. })
  386. },
  387. commonAuditParamsCheck () {
  388. if (this.shenheForm.SuccessStatus === 1) {
  389. if ((!this.auditer || this.auditer === 0) && (this.formData.Status == '0' || this.formData.Status == '10' || this.formData.Status == '3')) {
  390. this.$message({
  391. type: 'warning',
  392. message: '请选择审核人!'
  393. })
  394. return
  395. }
  396. if (this.formData.Status == '10') {
  397. if (!this.fushenauditer || this.fushenauditer === 0) {
  398. this.$message({
  399. type: 'warning',
  400. message: '请选择复审人!'
  401. })
  402. return
  403. }
  404. if ((this.formData.InStyle != '2' && this.formData.InStyle != '6' && this.formData.InStyle != '4') && (this.formData.inStyle == '3' && this.MgrUnit)) {
  405. if (this.selectDept === 0 || this.selectDept == '') {
  406. this.$message({
  407. type: 'warning',
  408. message: '请选择专业处室!'
  409. })
  410. return
  411. }
  412. }
  413. if ((this.formData.InStyle != '2' && this.formData.InStyle != '6' && this.formData.InStyle != '4') && (this.formData.inStyle == '3' && this.MgrUnit)) {
  414. if (this.userOptions == null || this.userOptions.length === 0) {
  415. this.$message({
  416. type: 'warning',
  417. message: '该专业科室未配置接收人!'
  418. })
  419. return
  420. }
  421. }
  422. }
  423. if (this.shenheForm.AuditorRemark.trim().length < 2 && this.formData.Status !== '3' && this.formData
  424. .Status !== '5' && this.formData.Status !== '10') {
  425. this.$message({
  426. type: 'warning',
  427. message: '审批意见不能少于2个字!'
  428. })
  429. return false
  430. }
  431. if (this.shenheForm.AuditorRemark.trim().length < 1 && this.formData.Status === '5') {
  432. this.$message({
  433. type: 'warning',
  434. message: '请填写审批意见!'
  435. })
  436. return false
  437. }
  438. } else {
  439. if (this.formData.Status === '10') {
  440. this.shenheForm.AuditorRemark = this.backRemark
  441. }
  442. if (this.shenheForm.AuditorRemark.trim().length < 2 && this.formData.Status !== '3' && this.formData
  443. .Status !== '5') {
  444. this.$message({
  445. type: 'warning',
  446. message: '退回意见不能少于2个字!'
  447. })
  448. return
  449. }
  450. if (this.shenheForm.AuditorRemark.trim().length < 1 && this.formData.Status === '5') {
  451. this.$message({
  452. type: 'warning',
  453. message: '请填写退回意见!'
  454. })
  455. return false
  456. }
  457. }
  458. return true
  459. },
  460. // 。。。。
  461. setAuditerFen (val, name) {
  462. this.auditer = val
  463. this.auditerName = name
  464. this.chooseAuditorVisibleFen = false
  465. this.auditOrgChang(this.auditer)
  466. },
  467. orgtreeChange (val) {
  468. this.userOptions = []
  469. console.log(val, '22222222')
  470. let deptid = val[val.length - 1]
  471. let auditstepcode = 'PROF_RECE'
  472. api.getAuditerByDept(deptid, auditstepcode, this.$axios).then(res => {
  473. console.log('专业处室人111', res)
  474. this.userOptions = res.data.item
  475. }).catch(err => {
  476. console.error(err)
  477. })
  478. },
  479. getFirAuditerByDept () {
  480. console.log('submitPopup')
  481. let deptId = this.authUser.Profile.DepartmentId
  482. this.userOptions = []
  483. let auditStepCode = 'FIRST_TRIAL' // 初审人
  484. api.getFirAuditerByDept(deptId, auditStepCode, this.$axios).then(res => {
  485. this.firOptions = res.data.item
  486. }).catch(err => {
  487. console.error(err)
  488. })
  489. },
  490. secondaryUnitSubmitApply (val) {
  491. if (!this.auditer) {
  492. this.$message({
  493. type: 'warning',
  494. message: '请选择审批人!'
  495. })
  496. return false
  497. }
  498. if (!this.fushenauditer) {
  499. this.$message({
  500. type: 'warning',
  501. message: '请选择复审人!'
  502. })
  503. return false
  504. }
  505. if (!this.selectDept) {
  506. this.$message({
  507. type: 'warning',
  508. message: '请选择专业处室!'
  509. })
  510. return false
  511. }
  512. if (!this.userOptions || this.userOptions.length === 0) {
  513. this.$message({
  514. type: 'warning',
  515. message: '该专业科室未配置接收人!'
  516. })
  517. return false
  518. }
  519. this.loading = true
  520. // this.applyLoading = true
  521. let params = {
  522. 'FirstAudit': String(this.auditer),
  523. 'SecondAudit': String(this.fushenauditer),
  524. 'ThirdAudit': String(this.selectDept), // this.majorDept[this.majorDept.length - 1] 专业处室部门id
  525. 'AuditRemark': this.auditform.AuditRemark
  526. }
  527. var apiName = ['contractUnitAudit', 'contractUnitAuditYear']
  528. apiOilcontract[apiName[this.examineType]](this.eveId, params, this.$axios).then(res => {
  529. if (res.data.code === 0) {
  530. // 保存成功后,初始化数据,变成修改
  531. // this.initDatas()
  532. // if (this.$refs['WfHistory']) {
  533. // this.$refs['WfHistory'].getHistoryTask()
  534. // }
  535. this.$parent.showIdDatas(this.eveId);
  536. this.dialogVisibleCom = false
  537. this.$message({
  538. type: 'success',
  539. message: res.data.message
  540. })
  541. } else {
  542. this.$message({
  543. type: 'warning',
  544. message: res.data.message
  545. })
  546. }
  547. // this.applyLoading = false
  548. this.loading = false
  549. }).catch(err => {
  550. console.error(err)
  551. })
  552. },
  553. auditOrgChang () {
  554. let auditstepcode = 'SECOND_TRIAL'
  555. api
  556. .getAuditerByFirst(this.auditer, auditstepcode, this.$axios)
  557. .then(res => {
  558. this.secauditerOptions = res.data.item
  559. })
  560. .catch(err => {
  561. console.error(err)
  562. })
  563. },
  564. changeOrgUnit (val) {
  565. let auditstepcode = 'PROF_RECE'
  566. api.getAuditerByDept(val, auditstepcode, this.$axios).then(res => {
  567. console.log('专业处室人222', res)
  568. this.userOptions = res.data.item
  569. }).catch(err => {
  570. console.error(err)
  571. })
  572. },
  573. getDictOptions () {
  574. let params = {
  575. status: this.formData.Status,
  576. majorAduit: this.formData.ThirdAudit
  577. }
  578. api.getDictListByStatus(params, this.$axios).then(res => {
  579. this.dictData = res.data.items
  580. this.orgtreelist = window.toolfun_gettreejson(res.data.items['ProOrgList'], 'id', 'pId', 'id,name')
  581. var selectID = res.data.items['Register'].CheckUnitId
  582. var item = res.data.items['UnitOrgList'].find(n => n.Id == selectID)
  583. var list = res.data.items['UnitOrgList'].filter(n => n.Id != selectID)
  584. if (item != null && item != undefined) {
  585. list.unshift(item)
  586. }
  587. this.UnitOrgOptions = list
  588. // this.UnitOrgOptions = res.data.items['UnitOrgList']
  589. // this.UnitOrg = res.data.items['Register'].CheckUnitId
  590. this.allorgunitOptions = res.data.items['Allunitorglist']
  591. this.orgunitChange(this.UnitOrg)
  592. // this.auditerOptions = res.data.items['Auditer']
  593. // this.organizeOption = res.data.items['Organizes']
  594. }).catch(err => {
  595. console.error(err)
  596. })
  597. },
  598. orgunitChange (val) {
  599. if (!val) {
  600. return false
  601. }
  602. let deptid = val
  603. let auditstepcode = 'SUB_OFFICE_JS'
  604. api.getAuditerByDept(deptid, auditstepcode, this.$axios).then(res => {
  605. this.orgauditOptions = res.data.item
  606. }).catch(err => {
  607. console.error(err)
  608. })
  609. },
  610. companySubmitToSecUnitSeparateMakeSure () {
  611. if (this.orgauditOptions == null || this.orgauditOptions.length === 0) {
  612. this.$message({
  613. type: 'warning',
  614. message: '该单位没有分办人员!'
  615. })
  616. return
  617. }
  618. this.applyLoading = true
  619. this.auditform.UnitId = this.UnitOrg
  620. this.auditform.CertId = this.certId
  621. this.loading = true
  622. console.log('企业用户提交参数', this.auditform)
  623. apiCert.companyAuditEntity(this.certId, this.auditform, this.$axios)
  624. .then(res => {
  625. if (res.data.code === 0) {
  626. // 保存成功后,初始化数据,变成修改
  627. this.initDatas()
  628. this.isAccess()
  629. this.dialogVisibleCom = false
  630. this.$message({
  631. type: 'success',
  632. message: res.data.message
  633. })
  634. } else {
  635. this.$message({
  636. type: 'warning',
  637. message: res.data.message
  638. })
  639. }
  640. this.loading = false
  641. })
  642. .catch(err => {
  643. console.error(err)
  644. })
  645. }
  646. }
  647. }
  648. </script>
  649. <style scoped="scoped">
  650. </style>