瀏覽代碼

前端:信息变更----eslint

baichengfei 5 年之前
父節點
當前提交
37235691b1
共有 1 個文件被更改,包括 68 次插入72 次删除
  1. 68 72
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/infochangech/_opera/operationbasic.vue

+ 68 - 72
src/dashoo.cn/frontend_web/src/pages/oilsupplier/infochangech/_opera/operationbasic.vue

@@ -353,10 +353,10 @@
   import {
     mapGetters
   } from 'vuex'
-  import supplierapi from '@/api/oilsupplier/supplier';
-  import api from '@/api/oilsupplier/infochange';
-  import WfMultiHistory from "@/components/workflow/wfmultihistory.vue";
-  import ChooseAuditor from '@/components/oilsupplier/chooseauditor'
+  import supplierapi from '@/api/oilsupplier/supplier'
+import api from '@/api/oilsupplier/infochange'
+import WfMultiHistory from '@/components/workflow/wfmultihistory.vue'
+import ChooseAuditor from '@/components/oilsupplier/chooseauditor'
   export default {
     components: {
       WfMultiHistory,
@@ -369,13 +369,13 @@
     },
     name: 'oilinfochangeEdit',
 
-    data() {
+    data () {
       return {
         entrydetail: {
-          process: "oil_info_change",
-          business: "",
-          instance: "",
-          Status: '',
+          process: 'oil_info_change',
+          business: '',
+          instance: '',
+          Status: ''
         },
         audithistoryshow: false,
         backhistroy: {
@@ -429,7 +429,7 @@
           SelectItemName: '',
           BeChangeInfo: '',
           ChangeInfo: '',
-          ChangeStatus: '',
+          ChangeStatus: ''
         },
         serviceId: '',
         certId: '',
@@ -440,20 +440,20 @@
           SupplierTypeName: '',
           FirstAudit: '',
           auditer: '',
-          MInfoId:'',
+          MInfoId: '',
           Remark: ''
         },
         InfoStatus: '',
         butnab: false,
-        MInfoId:'',
-        Infomain:{
+        MInfoId: '',
+        Infomain: {
           BusinessKey: '',
           WorkFlowId: '',
-          Status: '',
-        },
+          Status: ''
+        }
       }
     },
-    created() {
+    created () {
       this.serviceId = this.$route.params.opera
       this.supplierId = this.serviceId
       this.InfoStatus = this.$route.query.InfoStatus
@@ -462,7 +462,7 @@
       this.initDatas()
     },
     methods: {
-      initDatas() {
+      initDatas () {
         this.getMainInfo()
         if (this.serviceId) {
           api.getEntity(this.serviceId, this.$axios).then(res => {
@@ -470,26 +470,26 @@
             this.itemsfilter()
           }).catch(err => {
             console.error(err)
-          });
+          })
         }
       },
-      getMainInfo() {
+      getMainInfo () {
         api.GetMainInfo(this.MInfoId, this.$axios)
           .then(res => {
-            this.Infomain = res.data.items;
-            console.log("this.formData", this.Infomain)
+            this.Infomain = res.data.items
+            console.log('this.formData', this.Infomain)
             if (this.Infomain.length > 0) {
               this.entrydetail.business = this.MInfoId + ''
               this.entrydetail.instance = this.Infomain[0].WorkFlowId + ''
               this.entrydetail.Status = this.Infomain[0].Status + ''
             }
-            console.log("---ent",this.entrydetail)
+            console.log('---ent', this.entrydetail)
           })
           .catch(err => {
-            console.error(err);
-          });
+            console.error(err)
+          })
       },
-      addchange() {
+      addchange () {
         this.AddChangeShow = true
         this.infochangeForm.Id = ''
         this.infochangeForm.SupplierId = ''
@@ -499,7 +499,7 @@
         this.infochangeForm.ChangeInfo = ''
         this.infochangeForm.ChangeStatus = ''
       },
-      itemsfilter() {
+      itemsfilter () {
         try {
           let entityArray = this.InfoData
           let arr = this.infoitemsoptions
@@ -522,64 +522,62 @@
           console.log(e)
         }
       },
-      //审批历史
-      auhistory() {
+      // 审批历史
+      auhistory () {
         this.audithistoryshow = true
       },
-      //添加变更项目
-      additems() {
+      // 添加变更项目
+      additems () {
         console.log(this.$refs.infochangeCorp.selectedLabel)
         api.getinfoforitem(this.serviceId, this.infochangeForm.Selectitem, this.$axios).then(res => {
           this.infochangeForm.BeChangeInfo = res.data
           this.infochangeForm.SelectItemName = this.$refs.infochangeCorp.selectedLabel + ''
-          //this.AddChangeShow = false
+          // this.AddChangeShow = false
         }).catch(err => {
           console.error(err)
-        });
-
+        })
       },
-      //保存信息变更数据
-      saveitemschange() {
+      // 保存信息变更数据
+      saveitemschange () {
         this.infochangeForm.SupplierId = parseInt(this.serviceId)
         console.log(this.infochangeForm)
         api.addInfoChangeItem(this.infochangeForm, this.$axios).then(res => {
           if (res.data.code === 0) {
-            //保存成功后,初始化数据,变成修改
-            this.infochangeForm.Id = res.data.item;
-            this.initDatas();
+            // 保存成功后,初始化数据,变成修改
+            this.infochangeForm.Id = res.data.item
+            this.initDatas()
             this.AddChangeShow = false
             this.$message({
               type: 'success',
               message: res.data.message
-            });
-
+            })
           } else {
             this.$message({
               type: 'warning',
               message: res.data.message
-            });
+            })
           }
         }).catch(err => {
           console.error(err)
-        });
+        })
       },
-      setAuditer(val, name) {
+      setAuditer (val, name) {
         this.auditer = val
         this.auditerName = name
         this.chooseAuditorVisible = false
       },
-      chooseAuditorShow() {
+      chooseAuditorShow () {
         this.$refs['chooseAuditor'].getorgtreelist()
         this.chooseAuditorVisible = true
       },
-      getorgtreelist() {
+      getorgtreelist () {
         let _this = this
         let params = {
           IsInnerOrganize: 1
         }
         _this.$axios.get('organizes/orgalllist', {
-            params
-          })
+          params
+        })
           .then(res => {
             _this.orgtreelist = window.toolfun_gettreejson(res.data.items, 'Id', 'Parentid', 'Id,Fullname')
           })
@@ -587,15 +585,15 @@
             console.error(err)
           })
       },
-      //提交信息变更审核
-      submitInfoChange() {
+      // 提交信息变更审核
+      submitInfoChange () {
         this.getorgtreelist()
         this.commitshow = true
       },
-      addInfoChangeAudit() {
+      addInfoChangeAudit () {
         this.entityForm.auditer = this.auditer
-        this.entityForm.MInfoId = this.MInfoId + ""
-        console.log("==this.entityForm====", this.entityForm)
+        this.entityForm.MInfoId = this.MInfoId + ''
+        console.log('==this.entityForm====', this.entityForm)
         api.auditEntity(this.supplierId, this.entityForm, this.$axios).then(res => {
           if (res.data.code === 0) {
             // 保存成功后,初始化数据,变成修改
@@ -616,33 +614,32 @@
           console.error(err)
         })
       },
-      //删除信息变更项
-      deleteEntity(row) {
+      // 删除信息变更项
+      deleteEntity (row) {
         api.deleteEntity(row.Id, this.$axios).then(res => {
           if (res.data.code === 0) {
-            this.initDatas();
+            this.initDatas()
             this.$message({
               type: 'success',
               message: res.data.message
-            });
-
+            })
           } else {
             this.$message({
               type: 'warning',
               message: res.data.message
-            });
+            })
           }
         }).catch(err => {
           console.error(err)
-        });
+        })
       },
-      getCityList(val) {
+      getCityList (val) {
         let resultData = JSON.parse(val)
         let countstr = JSON.stringify(resultData.districts[0].districts)
         countstr = countstr.replace(/\,\"districts\"\:\[\]/g, '')
         this.countryoptions = JSON.parse(countstr)
       },
-      jstimehandle(val) {
+      jstimehandle (val) {
         if (val === '') {
           return '----'
         } else if (val === '0001-01-01T08:00:00+08:00') {
@@ -655,18 +652,17 @@
         }
       },
 
-      formatDateTime(date) {
-        var y = date.getFullYear();
-        var m = date.getMonth() + 1;
-        m = m < 10 ? ('0' + m) : m;
-        var d = date.getDate();
-        d = d < 10 ? ('0' + d) : d;
-        var h = date.getHours();
-        var minute = date.getMinutes();
-        minute = minute < 10 ? ('0' + minute) : minute;
-        return y + '-' + m + '-' + d + ' ' + h + ':' + minute;
+      formatDateTime (date) {
+        var y = date.getFullYear()
+        var m = date.getMonth() + 1
+        m = m < 10 ? ('0' + m) : m
+        var d = date.getDate()
+        d = d < 10 ? ('0' + d) : d
+        var h = date.getHours()
+        var minute = date.getMinutes()
+        minute = minute < 10 ? ('0' + minute) : minute
+        return y + '-' + m + '-' + d + ' ' + h + ':' + minute
       }
     }
   }
-
 </script>