2
3
baichengfei преди 5 години
родител
ревизия
0d512e69ef
променени са 1 файла, в които са добавени 90 реда и са изтрити 95 реда
  1. 90 95
      src/dashoo.cn/frontend_web/src/pages/oilcontract/contract-basis-year/index.vue

+ 90 - 95
src/dashoo.cn/frontend_web/src/pages/oilcontract/contract-basis-year/index.vue

@@ -202,9 +202,9 @@
   </div>
 </template>
 <script>
-  import { mapGetters } from 'vuex';
-  import api from '@/api/oilcontract/contractSumScore';
-  import permissionApi from '@/api/oilcontract/permission';
+  import { mapGetters } from 'vuex'
+  import api from '@/api/oilcontract/contractSumScore'
+  import permissionApi from '@/api/oilcontract/permission'
   import FileSaver from 'file-saver'
   import XLSX from 'xlsx'
 
@@ -212,106 +212,104 @@
     computed: {
       ...mapGetters({
         authUser: 'authUser'
-      })
-    },
-    computed:{
-      evaluateFun:function(){
-        return function(item){
+      }),
+      evaluateFun: function () {
+        return function (item) {
           var index = Number(item)
-          switch(index){
+          switch (index) {
             case 1:
               return '优秀'
-            break;
+              break;
             case 2:
               return '合格'
-            break;
+              break;
             case 3:
               return '不合格'
-            break;
+              break;
             default:
               return '--'
           }
         }
       },
-      evaluateBooleanFun:function(){
-        return function(item){
+      evaluateBooleanFun: function () {
+        return function (item) {
           var index = Number(item)
-          if(index>0){
+          if (index > 0) {
             return '是'
-          }else{
+          } else {
             return '否'
           }
         }
-      },
+      }
     },
     name: 'oilcontract',
 
-    data() {
+    data () {
       return {
-        tableWidth:"290px",
+        tableWidth: '290px',
         dialogVisible: false,
-        //列表数据
+        // 列表数据
         entityList: [],
-        //分页参数
+        // 分页参数
         size: 10,
         currentPage: 1,
         currentItemCount: 0,
-        //列表排序
+        // 列表排序
         Column: {
           Order: '',
           Prop: ''
         },
-        //查询时间new Date(new Date().getTime() - 30 * 24 * 60 * 60 * 1000), new Date()
+        // 查询时间new Date(new Date().getTime() - 30 * 24 * 60 * 60 * 1000), new Date()
         CreateOn: [],
-        //查询项
+        // 查询项
         searchFormReset: {},
         searchForm: {
           Id: '',
           SupplierId: '',
           SupplierName: '',
-          Evaluate: "",
-          Score: "",
+          Evaluate: '',
+          Score: '',
           Score1: 0,
-          Score2: "",
-          Score3: "",
-          Score4: "",
-          Score5: "",
-          Score6: "",
-          Score7: "",
-          Score8: "",
-          Remark: '',
+          Score2: '',
+          Score3: '',
+          Score4: '',
+          Score5: '',
+          Score6: '',
+          Score7: '',
+          Score8: '',
+          Remark: ''
 
         },
-        jurisdictionBoolean:false,
+        jurisdictionBoolean: false
       }
     },
-    created() {
-      //查询条件初始值备份
-      Object.assign(this.searchFormReset, this.searchForm);
-      //查询列表
-      this.initDatas();
-      //this.getDictOptions()
+    created () {
+      // 查询条件初始值备份
+      Object.assign(this.searchFormReset, this.searchForm)
+      // 查询列表
+      this.initDatas()
+      // this.getDictOptions()
       this.permissionIsauth()
     },
     methods: {
       // 判断权限
-      permissionIsauth(){
+      permissionIsauth () {
         var data = {
-          percode:'oil_contract.SumStore.Add',
+          percode: 'oil_contract.SumStore.Add'
         }
         permissionApi.permissionIsauth(data, this.$axios).then(res => {
-          if(res.data.code==0){
-            if(res.data.message=='有权限'){
+          if (res.data.code == 0) {
+            if (res.data.message == '有权限') {
               this.jurisdictionBoolean = true
             }
           }
-          console.log('判断是否有权限',res)
+          console.log('判断是否有权限', res)
         }).catch(err => {
           console.error(err)
         })
       },
-      initDatas() {
-        //分页及列表条件
+      initDatas () {
+        // 分页及列表条件
         // <el-option label="物资类" value="01" key="01"></el-option>
         // <el-option label="基建类" value="02" key="02"></el-option>
         // <el-option label="技术服务" value="03" key="03"></el-option>
@@ -321,7 +319,7 @@
           _size: this.size,
           Order: this.Column.Order,
           Prop: this.Column.Prop,
-          ContractClass:'02'
+          ContractClass: '02'
         }
         let myCreateOn = []
         // 解析时间
@@ -332,9 +330,9 @@
           myCreateOn.push(this.formatDateTime(this.CreateOn[0]))
           myCreateOn.push(this.formatDateTime(this.CreateOn[1]))
         }
-        //查询条件
+        // 查询条件
         Object.assign(params, this.searchForm)
-        //访问接口
+        // 访问接口
         api.GetComputeList(myCreateOn.join(','), params, this.$axios).then(res => {
           this.entityList = res.data.items
           this.currentItemCount = res.data.currentItemCount
@@ -343,25 +341,25 @@
         })
       },
 
-      getDictOptions() {
+      getDictOptions () {
         api.getDictList(this.$axios).then(res => {
-          //this.dictOptions.customerList = res.data.items['customerList']
-          //this.dictOptions.projectList = res.data.items['projectList']
+          // this.dictOptions.customerList = res.data.items['customerList']
+          // this.dictOptions.projectList = res.data.items['projectList']
 
         }).catch(err => {
           console.error(err)
         })
       },
 
-      searchCommand(command) {
+      searchCommand (command) {
         if (command == 'search') {
           this.dialogVisible = true
         } else if (command == 'clear') {
           this.clearSearch()
         }
       },
-      //列表排序功能
-      orderby(column) {
+      // 列表排序功能
+      orderby (column) {
         if (column.order == 'ascending') {
           this.Column.Order = 'asc'
         } else if (column.order == 'descending') {
@@ -371,55 +369,53 @@
         this.initDatas()
       },
       //
-      renderHeader(h, { column, $index }){
-        console.log(2222,h, { column, $index })
-        column.minWidth=column.width
+      renderHeader (h, { column, $index }) {
+        console.log(2222, h, { column, $index })
+        column.minWidth = column.width
         let _this = this
-        return h('span', [
-         h('tableHead',column.label),
-        ])
+        return h('span', [h('tableHead', column.label)])
       },
-      clearSearch() {
-        Object.assign(this.searchForm, this.searchFormReset);
-        //this.searchForm = this.searchFormReset;
+      clearSearch () {
+        Object.assign(this.searchForm, this.searchFormReset)
+        // this.searchForm = this.searchFormReset;
         this.CreateOn = ''
         this.initDatas()
       },
-      handleSearch() {
-        this.currentPage = 1;
-        this.dialogVisible = false;
-        this.initDatas();
+      handleSearch () {
+        this.currentPage = 1
+        this.dialogVisible = false
+        this.initDatas()
       },
-      handleCurrentChange(value) {
+      handleCurrentChange (value) {
         this.currentPage = value
         this.initDatas()
       },
-      handleSizeChange(value) {
+      handleSizeChange (value) {
         this.size = value
         this.currentPage = 1
         this.initDatas()
       },
-      deleteEntity(row,index) {
+      deleteEntity (row, index) {
         this.$refs['popover-' + `${index}`].doClose()
         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)
-        });
+        })
       },
 
-      jstimehandle(val) {
+      jstimehandle (val) {
         if (val === '') {
           return '----'
         } else if (val === '0001-01-01T08:00:00+08:00') {
@@ -455,29 +451,28 @@
         return wbout
       },
       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;
+        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
       },
-      //跳转评价
-      onNavigateScore(item){
-        console.log('跳转',item)
+      // 跳转评价
+      onNavigateScore (item) {
+        console.log('跳转', item)
         this.$router.push({
-          path:'/oilcontract/contract-basis-year/' + 'add' + '/operation',
-          query:{
-            item:item
+          path: '/oilcontract/contract-basis-year/' + 'add' + '/operation',
+          query: {
+            item: item
           }
         })
-      },
+      }
     }
   }
-
 </script>
 
 <style lang="scss">