Просмотр исходного кода

提交工资管理首页,以及添加Examples图表

caojunjie 3 лет назад
Родитель
Сommit
8d02386502

+ 22 - 0
package-lock.json

@@ -4370,6 +4370,15 @@
         "safer-buffer": "^2.1.0"
       }
     },
+    "echarts": {
+      "version": "5.2.2",
+      "resolved": "https://registry.npmmirror.com/echarts/download/echarts-5.2.2.tgz?cache=0&sync_timestamp=1635741929711&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fecharts%2Fdownload%2Fecharts-5.2.2.tgz",
+      "integrity": "sha1-7DyLKhUcu6cbo8LHz5svIEfOQ3A=",
+      "requires": {
+        "tslib": "2.3.0",
+        "zrender": "5.2.1"
+      }
+    },
     "ee-first": {
       "version": "1.1.1",
       "resolved": "https://registry.npm.taobao.org/ee-first/download/ee-first-1.1.1.tgz",
@@ -11526,6 +11535,11 @@
       "integrity": "sha1-8shUBoALmw90yfdGW4HqrSQSUvg=",
       "dev": true
     },
+    "tslib": {
+      "version": "2.3.0",
+      "resolved": "https://registry.nlark.com/tslib/download/tslib-2.3.0.tgz",
+      "integrity": "sha1-gDuM2rPhK6WBpMpByIObuw2ssJ4="
+    },
     "tty-browserify": {
       "version": "0.0.0",
       "resolved": "https://registry.npm.taobao.org/tty-browserify/download/tty-browserify-0.0.0.tgz",
@@ -12962,6 +12976,14 @@
           "dev": true
         }
       }
+    },
+    "zrender": {
+      "version": "5.2.1",
+      "resolved": "https://registry.nlark.com/zrender/download/zrender-5.2.1.tgz",
+      "integrity": "sha1-X0u9qRW6bUErCxncJDG+qtBUF7s=",
+      "requires": {
+        "tslib": "2.3.0"
+      }
     }
   }
 }

+ 1 - 0
package.json

@@ -16,6 +16,7 @@
     "babel-polyfill": "^6.26.0",
     "classlist-polyfill": "^1.2.0",
     "crypto-js": "^4.0.0",
+    "echarts": "^5.2.2",
     "element-ui": "^2.15.1",
     "js-base64": "^2.5.1",
     "js-cookie": "^2.2.0",

+ 3 - 0
src/main.js

@@ -78,6 +78,9 @@ Vue.use(avueUeditor);
 //自定义标题
 import containerTitle from './components/titleComponent/main.vue';
 Vue.component('containerTitle', containerTitle);
+//注册echarts图表
+import * as echarts from 'echarts';
+Vue.prototype.$echarts = echarts
 // 加载相关url地址
 Object.keys(urls).forEach(key => {
   Vue.prototype[key] = urls[key];

+ 9 - 7
src/views/salaryManagement/logisticsDepartment/detailsPage.vue

@@ -18,6 +18,7 @@
     <basic-container style="margin-top: 60px">
           <avue-form
               ref="form"
+              style="margin-bottom: -20px"
               v-model="form"
               :option="option">
           </avue-form>
@@ -38,7 +39,7 @@
           :visible.sync="drawer"
           append-to-body
           withHeader
-          size="50%"
+          size="60%"
           :with-header="false">
         <el-table
             :data="optionList.column"
@@ -84,7 +85,7 @@
               prop="width"
               align="center"
               label="宽度"
-              width="500">
+              width="300">
             <template slot-scope="scope">
               <el-slider :min="1" :max="500" show-input v-model="scope.row.width"></el-slider>
             </template>
@@ -93,7 +94,7 @@
               prop="remarks"
               align="center"
               label="备注"
-              width="400">
+              width="200">
             <template slot-scope="scope">
               <el-input v-model="scope.row.remarks" placeholder="请输入内容"></el-input>
             </template>
@@ -104,6 +105,7 @@
           :data="dataList"
           border
           size="small"
+          :header-cell-style="bug"
           style="width: 100%;"
       >
         <el-table-column
@@ -121,7 +123,7 @@
             :label="item.label"
             :width="item.width>2?item.width:100">
           <template slot-scope="scope">
-            <el-input v-model="scope.row[item.prop]" :placeholder="'请输入'+item.label"></el-input>
+            <el-input v-model="scope.row[item.prop]" size="small" :placeholder="'请输入'+item.label"></el-input>
           </template>
         </el-table-column>
       </el-table>
@@ -150,7 +152,7 @@ export default {
             prop:'name',
             type:'year',
             search:true,
-            span: 8,
+            span: 4,
             maxlength: 3,
           },
           {
@@ -158,14 +160,14 @@ export default {
             prop:'name1',
             type:'month',
             search:true,
-            span: 8,
+            span: 4,
             maxlength: 3,
           },
           {
             label:'备注',
             prop:'name1',
             search:true,
-            span: 8,
+            span: 16,
             maxlength: 3,
           }]
       },

+ 319 - 90
src/views/salaryManagement/primarySchool/detailsPage.vue

@@ -15,8 +15,9 @@
       >{{ form.id ? '确认修改' : '确认新增' }}
       </el-button>
     </div>
-    <basic-container style="margin-top: 60px">
+    <basic-container style="margin-top: 60px;">
           <avue-form ref="form"
+                     style="margin-bottom: -20px"
                      v-model="form"
                      :option="option">
           </avue-form>
@@ -26,6 +27,8 @@
       <div style="display: flex;justify-content: space-between;margin-bottom: 10px">
         <div>
           <el-button type="primary" @click="dataList.push({})" size="small">新增</el-button>
+          <el-button type="primary" @click="exportAll" size="small">导出全部</el-button>
+          <el-button type="primary" @click="exportSalary" size="small">导出工资条</el-button>
         </div>
         <div>
           <el-button icon="el-icon-s-operation" size="small" circle @click="drawer=true"></el-button>
@@ -103,6 +106,7 @@
           :data="dataList"
           border
           size="small"
+          :header-cell-style="headerColor"
           style="width: 100%;"
       >
         <el-table-column
@@ -149,7 +153,7 @@ export default {
             prop:'name',
             type:'year',
             search:true,
-            span: 8,
+            span: 4,
             maxlength: 3,
           },
           {
@@ -157,14 +161,14 @@ export default {
             prop:'name1',
             type:'month',
             search:true,
-            span: 8,
+            span: 4,
             maxlength: 3,
           },
           {
             label:'备注',
-            prop:'name1',
+            prop:'name2',
             search:true,
-            span: 8,
+            span: 16,
             maxlength: 3,
           }]
       },
@@ -264,403 +268,515 @@ export default {
         },
         {
           label:'工资基数',
-          prop:'name',
+          prop:'name14',
           cell: true,
           remarks:'基础工资'
         },
         {
           label:'基础工资',
-          prop:'name14',
+          prop:'name15',
           cell: true,
+          headerColor:true,
           remarks:'基础工资'
         },
         {
           label:'工作量工资标准',
-          prop:'name15',
+          prop:'name16',
           cell: true,
         },
         {
           label:'10月份课时',
-          prop:'name16',
+          prop:'name17',
           cell: true,
         },
         {
           label:'10月工作量工资',
-          prop:'name17',
+          prop:'name18',
           cell: true,
-          remarks:'工作量工资'
+          remarks:'10月工作量工资'
         },
         {
-          label:'9月份工作量工资调整',
-          prop:'name18',
+          label:'自定义',
+          prop:'name19',
           cell: true,
           remarks:'工作量工资'
         },
         {
-          label:'暑假pad课课时',
-          prop:'name',
+          label:'自定义',
+          prop:'name20',
           cell: true,
-        },
-        {
-          label:'暑假pad课课时费',
-          prop:'name',
+          remarks:'工作量工资'
+        },{
+          label:'自定义',
+          prop:'name21',
           cell: true,
           remarks:'工作量工资'
-        },
-        {
+        },{
+          label:'自定义',
+          prop:'name22',
+          cell: true,
+          remarks:'工作量工资'
+        },{
+          label:'自定义',
+          prop:'name23',
+          cell: true,
+          remarks:'工作量工资'
+        },{
+          label:'自定义',
+          prop:'name24',
+          cell: true,
+          remarks:'工作量工资'
+        },{
+          label:'自定义',
+          prop:'name25',
+          cell: true,
+          remarks:'工作量工资'
+        },{
+          label:'自定义',
+          prop:'name26',
+          cell: true,
+          remarks:'工作量工资'
+        },{
+          label:'自定义',
+          prop:'name27',
+          cell: true,
+          remarks:'工作量工资'
+        },{
+          label:'自定义',
+          prop:'name28',
+          cell: true,
+          remarks:'工作量工资'
+        },{
           label:'工作量工资',
-          prop:'name',
+          prop:'name29',
           cell: true,
         },
         {
           label:'日常考核标准',
-          prop:'name',
+          prop:'name30',
           cell: true,
         },
         {
           label:'日常考核工资',
-          prop:'name',
+          prop:'name31',
           cell: true,
         },
         {
           label:'学期绩效工资',
-          prop:'name',
+          prop:'name32',
+          cell: true,
+        },
+        {
+          label:'自定义奖励',
+          prop:'name33',
           cell: true,
+          remarks:'奖励工资'
+        },
+        {
+          label:'自定义奖励',
+          prop:'name34',
+          cell: true,
+          remarks:'奖励工资'
         },
         {
-          label:'突出贡献奖',
-          prop:'name',
+          label:'自定义奖励',
+          prop:'name35',
           cell: true,
           remarks:'奖励工资'
         },
         {
-          label:'教学成绩优胜奖',
-          prop:'name',
+          label:'自定义奖励',
+          prop:'name36',
           cell: true,
           remarks:'奖励工资'
         },
         {
-          label:'教学成绩进步奖',
-          prop:'name',
+          label:'自定义奖励',
+          prop:'name37',
           cell: true,
           remarks:'奖励工资'
         },
         {
-          label:'荣誉奖',
-          prop:'name',
+          label:'自定义奖励',
+          prop:'name38',
           cell: true,
           remarks:'奖励工资'
         },
         {
-          label:'领导干部奖励',
-          prop:'name',
+          label:'自定义奖励',
+          prop:'name39',
           cell: true,
           remarks:'奖励工资'
         },
         {
-          label:'2020年下学期教学成绩奖',
-          prop:'name',
+          label:'自定义奖励',
+          prop:'name40',
           cell: true,
           remarks:'奖励工资'
         },
         {
-          label:'2021年中考奖励',
-          prop:'name',
+          label:'自定义奖励',
+          prop:'name41',
           cell: true,
           remarks:'奖励工资'
         },
         {
+          label:'自定义奖励',
+          prop:'name42',
+          cell: true,
+          remarks:'奖励工资'
+        },{
           label:'奖励工资',
-          prop:'name',
+          prop:'name43',
           cell: true,
         },
         {
           label:'领导干部补贴',
-          prop:'name',
+          prop:'name44',
           cell: true,
           remarks:'职务津贴'
         },
         {
           label:'备课组长',
-          prop:'name',
+          prop:'name45',
           cell: true,
           remarks:'职务津贴'
         },
         {
           label:'教研组长',
-          prop:'name',
+          prop:'name46',
           cell: true,
           remarks:'职务津贴'
         },
         {
           label:'职务津贴',
-          prop:'name',
+          prop:'name47',
           cell: true,
         },
         {
           label:'班主任费',
-          prop:'name',
+          prop:'name48',
           cell: true,
           remarks:'班主任津贴'
         },
         {
           label:'班额',
-          prop:'name',
+          prop:'name49',
           cell: true,
           remarks:'班主任津贴'
         },
         {
           label:'班主任津贴',
-          prop:'name',
+          prop:'name50',
           cell: true,
           remarks:'班主任津贴'
         },
         {
           label:'微信',
-          prop:'name',
+          prop:'name51',
           cell: true,
           remarks:'补贴项'
         },
         {
           label:'产假工资',
-          prop:'name',
+          prop:'name52',
           cell: true,
           remarks:'补贴项'
         },
         {
           label:'周末加班',
-          prop:'name',
+          prop:'name53',
           cell: true,
           remarks:'补贴项'
         },
         {
           label:'2020年上学期绩效',
-          prop:'name',
+          prop:'name54',
           cell: true,
           remarks:'补贴项'
         },
         {
           label:'2020年下学期绩效',
-          prop:'name',
+          prop:'name55',
           cell: true,
           remarks:'补贴项'
         },
         {
           label:'干部补贴预留',
-          prop:'name',
+          prop:'name56',
           cell: true,
           remarks:'补贴项'
         },
         {
           label:'假期加班费',
-          prop:'name',
+          prop:'name57',
           cell: true,
           remarks:'补贴项'
         },
         {
           label:'新岗岗前培训',
-          prop:'name',
+          prop:'name58',
           cell: true,
           remarks:'补贴项'
         },
         {
           label:'期中期末考试学科优胜奖(预留发放)',
-          prop:'name',
+          prop:'name59',
           cell: true,
           remarks:'补贴项'
         },
         {
           label:'级部长(预留发放)',
-          prop:'name',
+          prop:'name60',
           cell: true,
           remarks:'补贴项'
         },
         {
           label:'9月副班费(预留补发)',
-          prop:'name',
+          prop:'name61',
           cell: true,
           remarks:'补贴项'
         },
         {
           label:'餐车、周五测温、周五安全岗(预留补发)',
-          prop:'name',
+          prop:'name62',
           cell: true,
           remarks:'补贴项'
         },
         {
           label:'预留补发',
-          prop:'name',
+          prop:'name63',
           cell: true,
           remarks:'补贴项'
         },
         {
           label:'调整差额',
-          prop:'name',
+          prop:'name64',
           cell: true,
           remarks:'调整差额'
         },
         {
+          label:'自定义',
+          prop:'name65',
+          cell: true,
+          remarks:'补贴项'
+        },
+        {
+          label:'自定义',
+          prop:'name66',
+          cell: true,
+          remarks:'补贴项'
+        },
+        {
+          label:'自定义',
+          prop:'name67',
+          cell: true,
+          remarks:'补贴项'
+        },
+        {
+          label:'自定义',
+          prop:'name68',
+          cell: true,
+          remarks:'补贴项'
+        },
+        {
+          label:'自定义',
+          prop:'name69',
+          cell: true,
+          remarks:'补贴项'
+        },
+        {
+          label:'自定义',
+          prop:'name70',
+          cell: true,
+          remarks:'补贴项'
+        },
+        {
+          label:'自定义',
+          prop:'name71',
+          cell: true,
+          remarks:'补贴项'
+        },
+        {
+          label:'自定义',
+          prop:'name72',
+          cell: true,
+          remarks:'补贴项'
+        },
+        {
+          label:'自定义',
+          prop:'name73',
+          cell: true,
+          remarks:'补贴项'
+        },
+        {
+          label:'自定义',
+          prop:'name74',
+          cell: true,
+          remarks:'补贴项'
+        },
+        {
           label:'补贴项',
-          prop:'name',
+          prop:'name75',
           cell: true,
           remarks:'补贴项'
         },
         {
           label:'出勤',
-          prop:'name',
+          prop:'name76',
           cell: true,
           remarks:'扣除项'
         },
         {
           label:'督查罚款',
-          prop:'name',
+          prop:'name77',
           cell: true,
           remarks:'扣除项'
         },
         {
           label:'电话费',
-          prop:'name',
+          prop:'name78',
           cell: true,
           remarks:'扣除项'
         },
         {
           label:'学习强国',
-          prop:'name',
+          prop:'name79',
           cell: true,
           remarks:'扣除项'
         },
         {
           label:'宿舍管理费',
-          prop:'name',
+          prop:'name80',
           cell: true,
           remarks:'扣除项'
         },
         {
           label:'生育津贴',
-          prop:'name',
+          prop:'name81',
           cell: true,
           remarks:'扣除项'
         },
         {
           label:'五险一金个人',
-          prop:'name',
+          prop:'name82',
           cell: true,
           remarks:'扣除项'
         },
         {
           label:'扣除项',
-          prop:'name',
+          prop:'name83',
           cell: true,
           remarks:'扣除项'
         },
         {
           label:'保险(单位部分)',
-          prop:'name',
+          prop:'name84',
           cell: true,
           remarks:'保险(单位部分)'
         },
         {
           label:'保险(个人部分)',
-          prop:'name',
+          prop:'name85',
           cell: true,
           remarks:'保险(个人部分)'
         },
         {
           label:'公积金(单位部分)',
-          prop:'name',
+          prop:'name86',
           cell: true,
           remarks:'公积金(单位部分)'
         },
         {
           label:'公积金(个人部分)',
-          prop:'name',
+          prop:'name87',
           cell: true,
           remarks:'公积金(个人部分)'
         },
         {
           label:'应发工资',
-          prop:'name',
+          prop:'name88',
           cell: true,
           remarks:'应发工资'
         },
         {
           label:'个税',
-          prop:'name',
+          prop:'name89',
           cell: true,
           remarks:'个税'
         },
         {
           label:'实发工资(减去个人)',
-          prop:'name',
+          prop:'name90',
           cell: true,
           remarks:'实发工资(减去个人)'
         },
         {
           label:'备注',
-          prop:'name',
+          prop:'name91',
           cell: true,
           remarks:'备注'
         },
         {
-          label:' ',
-          prop:'name',
+          label:'自定义',
+          prop:'name92',
           cell: true,
         },
         {
           label:' ',
-          prop:'name',
+          prop:'name93',
           cell: true,
         },
         {
           label:' ',
-          prop:'name',
+          prop:'name94',
           cell: true,
         },
         {
           label:'日照银行代发最终',
-          prop:'name',
+          prop:'name95',
           cell: true,
           remarks:'日照银行代发最终'
         },
         {
           label:'已付',
-          prop:'name',
+          prop:'name96',
           cell: true,
           remarks:'已付'
         },
         {
           label:'冲借款',
-          prop:'name',
+          prop:'name97',
           cell: true,
           remarks:'冲借款'
         },
         {
           label:'现金付款',
-          prop:'name',
+          prop:'name98',
           cell: true,
           remarks:'现金付款'
         },
         {
           label:'暂不付',
-          prop:'name',
+          prop:'name99',
           cell: true,
           remarks:'暂不付'
         },
         {
           label:'暂不付1',
-          prop:'name',
+          prop:'name100',
           cell: true,
           remarks:'暂不付1'
         },
         {
           label:'暂不付2',
-          prop:'name',
+          prop:'name101',
           cell: true,
           remarks:'暂不付2'
         },
         {
           label:'备注',
-          prop:'name',
+          prop:'name102',
           cell: true,
           remarks:'备注'
         }
@@ -674,6 +790,42 @@ export default {
     this.tableHeight = windowHeight - 140;
   },
   methods:{
+    //自定义表头颜色
+    headerColor(row, column, rowIndex, columnIndex){
+      // console.log(row, column, rowIndex, columnIndex)
+      switch (row.column.property) {
+        case 'name14':
+          return "color: #fff;background:#a4cf57"
+        case 'name29':
+          return "color: #fff;background:#a4cf57"
+        case 'name31':
+          return "color: #fff;background:#a4cf57"
+        case 'name43':
+          return "color: #fff;background:#a4cf57"
+        case 'name47':
+          return "color: #fff;background:#a4cf57"
+        case 'name50':
+          return "color: #fff;background:#a4cf57"
+        case 'name75':
+          return "color: #fff;background:#a4cf57"
+        case 'name83':
+          return "color: #fff;background:#a4cf57"
+        case 'name84':
+          return "color: #fff;background:#a4cf57"
+        case 'name85':
+          return "color: #fff;background:#a4cf57"
+        case 'name86':
+          return "color: #fff;background:#a4cf57"
+        case 'name87':
+          return "color: #fff;background:#a4cf57"
+        case 'name88':
+          return "color: #fff;background:#a4cf57"
+        case 'name89':
+          return "color: #fff;background:#a4cf57"
+        case 'name90':
+          return "color: #fff;background:#a4cf57"
+      }
+    },
     //修改提交触发
     editCustomer() {
       console.log(this.form)
@@ -701,6 +853,83 @@ export default {
       )
       done()
     },
+    //导出全部
+    exportAll(){
+      let opt = {
+        title: '工资条',
+        column: this.optionList.column,
+        data: this.dataList
+      }
+      this.$Export.excel({
+        title: opt.title ,
+        columns: opt.column,
+        data: opt.data
+      });
+    },
+    //导出工资条
+    exportSalary(){
+      let data = []
+      for (let item in this.optionList.column){
+        switch (this.optionList.column[item].prop) {
+          case 'name14':
+            data.push(this.optionList.column[item])
+            break
+          case 'name29':
+            data.push(this.optionList.column[item])
+            break
+          case 'name31':
+            data.push(this.optionList.column[item])
+            break
+          case 'name43':
+            data.push(this.optionList.column[item])
+            break
+          case 'name47':
+            data.push(this.optionList.column[item])
+            break
+          case 'name50':
+            data.push(this.optionList.column[item])
+            break
+          case 'name75':
+            data.push(this.optionList.column[item])
+            break
+          case 'name83':
+            data.push(this.optionList.column[item])
+            break
+          case 'name84':
+            data.push(this.optionList.column[item])
+            break
+          case 'name85':
+            data.push(this.optionList.column[item])
+            break
+          case 'name86':
+            data.push(this.optionList.column[item])
+            break
+          case 'name87':
+            data.push(this.optionList.column[item])
+            break
+          case 'name88':
+            data.push(this.optionList.column[item])
+            break
+          case 'name89':
+            data.push(this.optionList.column[item])
+            break
+          case 'name90':
+            data.push(this.optionList.column[item])
+            break
+
+        }
+      }
+      let opt = {
+        title: '工资条',
+        column: data,
+        data: this.dataList
+      }
+      this.$Export.excel({
+        title: opt.title ,
+        columns: opt.column,
+        data: opt.data
+      });
+    },
     //返回列表
     backToList() {
       this.$emit("goBack");

+ 1 - 0
src/views/system/dept.vue

@@ -160,6 +160,7 @@
                 trigger: "blur"
               }]
             },
+
             {
               label: "排序",
               prop: "sort",

+ 17 - 0
src/views/system/tenant.vue

@@ -164,6 +164,23 @@ export default {
             label: "绑定域名",
             prop: "domain",
             span: 24,
+          },{
+            label: "公司类型",
+            type: "select",
+            dicUrl: "/api/blade-system/dict/dictionary?code=company_type",
+            props: {
+              label: "dictValue",
+              value: "dictKey"
+            },
+            dataType: "number",
+            width: 120,
+            prop: "billType",
+            slot: true,
+            rules: [{
+              required: true,
+              message: "请输入机构类型",
+              trigger: "blur"
+            }]
           },
           {
             label: "系统背景",

+ 130 - 0
src/views/wel/home/defaultPage.vue

@@ -0,0 +1,130 @@
+<template>
+  <basic-container>
+    <div class="container" :style="isHeight">
+      <div class="container-items">
+        <but-card iconName="el-icon-edit-outline" name="销售订单" />
+        <but-card iconName="el-icon-edit-outline" name="采购订单" />
+        <but-card iconName="el-icon-edit-outline" name="发货单" />
+        <but-card iconName="el-icon-edit-outline" name="收货单" />
+        <but-card iconName="el-icon-edit-outline" name="库存" />
+        <but-card iconName="el-icon-edit-outline" name="客户管理" />
+        <but-card iconName="el-icon-edit-outline" name="商品管理" />
+        <but-card iconName="el-icon-edit-outline" name="用户管理" />
+        <but-card iconName="el-icon-edit-outline" name="收费管理" />
+        <but-card iconName="el-icon-edit-outline" name="付费管理" />
+      </div>
+      <index-card title="今日工作看板" iconName="el-icon-view">
+        <div slot="content" style="height:25vh"></div>
+      </index-card>
+      <index-card title="待办事项" iconName="el-icon-s-fold">
+        <div slot="content" style="height:17vh"></div>
+      </index-card>
+      <index-card title="今日营业" iconName="el-icon-chat-line-round">
+        <div slot="content" style="height:17vh" class="operate">
+          <div class="operate-item">
+            <div class="item-text">
+              <div class="item-point"></div>
+              今日到店
+              <p>0</p>
+              台次
+            </div>
+          </div>
+          <div class="operate-item">
+            <div class="item-text">
+              <div class="item-point"></div>
+              今日到店
+              <p>0</p>
+              台次
+            </div>
+          </div>
+          <div class="operate-item">
+            <div class="item-text">
+              <div class="item-point"></div>
+              今日到店
+              <p>0</p>
+              台次
+            </div>
+          </div>
+        </div>
+      </index-card>
+      <index-card title="客户数据" iconName="el-icon-user">
+        <div slot="content" style="height:17vh"></div>
+      </index-card>
+      <index-card title="新闻公告" iconName="el-icon-s-fold">
+        <div slot="content" style="height:17vh"></div>
+      </index-card>
+    </div>
+  </basic-container>
+</template>
+
+<script>
+import { mapGetters } from "vuex";
+import indexCard from "../components/card.vue";
+import butCard from "../components/butCard.vue";
+export default {
+  name: "wel",
+  data() {
+    return {
+      activeNames: ["1", "2", "3", "5"],
+      logActiveNames: ["24"],
+      isHeight: {},
+    };
+  },
+  created(){
+    this.isHeight.height=window.innerHeight-165+'px'
+  },
+  components: {
+    indexCard,
+    butCard
+  },
+  computed: {
+    ...mapGetters(["userInfo"])
+  },
+  methods: {
+    handleChange(val) {
+      window.console.log(val);
+    }
+  }
+};
+</script>
+<style lang="scss" scoped>
+.container {
+  display: grid;
+  grid-template-columns: repeat(auto-fill, 50%);
+  grid-template-rows: 40% 30% 30%;
+  .container-items {
+    display: grid;
+    grid-template-columns: repeat(auto-fill, 20%);
+    grid-template-rows: repeat(auto-fill, 50%);
+    align-items: center;
+  }
+}
+//今日营业
+.operate {
+  display: grid;
+  grid-template-rows: repeat(auto-fill, 33.33%);
+  .operate-item {
+    display: flex;
+    align-items: center;
+    .item-text {
+      display: flex;
+      align-items: end;
+      font-size: 14px;
+      .item-point {
+        line-height: 14px;
+        width: 14px;
+        height: 14px;
+        border-radius: 2px;
+        background: #ff7d13;
+        margin-right: 4px;
+        margin-bottom: 1px;
+      }
+    }
+    p {
+      font-size: 24px;
+      line-height: 24px;
+      margin: 0 4px !important;
+    }
+  }
+}
+</style>

+ 248 - 0
src/views/wel/home/tongjiSchool.vue

@@ -0,0 +1,248 @@
+<template>
+  <div>
+    <basic-container>
+      <div class="container" style="height: 400px;">
+        <div class="container-items">
+          <but-card iconName="el-icon-edit-outline" name="小学部工资" />
+          <but-card iconName="el-icon-edit-outline" name="初中部工资" />
+          <but-card iconName="el-icon-edit-outline" name="高中部工资" />
+          <but-card iconName="el-icon-edit-outline" name="后勤工资" />
+          <but-card iconName="el-icon-edit-outline" name="添加教师" />
+          <but-card iconName="el-icon-edit-outline" name="添加后勤" />
+        </div>
+        <index-card title="教师工资总体数据" iconName="el-icon-view">
+          <div slot="content" style="height:330px">
+            <avue-data-icons :option="option"></avue-data-icons>
+          </div>
+        </index-card>
+      </div>
+    </basic-container>
+    <basic-container>
+      <index-card title="工资走势图" iconName="el-icon-s-fold" style="height:500px;margin-bottom: 30px">
+        <el-select slot="content" size="mini" v-model="value" style="float: right;z-index: 999;width: 100px" placeholder="请选择">
+          <el-option
+              v-for="item in options"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value">
+          </el-option>
+        </el-select>
+        <div slot="content" style="height:500px" id="commoDity"></div>
+      </index-card>
+      <br>
+    </basic-container>
+  </div>
+</template>
+
+<script>
+import { mapGetters } from "vuex";
+import indexCard from "../components/card.vue";
+import butCard from "../components/butCard.vue";
+export default {
+  name: "wel",
+  data() {
+    return {
+      activeNames: ["1", "2", "3", "5"],
+      logActiveNames: ["24"],
+      isHeight: {},
+      options: [{
+        value: '0',
+        label: '全部'
+      }, {
+        value: '1',
+        label: '小学'
+      }, {
+        value: '2',
+        label: '初中'
+      }, {
+        value: '3',
+        label: '高中'
+      }, {
+        value: '4',
+        label: '后勤'
+      }],
+      value:'0',
+      option: {
+        span:6,
+        data: [
+          {
+            click: function (item) {
+              // alert(JSON.stringify(item));
+            },
+            title: '工资总额',
+            count: 12678,
+            decimals:2,
+            icon: 'el-icon-tickets',
+            // href:'https://avuejs.com',
+            target:'_blank'
+          },
+          {
+            click: function (item) {
+              // alert(JSON.stringify(item));
+            },
+            title: '年工资额增长率(%)',
+            count: 29,
+            icon: 'el-icon-s-marketing',
+            // href:'https://avuejs.com',
+            target:'_blank'
+          },
+          {
+            click: function (item) {
+              // alert(JSON.stringify(item));
+            },
+            title: '人均工资',
+            count: 35623,
+            icon: 'el-icon-s-finance',
+            // href:'https://avuejs.com',
+            target:'_blank'
+          },
+          {
+            click: function (item) {
+              // alert(JSON.stringify(item));
+            },
+            title: '年人均工资增长率(%)',
+            count: 19,
+            icon: 'el-icon-s-claim',
+            // href:'https://avuejs.com',
+            target:'_blank'
+          },
+          {
+            click: function (item) {
+              // alert(JSON.stringify(item));
+            },
+            title: '保险总额',
+            count: 16826,
+            icon: 'el-icon-s-cooperation',
+            // href:'https://avuejs.com',
+            target:'_blank'
+          },
+          {
+            click: function (item) {
+              // alert(JSON.stringify(item));
+            },
+            title: '保险总额同比(%)',
+            count: 69,
+            icon: 'el-icon-notebook-1',
+            // href:'https://avuejs.com',
+            target:'_blank'
+          },
+          {
+            click: function (item) {
+              // alert(JSON.stringify(item));
+            },
+            title: '人均保险',
+            count: 16826,
+            icon: 'el-icon-s-custom',
+            // href:'https://avuejs.com',
+            target:'_blank'
+          },
+          {
+            click: function (item) {
+              // alert(JSON.stringify(item));
+            },
+            title: '人均保险同比(%)',
+            count: 30,
+            icon: 'el-icon-notebook-2',
+            // href:'https://avuejs.com',
+            target:'_blank'
+          }
+        ]
+      }
+    };
+  },
+  created(){
+    this.isHeight.height=window.innerHeight-165+'px'
+  },
+  mounted() {
+    this.commoDity()
+  },
+  components: {
+    indexCard,
+    butCard
+  },
+  computed: {
+    ...mapGetters(["userInfo"])
+  },
+  methods: {
+    handleChange(val) {
+      window.console.log(val);
+    },
+    commoDity() {
+      // 基于准备好的dom,初始化echarts实例,所以只能在mounted中调用
+      let myChart = this.$echarts.init(document.getElementById("commoDity"));
+      // 绘制图表
+      myChart.setOption({
+        tooltip: {
+          trigger: 'axis',
+          axisPointer: {
+            type: 'shadow'
+          }
+        },
+        xAxis: {
+          type: 'category',
+          data: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月']
+        },
+        grid: {
+          left: '3%',
+          right: '4%',
+          bottom: '3%',
+          containLabel: true
+        },
+        yAxis: {
+          type: 'value',
+          axisLabel: {
+            formatter: '{value} 元'
+          }
+        },
+        series: [
+          {
+            data: [125340, 200345, 145350, 84530, 70345, 153450, 133450, 44530, 143534, 245345, 123055, 135454],
+            type: 'bar'
+          }
+        ]
+      });
+    },
+  }
+};
+</script>
+<style lang="scss" scoped>
+.container {
+  display: grid;
+  grid-template-columns: repeat(auto-fill, 50%);
+  grid-template-rows: 40% 30% 30%;
+  .container-items {
+    display: grid;
+    grid-template-columns: repeat(auto-fill, 33.33%);
+    grid-template-rows: repeat(auto-fill, 140%);
+    align-items: center;
+  }
+}
+//今日营业
+.operate {
+  display: grid;
+  grid-template-rows: repeat(auto-fill, 33.33%);
+  .operate-item {
+    display: flex;
+    align-items: center;
+    .item-text {
+      display: flex;
+      align-items: end;
+      font-size: 14px;
+      .item-point {
+        line-height: 14px;
+        width: 14px;
+        height: 14px;
+        border-radius: 2px;
+        background: #ff7d13;
+        margin-right: 4px;
+        margin-bottom: 1px;
+      }
+    }
+    p {
+      font-size: 24px;
+      line-height: 24px;
+      margin: 0 4px !important;
+    }
+  }
+}
+</style>

+ 15 - 111
src/views/wel/index.vue

@@ -1,130 +1,34 @@
 <template>
-  <basic-container>
-    <div class="container" :style="isHeight">
-      <div class="container-items">
-        <but-card iconName="el-icon-edit-outline" name="销售订单" />
-        <but-card iconName="el-icon-edit-outline" name="采购订单" />
-        <but-card iconName="el-icon-edit-outline" name="发货单" />
-        <but-card iconName="el-icon-edit-outline" name="收货单" />
-        <but-card iconName="el-icon-edit-outline" name="库存" />
-        <but-card iconName="el-icon-edit-outline" name="客户管理" />
-        <but-card iconName="el-icon-edit-outline" name="商品管理" />
-        <but-card iconName="el-icon-edit-outline" name="用户管理" />
-        <but-card iconName="el-icon-edit-outline" name="收费管理" />
-        <but-card iconName="el-icon-edit-outline" name="付费管理" />
-      </div>
-      <index-card title="今日工作看板" iconName="el-icon-view">
-        <div slot="content" style="height:25vh"></div>
-      </index-card>
-      <index-card title="待办事项" iconName="el-icon-s-fold">
-        <div slot="content" style="height:17vh"></div>
-      </index-card>
-      <index-card title="今日营业" iconName="el-icon-chat-line-round">
-        <div slot="content" style="height:17vh" class="operate">
-          <div class="operate-item">
-            <div class="item-text">
-              <div class="item-point"></div>
-              今日到店
-              <p>0</p>
-              台次
-            </div>
-          </div>
-          <div class="operate-item">
-            <div class="item-text">
-              <div class="item-point"></div>
-              今日到店
-              <p>0</p>
-              台次
-            </div>
-          </div>
-          <div class="operate-item">
-            <div class="item-text">
-              <div class="item-point"></div>
-              今日到店
-              <p>0</p>
-              台次
-            </div>
-          </div>
-        </div>
-      </index-card>
-      <index-card title="客户数据" iconName="el-icon-user">
-        <div slot="content" style="height:17vh"></div>
-      </index-card>
-      <index-card title="新闻公告" iconName="el-icon-s-fold">
-        <div slot="content" style="height:17vh"></div>
-      </index-card>
-    </div>
-  </basic-container>
+  <div>
+    <tongjiSchool v-if="billType == 1"></tongjiSchool>
+    <defaultPage v-else></defaultPage>
+  </div>
 </template>
 
 <script>
-import { mapGetters } from "vuex";
-import indexCard from "./components/card.vue";
-import butCard from "./components/butCard.vue";
+import defaultPage from "@/views/wel/home/defaultPage";
+import tongjiSchool from "@/views/wel/home/tongjiSchool";
+import {getUserInfo} from "@/api/system/user";
 export default {
   name: "wel",
   data() {
     return {
-      activeNames: ["1", "2", "3", "5"],
-      logActiveNames: ["24"],
-      isHeight: {},
+      billType:'',
     };
   },
-  created(){
-    this.isHeight.height=window.innerHeight-165+'px'
+  created() {
+    getUserInfo().then(res=>{
+      this.billType = res.data.data.billType
+    })
   },
   components: {
-    indexCard,
-    butCard
-  },
-  computed: {
-    ...mapGetters(["userInfo"])
+    tongjiSchool,
+    defaultPage
   },
   methods: {
-    handleChange(val) {
-      window.console.log(val);
-    }
   }
 };
 </script>
 <style lang="scss" scoped>
-.container {
-  display: grid;
-  grid-template-columns: repeat(auto-fill, 50%);
-  grid-template-rows: 40% 30% 30%;
-  .container-items {
-    display: grid;
-    grid-template-columns: repeat(auto-fill, 20%);
-    grid-template-rows: repeat(auto-fill, 50%);
-    align-items: center;
-  }
-}
-//今日营业
-.operate {
-  display: grid;
-  grid-template-rows: repeat(auto-fill, 33.33%);
-  .operate-item {
-    display: flex;
-    align-items: center;
-    .item-text {
-      display: flex;
-      align-items: end;
-      font-size: 14px;
-      .item-point {
-        line-height: 14px;
-        width: 14px;
-        height: 14px;
-        border-radius: 2px;
-        background: #ff7d13;
-        margin-right: 4px;
-        margin-bottom: 1px;
-      }
-    }
-    p {
-      font-size: 24px;
-      line-height: 24px;
-      margin: 0 4px !important;
-    }
-  }
-}
+
 </style>

+ 2 - 2
vue.config.js

@@ -26,11 +26,11 @@ module.exports = {
     proxy: {
       '/api': {
         //本地服务接口地址
-        // target: 'http://192.168.1.177:1080',
+        target: 'http://192.168.1.177:1080',
         // target: 'http://192.168.1.151:1080',
         // 打包地址.
         // target: 'http://121.37.83.47:10004',//服务器ip
-        target: 'http://trade.tubaosoft.com:10004',//服务器域名
+        // target: 'http://trade.tubaosoft.com:10004',//服务器域名
         ws: true,
         pathRewrite: {
           '^/api': '/'