Commit 72068e79a338c33a3a270b3329a8a0860f1037b3

Authored by DESKTOP-AO0VKC8\mahua
1 parent 0390209d

添加项目进度、修改项目名

public/index.html
... ... @@ -5,7 +5,7 @@
5 5 <meta charset="utf-8">
6 6 <meta http-equiv="X-UA-Compatible" content="IE=edge">
7 7 <meta name="viewport" content="width=device-width,initial-scale=1.0">
8   - <title>物料管理系统</title>
  8 + <title>物料跟踪系统</title>
9 9 <link rel="icon" href="<%= BASE_URL %>logo.png">
10 10 <script src="<%= BASE_URL %>cdn/babel-polyfill/polyfill_7_2_5.js"></script>
11 11 <style>
... ... @@ -252,7 +252,7 @@
252 252 <div id="loader"></div>
253 253 <div class="loader-section section-left"></div>
254 254 <div class="loader-section section-right"></div>
255   - <div class="load_title">正在加载物料管理系统,请耐心等待
  255 + <div class="load_title">正在加载物料跟踪系统,请耐心等待
256 256  
257 257 </div>
258 258 </div>
... ...
src/components/layouts/UserLayout.vue
... ... @@ -8,7 +8,7 @@
8 8 </a>
9 9 </div>
10 10 <div class="desc">
11   - 长沙华恒物料管理系统
  11 + 长沙华恒物料跟踪系统
12 12 </div>
13 13 </div>
14 14  
... ...
src/components/page/GlobalHeader.vue
... ... @@ -17,7 +17,7 @@
17 17 :type="collapsed ? 'menu-unfold' : 'menu-fold'"
18 18 @click="toggle"/>
19 19  
20   - <span>欢迎进入物料管理系统</span>
  20 + <span>欢迎进入物料跟踪系统</span>
21 21  
22 22 <user-menu :theme="theme"/>
23 23 </div>
... ...
src/components/tools/UserMenu.vue
... ... @@ -26,11 +26,6 @@
26 26 <!-- update-end author:sunjianlei date:20200219 for: 菜单搜索改为动态组件,在手机端呈现出弹出框 -->
27 27 <!-- update-end author:sunjianlei date:20191220 for: 解决全局样式冲突的问题 -->
28 28 <!-- update_end author:zhaoxin date:20191129 for: 做头部菜单栏导航 -->
29   - <span class="action">
30   - <a class="logout_title" target="_blank" href="http://doc.jeecg.com">
31   - <a-icon type="question-circle-o"></a-icon>
32   - </a>
33   - </span>
34 29 <header-notice class="action"/>
35 30 <a-dropdown>
36 31 <span class="action action-full ant-dropdown-link user-dropdown-menu">
... ...
src/utils/util.js
... ... @@ -10,7 +10,7 @@ export function timeFix() {
10 10  
11 11 export function welcome() {
12 12 const arr = ['休息一会儿吧', '准备吃什么呢?', '要不要打一把 DOTA', '我猜你可能累了']
13   - let index = Math.floor((Math.random()*arr.length))
  13 + let index = Math.floor((Math.random() * arr.length))
14 14 return arr[index]
15 15 }
16 16  
... ... @@ -31,16 +31,16 @@ export function triggerWindowResizeEvent() {
31 31 */
32 32 export function filterObj(obj) {
33 33 if (!(typeof obj == 'object')) {
34   - return;
  34 + return
35 35 }
36 36  
37   - for ( let key in obj) {
  37 + for (let key in obj) {
38 38 if (obj.hasOwnProperty(key)
39 39 && (obj[key] == null || obj[key] == undefined || obj[key] === '')) {
40   - delete obj[key];
  40 + delete obj[key]
41 41 }
42 42 }
43   - return obj;
  43 + return obj
44 44 }
45 45  
46 46 /**
... ... @@ -50,10 +50,10 @@ export function filterObj(obj) {
50 50 * @returns {*}
51 51 */
52 52 export function formatDate(value, fmt) {
53   - let regPos = /^\d+(\.\d+)?$/;
54   - if(regPos.test(value)){
  53 + let regPos = /^\d+(\.\d+)?$/
  54 + if (regPos.test(value)) {
55 55 //如果是数字
56   - let getDate = new Date(value);
  56 + let getDate = new Date(value)
57 57 let o = {
58 58 'M+': getDate.getMonth() + 1,
59 59 'd+': getDate.getDate(),
... ... @@ -62,7 +62,7 @@ export function formatDate(value, fmt) {
62 62 's+': getDate.getSeconds(),
63 63 'q+': Math.floor((getDate.getMonth() + 3) / 3),
64 64 'S': getDate.getMilliseconds()
65   - };
  65 + }
66 66 if (/(y+)/.test(fmt)) {
67 67 fmt = fmt.replace(RegExp.$1, (getDate.getFullYear() + '').substr(4 - RegExp.$1.length))
68 68 }
... ... @@ -71,107 +71,107 @@ export function formatDate(value, fmt) {
71 71 fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
72 72 }
73 73 }
74   - return fmt;
75   - }else{
  74 + return fmt
  75 + } else {
76 76 //TODO
77   - value = value.trim();
78   - return value.substr(0,fmt.length);
  77 + value = value.trim()
  78 + return value.substr(0, fmt.length)
79 79 }
80 80 }
81 81  
82 82 // 生成首页路由
83 83 export function generateIndexRouter(data) {
84   -let indexRouter = [{
85   - path: '/',
86   - name: 'dashboard',
87   - //component: () => import('@/components/layouts/BasicLayout'),
88   - component: resolve => require(['@/components/layouts/TabLayout'], resolve),
89   - meta: { title: '首页' },
90   - redirect: '/dashboard/analysis',
91   - children: [
92   - ...generateChildRouters(data)
93   - ]
94   - },{
95   - "path": "*", "redirect": "/404", "hidden": true
96   - }]
97   - return indexRouter;
  84 + let indexRouter = [{
  85 + path: '/',
  86 + name: 'dashboard',
  87 + //component: () => import('@/components/layouts/BasicLayout'),
  88 + component: resolve => require(['@/components/layouts/TabLayout'], resolve),
  89 + meta: { title: '首页' },
  90 + redirect: '/dashboard/analysis',
  91 + children: [
  92 + ...generateChildRouters(data)
  93 + ]
  94 + }, {
  95 + 'path': '*', 'redirect': '/404', 'hidden': true
  96 + }]
  97 + return indexRouter
98 98 }
99 99  
100 100 // 生成嵌套路由(子路由)
101 101  
102   -function generateChildRouters (data) {
103   - const routers = [];
  102 +function generateChildRouters(data) {
  103 + const routers = []
104 104 for (let item of data) {
105   - let component = "";
106   - if(item.component.indexOf("layouts")>=0){
107   - component = "components/"+item.component;
108   - }else{
109   - component = "views/"+item.component;
  105 + let component = ''
  106 + if (item.component.indexOf('layouts') >= 0) {
  107 + component = 'components/' + item.component
  108 + } else {
  109 + component = 'views/' + item.component
110 110 }
111 111  
112 112 // eslint-disable-next-line
113   - let URL = (item.meta.url|| '').replace(/{{([^}}]+)?}}/g, (s1, s2) => eval(s2)) // URL支持{{ window.xxx }}占位符变量
  113 + let URL = (item.meta.url || '').replace(/{{([^}}]+)?}}/g, (s1, s2) => eval(s2)) // URL支持{{ window.xxx }}占位符变量
114 114 if (isURL(URL)) {
115   - item.meta.url = URL;
  115 + item.meta.url = URL
116 116 }
117 117  
118 118 let componentPath
119   - if(item.component=="modules/online/cgform/OnlCgformHeadList"){
  119 + if (item.component == 'modules/online/cgform/OnlCgformHeadList') {
120 120 componentPath = onlineCommons.OnlCgformHeadList
121   - }else if(item.component=="modules/online/cgform/OnlCgformCopyList"){
  121 + } else if (item.component == 'modules/online/cgform/OnlCgformCopyList') {
122 122 componentPath = onlineCommons.OnlCgformCopyList
123   - }else if(item.component=="modules/online/cgform/auto/OnlCgformAutoList"){
  123 + } else if (item.component == 'modules/online/cgform/auto/OnlCgformAutoList') {
124 124 componentPath = onlineCommons.OnlCgformAutoList
125   - }else if(item.component=="modules/online/cgform/auto/OnlCgformTreeList"){
  125 + } else if (item.component == 'modules/online/cgform/auto/OnlCgformTreeList') {
126 126 componentPath = onlineCommons.OnlCgformTreeList
127   - }else if(item.component=="modules/online/cgform/auto/erp/OnlCgformErpList"){
  127 + } else if (item.component == 'modules/online/cgform/auto/erp/OnlCgformErpList') {
128 128 componentPath = onlineCommons.OnlCgformErpList
129   - }else if(item.component=="modules/online/cgform/auto/tab/OnlCgformTabList"){
  129 + } else if (item.component == 'modules/online/cgform/auto/tab/OnlCgformTabList') {
130 130 componentPath = onlineCommons.OnlCgformTabList
131   - }else if(item.component=="modules/online/cgform/auto/innerTable/OnlCgformInnerTableList"){
  131 + } else if (item.component == 'modules/online/cgform/auto/innerTable/OnlCgformInnerTableList') {
132 132 componentPath = onlineCommons.OnlCgformInnerTableList
133   - }else if(item.component=="modules/online/cgreport/OnlCgreportHeadList"){
  133 + } else if (item.component == 'modules/online/cgreport/OnlCgreportHeadList') {
134 134 componentPath = onlineCommons.OnlCgreportHeadList
135   - }else if(item.component=="modules/online/cgreport/auto/OnlCgreportAutoList"){
  135 + } else if (item.component == 'modules/online/cgreport/auto/OnlCgreportAutoList') {
136 136 componentPath = onlineCommons.OnlCgreportAutoList
137   - }else{
138   - componentPath = resolve => require(['@/' + component+'.vue'], resolve)
  137 + } else {
  138 + componentPath = resolve => require(['@/' + component + '.vue'], resolve)
139 139 }
140 140  
141   - let menu = {
  141 + let menu = {
142 142 path: item.path,
143 143 name: item.name,
144   - redirect:item.redirect,
  144 + redirect: item.redirect,
145 145 component: componentPath,
146 146 //component: resolve => require(['@/' + component+'.vue'], resolve),
147   - hidden:item.hidden,
  147 + hidden: item.hidden,
148 148 //component:()=> import(`@/views/${item.component}.vue`),
149 149 meta: {
150   - title:item.meta.title ,
  150 + title: item.meta.title,
151 151 icon: item.meta.icon,
152   - url:item.meta.url ,
153   - permissionList:item.meta.permissionList,
154   - keepAlive:item.meta.keepAlive,
  152 + url: item.meta.url,
  153 + permissionList: item.meta.permissionList,
  154 + keepAlive: item.meta.keepAlive,
155 155 /*update_begin author:wuxianquan date:20190908 for:赋值 */
156   - internalOrExternal:item.meta.internalOrExternal,
  156 + internalOrExternal: item.meta.internalOrExternal,
157 157 /*update_end author:wuxianquan date:20190908 for:赋值 */
158   - componentName:item.meta.componentName
  158 + componentName: item.meta.componentName
159 159 }
160 160 }
161   - if(item.alwaysShow){
162   - menu.alwaysShow = true;
163   - menu.redirect = menu.path;
  161 + if (item.alwaysShow) {
  162 + menu.alwaysShow = true
  163 + menu.redirect = menu.path
164 164 }
165 165 if (item.children && item.children.length > 0) {
166   - menu.children = [...generateChildRouters( item.children)];
  166 + menu.children = [...generateChildRouters(item.children)]
167 167 }
168 168 //--update-begin----author:scott---date:20190320------for:根据后台菜单配置,判断是否路由菜单字段,动态选择是否生成路由(为了支持参数URL菜单)------
169 169 //判断是否生成路由
170   - if(item.route && item.route === '0'){
  170 + if (item.route && item.route === '0') {
171 171 //console.log(' 不生成路由 item.route: '+item.route);
172 172 //console.log(' 不生成路由 item.path: '+item.path);
173   - }else{
174   - routers.push(menu);
  173 + } else {
  174 + routers.push(menu)
175 175 }
176 176 //--update-end----author:scott---date:20190320------for:根据后台菜单配置,判断是否路由菜单字段,动态选择是否生成路由(为了支持参数URL菜单)------
177 177 }
... ... @@ -204,7 +204,7 @@ export function randomNumber() {
204 204 }
205 205 if (arguments.length === 1) {
206 206 let [length] = arguments
207   - // 生成指定长度的随机数字,首位一定不是 0
  207 + // 生成指定长度的随机数字,首位一定不是 0
208 208 let nums = [...Array(length).keys()].map((i) => (i > 0 ? random(0, 9) : random(1, 9)))
209 209 return parseInt(nums.join(''))
210 210 } else if (arguments.length >= 2) {
... ... @@ -246,10 +246,10 @@ export function randomUUID() {
246 246 * @param string
247 247 * @returns {*}
248 248 */
249   -export function underLine2CamelCase(string){
250   - return string.replace( /_([a-z])/g, function( all, letter ) {
251   - return letter.toUpperCase();
252   - });
  249 +export function underLine2CamelCase(string) {
  250 + return string.replace(/_([a-z])/g, function(all, letter) {
  251 + return letter.toUpperCase()
  252 + })
253 253 }
254 254  
255 255 /**
... ... @@ -257,11 +257,11 @@ export function underLine2CamelCase(string){
257 257 * @param bpmStatus
258 258 * @returns {*}
259 259 */
260   -export function showDealBtn(bpmStatus){
261   - if(bpmStatus!="1"&&bpmStatus!="3"&&bpmStatus!="4"){
262   - return true;
  260 +export function showDealBtn(bpmStatus) {
  261 + if (bpmStatus != '1' && bpmStatus != '3' && bpmStatus != '4') {
  262 + return true
263 263 }
264   - return false;
  264 + return false
265 265 }
266 266  
267 267 /**
... ... @@ -271,7 +271,7 @@ export function showDealBtn(bpmStatus){
271 271 */
272 272 export function cssExpand(css, id) {
273 273 let style = document.createElement('style')
274   - style.type = "text/css"
  274 + style.type = 'text/css'
275 275 style.innerHTML = `@charset "UTF-8"; ${css}`
276 276 // 清除旧样式
277 277 if (id) {
... ... @@ -283,7 +283,6 @@ export function cssExpand(css, id) {
283 283 document.head.appendChild(style)
284 284 }
285 285  
286   -
287 286 /** 用于js增强事件,运行JS代码,可以传参 */
288 287 // options 所需参数:
289 288 // 参数名 类型 说明
... ... @@ -338,7 +337,6 @@ export function jsExpand(options = {}) {
338 337 document.body.appendChild(script)
339 338 }
340 339  
341   -
342 340 /**
343 341 * 重复值验证工具方法
344 342 *
... ... @@ -455,7 +453,7 @@ export function alwaysResolve(promise) {
455 453 */
456 454 export function simpleDebounce(fn, delay = 100) {
457 455 let timer = null
458   - return function () {
  456 + return function() {
459 457 let args = arguments
460 458 if (timer) {
461 459 clearTimeout(timer)
... ... @@ -551,13 +549,53 @@ export function neverNull(value, def) {
551 549 */
552 550 export function removeArrayElement(array, prod, value) {
553 551 let index = -1
554   - for(let i = 0;i<array.length;i++){
555   - if(array[i][prod] == value){
556   - index = i;
557   - break;
  552 + for (let i = 0; i < array.length; i++) {
  553 + if (array[i][prod] == value) {
  554 + index = i
  555 + break
558 556 }
559 557 }
560   - if(index>=0){
561   - array.splice(index, 1);
  558 + if (index >= 0) {
  559 + array.splice(index, 1)
  560 + }
  561 +}
  562 +
  563 +export function selectDictLabel(datas, value) {
  564 + if (isEmpty(datas) || isEmpty(value)) {
  565 + return ''
  566 + }
  567 + let actions = []
  568 + datas.forEach(function(index, dict) {
  569 + if (dict.dictCode == ('' + value)) {
  570 + actions.push($.common.sprintf('<span>%s</span>', dict.dictName))
  571 + return false
  572 + }
  573 + })
  574 + return actions.join('')
  575 +}
  576 +
  577 +export function isEmpty() {
  578 + if (value == null || this.trim(value) == '') {
  579 + return true
562 580 }
  581 + return false
  582 +}
  583 +
  584 +// 比较两个字符串(大小写敏感)
  585 +export function equals (str, that) {
  586 + return str == that;
  587 +}
  588 +
  589 +// 字符串格式化(%s )
  590 +export function sprintf (str) {
  591 + let args = arguments, flag = true, i = 1;
  592 + str = str.replace(/%s/g, function () {
  593 + let arg = args[i++];
  594 + if (typeof arg === 'undefined') {
  595 + flag = false;
  596 + return '';
  597 + }
  598 + return arg == null ? '' : arg;
  599 + });
  600 + return flag ? str : '';
563 601 }
564 602 \ No newline at end of file
... ...
src/views/dashboard/Analysis.vue
1 1 <template>
2 2 <div>
3 3 <index-chart v-if="indexStyle==1"></index-chart>
4   - <index-bdc v-if="indexStyle==2"></index-bdc>
5   - <index-task v-if="indexStyle==3"></index-task>
6   - <div style="width: 100%;text-align: right;margin-top: 20px">
7   - 请选择首页样式:
8   - <a-radio-group v-model="indexStyle">
9   - <a-radio :value="1">统计图表</a-radio>
10   - <a-radio :value="2">统计图表2</a-radio>
11   - <a-radio :value="3">任务表格</a-radio>
12   - </a-radio-group>
13   - </div>
14 4 </div>
15 5 </template>
16 6  
17 7 <script>
18 8 import IndexChart from './IndexChart'
19   - import IndexTask from "./IndexTask"
20   - import IndexBdc from './IndexBdc'
  9 +
21 10  
22 11 export default {
23 12 name: "Analysis",
24 13 components: {
25 14 IndexChart,
26   - IndexTask,
27   - IndexBdc
28 15 },
29 16 data() {
30 17 return {
... ...
src/views/dashboard/IndexChart.vue
... ... @@ -2,7 +2,7 @@
2 2 <div class="page-header-index-wide">
3 3 <a-row :gutter="24">
4 4 <a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">
5   - <chart-card :loading="loading" title="总销售额" total="¥126,560">
  5 + <chart-card :loading="loading" title="工作令" total="126,560">
6 6 <a-tooltip title="指标说明" slot="action">
7 7 <a-icon type="info-circle-o" />
8 8 </a-tooltip>
... ... @@ -16,22 +16,22 @@
16 16 11%
17 17 </trend>
18 18 </div>
19   - <template slot="footer">日均销售额<span>¥ 234.56</span></template>
  19 + <template slot="footer">工作令<span> 234.56</span></template>
20 20 </chart-card>
21 21 </a-col>
22 22 <a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">
23   - <chart-card :loading="loading" title="订单量" :total="8846 | NumberFormat">
  23 + <chart-card :loading="loading" title="物料" :total="8846 | NumberFormat">
24 24 <a-tooltip title="指标说明" slot="action">
25 25 <a-icon type="info-circle-o" />
26 26 </a-tooltip>
27 27 <div>
28 28 <mini-area />
29 29 </div>
30   - <template slot="footer">日订单量<span> {{ '1234' | NumberFormat }}</span></template>
  30 + <template slot="footer">物料<span> {{ '1234' | NumberFormat }}</span></template>
31 31 </chart-card>
32 32 </a-col>
33 33 <a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">
34   - <chart-card :loading="loading" title="支付笔数" :total="6560 | NumberFormat">
  34 + <chart-card :loading="loading" title="齐套" :total="6560 | NumberFormat">
35 35 <a-tooltip title="指标说明" slot="action">
36 36 <a-icon type="info-circle-o" />
37 37 </a-tooltip>
... ... @@ -42,23 +42,14 @@
42 42 </chart-card>
43 43 </a-col>
44 44 <a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">
45   - <chart-card :loading="loading" title="运营活动效果" total="78%">
  45 + <chart-card :loading="loading" title="缺料" total="78%">
46 46 <a-tooltip title="指标说明" slot="action">
47 47 <a-icon type="info-circle-o" />
48 48 </a-tooltip>
49 49 <div>
50 50 <mini-progress color="rgb(19, 194, 194)" :target="80" :percentage="78" :height="8" />
51 51 </div>
52   - <template slot="footer">
53   - <trend flag="down" style="margin-right: 16px;">
54   - <span slot="term">同周比</span>
55   - 12%
56   - </trend>
57   - <trend flag="up">
58   - <span slot="term">日环比</span>
59   - 80%
60   - </trend>
61   - </template>
  52 + <template slot="footer">物料<span> {{ '1234' | NumberFormat }}</span></template>
62 53 </chart-card>
63 54 </a-col>
64 55 </a-row>
... ... @@ -75,63 +66,19 @@
75 66 </div>
76 67 <a-range-picker :style="{width: '256px'}" />
77 68 </div>
78   - <a-tab-pane loading="true" tab="销售额" key="1">
  69 + <a-tab-pane loading="true" tab="部门/时间-达标率" key="1">
79 70 <a-row>
80 71 <a-col :xl="16" :lg="12" :md="12" :sm="24" :xs="24">
81   - <bar title="销售额排行" :dataSource="barData"/>
  72 + <bar title="部门/时间-达标率" :dataSource="barData"/>
82 73 </a-col>
83 74 <a-col :xl="8" :lg="12" :md="12" :sm="24" :xs="24">
84   - <rank-list title="门店销售排行榜" :list="rankList"/>
85   - </a-col>
86   - </a-row>
87   - </a-tab-pane>
88   - <a-tab-pane tab="销售趋势" key="2">
89   - <a-row>
90   - <a-col :xl="16" :lg="12" :md="12" :sm="24" :xs="24">
91   - <bar title="销售额趋势" :dataSource="barData"/>
92   - </a-col>
93   - <a-col :xl="8" :lg="12" :md="12" :sm="24" :xs="24">
94   - <rank-list title="门店销售排行榜" :list="rankList"/>
  75 + <rank-list title="部门完成排行榜" :list="rankList"/>
95 76 </a-col>
96 77 </a-row>
97 78 </a-tab-pane>
98 79 </a-tabs>
99 80 </div>
100 81 </a-card>
101   -
102   - <a-row>
103   - <a-col :span="24">
104   - <a-card :loading="loading" :bordered="false" title="最近一周访问量统计" :style="{ marginTop: '24px' }">
105   - <a-row>
106   - <a-col :span="6">
107   - <head-info title="今日IP" :content="loginfo.todayIp"></head-info>
108   - </a-col>
109   - <a-col :span="2">
110   - <a-spin class='circle-cust'>
111   - <a-icon slot="indicator" type="environment" style="font-size: 24px" />
112   - </a-spin>
113   - </a-col>
114   - <a-col :span="6">
115   - <head-info title="今日访问" :content="loginfo.todayVisitCount"></head-info>
116   - </a-col>
117   - <a-col :span="2">
118   - <a-spin class='circle-cust'>
119   - <a-icon slot="indicator" type="team" style="font-size: 24px" />
120   - </a-spin>
121   - </a-col>
122   - <a-col :span="6">
123   - <head-info title="总访问量" :content="loginfo.totalVisitCount"></head-info>
124   - </a-col>
125   - <a-col :span="2">
126   - <a-spin class='circle-cust'>
127   - <a-icon slot="indicator" type="rise" style="font-size: 24px" />
128   - </a-spin>
129   - </a-col>
130   - </a-row>
131   - <line-chart-multid :fields="visitFields" :dataSource="visitInfo"></line-chart-multid>
132   - </a-card>
133   - </a-col>
134   - </a-row>
135 82 </div>
136 83 </template>
137 84  
... ...
src/views/scheduler/SchedulerDetailList.vue
... ... @@ -145,9 +145,6 @@
145 145 title: '工艺',
146 146 align: 'center',
147 147 dataIndex: 'technology_dictText',
148   - // customRender: function(text) {
149   - // return ""
150   - // }
151 148 },
152 149 {
153 150 title:'状态',
... ...
src/views/system/BomList.vue
... ... @@ -4,6 +4,9 @@
4 4 <!-- 操作按钮区域 -->
5 5 <div class="table-operator">
6 6 <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
  7 + <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
  8 + <a-button type="primary" icon="import">导入</a-button>
  9 + </a-upload>
7 10 <a-button
8 11 @click="batchDel"
9 12 v-if="selectedRowKeys.length > 0"
... ... @@ -69,11 +72,10 @@ import { getBom } from &#39;../../api/api&#39;
69 72  
70 73 const columns = [
71 74 {
72   - title: 'BOM',
73   - dataIndex: 'bomId',
74   - key: 'bomId',
75   - width: 450
76   - }, {
  75 + // title: 'BOM',
  76 + // dataIndex: 'bomId',
  77 + // key: 'bomId'
  78 + // }, {
77 79 title: '物料编码',
78 80 dataIndex: 'code',
79 81 key: 'code'
... ... @@ -89,6 +91,10 @@ const columns = [
89 91 title: '用量',
90 92 dataIndex: 'number',
91 93 key: 'number'
  94 + },{
  95 + title: '状态',
  96 + dataIndex: 'status',
  97 + key: 'status'
92 98 }
93 99 ]
94 100 export default {
... ... @@ -105,7 +111,8 @@ export default {
105 111 url: {
106 112 list: '/config/bom/list',
107 113 delete: '/config/bom/delete',
108   - deleteBatch: '/config/bom/deleteBatch'
  114 + deleteBatch: '/config/bom/deleteBatch',
  115 + importExcelUrl: '/config/bom/importExcel'
109 116 }
110 117 }
111 118 },
... ... @@ -123,6 +130,11 @@ export default {
123 130 handleExpandedRowsChange(expandedRows) {
124 131 this.expandedRowKeys = expandedRows
125 132 },
  133 + },
  134 + computed: {
  135 + importExcelUrl: function(){
  136 + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
  137 + }
126 138 }
127 139 }
128 140 </script>
... ...
src/views/system/ProjectRate.vue 0 → 100644
  1 +<template>
  2 + <div>
  3 + <div class="table-page-search-wrapper">
  4 + <a-form layout="inline">
  5 + <a-row :gutter="10">
  6 + <a-col :md="4" :sm="24">
  7 + <a-form-item label="查询类别">
  8 + <a-select allowClear v-model="queryParam.condition">
  9 + <a-select-option key="TaskDescripe">任务描述</a-select-option>
  10 + <a-select-option key="ResponseName">责任人</a-select-option>
  11 + </a-select>
  12 + </a-form-item>
  13 + </a-col>
  14 + <a-col :md="4" :sm="24">
  15 + <a-form-item>
  16 + <a-input v-model="queryParam.keyword" placeholder="关键字" />
  17 + </a-form-item>
  18 + </a-col>
  19 + <a-col :md="6" :sm="24">
  20 + <a-button type="primary" @click="()=>(getDataList())">查询</a-button>
  21 + <a-button style="margin-left: 8px" @click="() => (queryParam = {})">重置</a-button>
  22 + </a-col>
  23 + </a-row>
  24 + </a-form>
  25 + </div>
  26 +
  27 + <gantt-elastic
  28 + :options="options"
  29 + :tasks="tasks"
  30 + @tasks-changed="tasksUpdate"
  31 + @options-changed="optionsUpdate"
  32 + @dynamic-style-changed="styleUpdate"
  33 + >
  34 + <gantt-header slot="header" :options="options"></gantt-header>
  35 + </gantt-elastic>
  36 + <div class="q-mt-md" />
  37 + </div>
  38 +
  39 +</template>
  40 +
  41 +<script>
  42 +import GanttElastic from 'gantt-elastic'
  43 +import GanttHeader from 'gantt-elastic-header'
  44 +import moment from 'moment'
  45 +
  46 +function getDate(hours) {
  47 + const currentDate = new Date()
  48 + const currentYear = currentDate.getFullYear()
  49 + const currentMonth = currentDate.getMonth()
  50 + const currentDay = currentDate.getDate()
  51 + const timeStamp = new Date(
  52 + currentYear,
  53 + currentMonth,
  54 + currentDay,
  55 + 0,
  56 + 0,
  57 + 0
  58 + ).getTime()
  59 + return new Date(timeStamp + hours * 60 * 60 * 1000).getTime()
  60 +}
  61 +
  62 +let that
  63 +let tasks = [
  64 + {
  65 + "duration": 15267159000,
  66 + "end": 1616575959000,
  67 + "id": "HHCS-L-2020-0123",
  68 + "isOnTime": false,
  69 + "start": 1601308800000,
  70 + "taskPoint": "支腿输送线项目",
  71 + "type": "task"
  72 + },
  73 + {
  74 + "duration": 86400000,
  75 + "end": 1601395200000,
  76 + "id": "1",
  77 + "isOnTime": false,
  78 + "opinion": "\r\n 吴乐\r\n\r\n\r\n 黄何嵘",
  79 + "parentId": "HHCS-L-2020-0123",
  80 + "principal": "-4266017801783787060",
  81 + "responsible": "9024998056131579524",
  82 + "start": 1601308800000,
  83 + "taskPoint": "电气设计计划",
  84 + "type": "task"
  85 + },
  86 + {
  87 + "duration": 86400000,
  88 + "end": 1601395200000,
  89 + "id": "2",
  90 + "isOnTime": false,
  91 + "opinion": "\r\n 吴乐\r\n\r\n\r\n 黄何嵘",
  92 + "parentId": "HHCS-L-2020-0123",
  93 + "principal": "-4266017801783787060",
  94 + "responsible": "9024998056131579524",
  95 + "start": 1601308800000,
  96 + "taskPoint": "电气设计实际",
  97 + "type": "task"
  98 + },
  99 + {
  100 + "duration": 86400000,
  101 + "end": 1601395200000,
  102 + "id": "3",
  103 + "isOnTime": false,
  104 + "opinion": "\r\n 冷师红\r\n\r\n\r\n 文禄强",
  105 + "parentId": "HHCS-L-2020-0123",
  106 + "principal": "-4127252952202197745",
  107 + "responsible": "2457865889357907883",
  108 + "start": 1601308800000,
  109 + "taskPoint": "机械设计计划",
  110 + "type": "task"
  111 + },
  112 + {
  113 + "duration": 86400000,
  114 + "end": 1601395200000,
  115 + "id": "4",
  116 + "isOnTime": false,
  117 + "opinion": "\r\n 冷师红\r\n\r\n\r\n 文禄强",
  118 + "parentId": "HHCS-L-2020-0123",
  119 + "principal": "-4127252952202197745",
  120 + "responsible": "2457865889357907883",
  121 + "start": 1601308800000,
  122 + "taskPoint": "机械设计实际",
  123 + "type": "task"
  124 + },
  125 + {
  126 + "duration": 15267159000,
  127 + "end": 1616575959000,
  128 + "id": "5",
  129 + "isOnTime": false,
  130 + "opinion": "",
  131 + "parentId": "HHCS-L-2020-0123",
  132 + "principal": "",
  133 + "responsible": "",
  134 + "start": 1601308800000,
  135 + "taskPoint": "软件设计计划",
  136 + "type": "task"
  137 + },
  138 + {
  139 + "duration": 15267159000,
  140 + "end": 1616575959000,
  141 + "id": "6",
  142 + "isOnTime": false,
  143 + "opinion": "",
  144 + "parentId": "HHCS-L-2020-0123",
  145 + "principal": "",
  146 + "responsible": "",
  147 + "start": 1601308800000,
  148 + "taskPoint": "软件设计实际",
  149 + "type": "task"
  150 + },
  151 + {
  152 + "duration": 1728000000,
  153 + "end": 1603123200000,
  154 + "id": "7",
  155 + "isOnTime": true,
  156 + "opinion": "\r\n 肖萍\r\n\r\n\r\n 肖萍",
  157 + "parentId": "HHCS-L-2020-0123",
  158 + "principal": "-5629229241258588009",
  159 + "responsible": "-5629229241258588009",
  160 + "start": 1601395200000,
  161 + "taskPoint": "物资采购计划",
  162 + "type": "task"
  163 + },
  164 + {
  165 + "duration": 10195200000,
  166 + "end": 1611590400000,
  167 + "id": "8",
  168 + "isOnTime": true,
  169 + "opinion": "\r\n 肖萍\r\n\r\n\r\n 肖萍",
  170 + "parentId": "HHCS-L-2020-0123",
  171 + "principal": "-5629229241258588009",
  172 + "responsible": "-5629229241258588009",
  173 + "start": 1601395200000,
  174 + "taskPoint": "物资采购实际",
  175 + "type": "task"
  176 + },
  177 + {
  178 + "duration": 1555200000,
  179 + "end": 1602950400000,
  180 + "id": "9",
  181 + "isOnTime": false,
  182 + "opinion": "\r\n 王启太\r\n\r\n\r\n 彭志明",
  183 + "parentId": "HHCS-L-2020-0123",
  184 + "principal": "-260560139759761334",
  185 + "responsible": "-4737041461688647253",
  186 + "start": 1601395200000,
  187 + "taskPoint": "生产外协计划",
  188 + "type": "task"
  189 + },
  190 + {
  191 + "duration": 1555200000,
  192 + "end": 1602950400000,
  193 + "id": "10",
  194 + "isOnTime": false,
  195 + "opinion": "\r\n 王启太\r\n\r\n\r\n 彭志明",
  196 + "parentId": "HHCS-L-2020-0123",
  197 + "principal": "-260560139759761334",
  198 + "responsible": "-4737041461688647253",
  199 + "start": 1601395200000,
  200 + "taskPoint": "生产外协实际",
  201 + "type": "task"
  202 + },
  203 + {
  204 + "duration": 1296000000,
  205 + "end": 1602691200000,
  206 + "id": "11",
  207 + "isOnTime": true,
  208 + "opinion": "",
  209 + "parentId": "HHCS-L-2020-0123",
  210 + "principal": "",
  211 + "responsible": "",
  212 + "start": 1601395200000,
  213 + "taskPoint": "生产自制计划",
  214 + "type": "task"
  215 + },
  216 + {
  217 + "duration": 15180759000,
  218 + "end": 1616575959000,
  219 + "id": "12",
  220 + "isOnTime": true,
  221 + "opinion": "",
  222 + "parentId": "HHCS-L-2020-0123",
  223 + "principal": "",
  224 + "responsible": "",
  225 + "start": 1601395200000,
  226 + "taskPoint": "生产自制实际",
  227 + "type": "task"
  228 + },
  229 + {
  230 + "duration": 15180759000,
  231 + "end": 1616575959000,
  232 + "id": "13",
  233 + "isOnTime": false,
  234 + "opinion": "",
  235 + "parentId": "HHCS-L-2020-0123",
  236 + "principal": "",
  237 + "responsible": "",
  238 + "start": 1601395200000,
  239 + "taskPoint": "场内装配计划",
  240 + "type": "task"
  241 + },
  242 + {
  243 + "duration": 15180759000,
  244 + "end": 1616575959000,
  245 + "id": "14",
  246 + "isOnTime": false,
  247 + "parentId": "HHCS-L-2020-0123",
  248 + "start": 1601395200000,
  249 + "taskPoint": "场内装配实际",
  250 + "type": "task"
  251 + },
  252 + {
  253 + "duration": 15180759000,
  254 + "end": 1616575959000,
  255 + "id": "17",
  256 + "isOnTime": false,
  257 + "opinion": "",
  258 + "parentId": "HHCS-L-2020-0123",
  259 + "principal": "",
  260 + "responsible": "",
  261 + "start": 1601395200000,
  262 + "taskPoint": "发货计划",
  263 + "type": "task"
  264 + },
  265 + {
  266 + "duration": 15180759000,
  267 + "end": 1616575959000,
  268 + "id": "18",
  269 + "isOnTime": false,
  270 + "opinion": "",
  271 + "parentId": "HHCS-L-2020-0123",
  272 + "principal": "",
  273 + "responsible": "",
  274 + "start": 1601395200000,
  275 + "taskPoint": "发货实际",
  276 + "type": "task"
  277 + },
  278 + {
  279 + "duration": 0,
  280 + "end": 1616575959000,
  281 + "id": "19",
  282 + "isOnTime": false,
  283 + "opinion": "",
  284 + "parentId": "HHCS-L-2020-0123",
  285 + "principal": "",
  286 + "responsible": "",
  287 + "start": 1616575959000,
  288 + "taskPoint": "客户现场安装计划",
  289 + "type": "task"
  290 + },
  291 + {
  292 + "duration": 0,
  293 + "end": 1616575959000,
  294 + "id": "20",
  295 + "isOnTime": false,
  296 + "opinion": "",
  297 + "parentId": "HHCS-L-2020-0123",
  298 + "principal": "",
  299 + "responsible": "",
  300 + "start": 1616575959000,
  301 + "taskPoint": "客户现场安装实际",
  302 + "type": "task"
  303 + },
  304 + {
  305 + "duration": 15180759000,
  306 + "end": 1616575959000,
  307 + "id": "15",
  308 + "isOnTime": false,
  309 + "opinion": "",
  310 + "parentId": "HHCS-L-2020-0123",
  311 + "principal": "",
  312 + "responsible": "",
  313 + "start": 1601395200000,
  314 + "taskPoint": "场内调试计划",
  315 + "type": "task"
  316 + },
  317 + {
  318 + "duration": 15180759000,
  319 + "end": 1616575959000,
  320 + "id": "16",
  321 + "isOnTime": false,
  322 + "opinion": "",
  323 + "parentId": "HHCS-L-2020-0123",
  324 + "principal": "",
  325 + "responsible": "",
  326 + "start": 1601395200000,
  327 + "taskPoint": "生产自制实际",
  328 + "type": "task"
  329 + },
  330 + {
  331 + "duration": 0,
  332 + "end": 1616575959000,
  333 + "id": "21",
  334 + "isOnTime": false,
  335 + "opinion": "",
  336 + "parentId": "HHCS-L-2020-0123",
  337 + "principal": "",
  338 + "responsible": "",
  339 + "start": 1616575959000,
  340 + "taskPoint": "客户现场调试计划",
  341 + "type": "task"
  342 + },
  343 + {
  344 + "duration": 0,
  345 + "end": 1616575959000,
  346 + "isOnTime": false,
  347 + "opinion": "",
  348 + "parentId": "HHCS-L-2020-0123",
  349 + "principal": "",
  350 + "responsible": "",
  351 + "start": 1616575959000,
  352 + "taskPoint": "客户现场调试实际",
  353 + "type": "task"
  354 + },
  355 + {
  356 + "duration": 0,
  357 + "end": 1616575959000,
  358 + "isOnTime": false,
  359 + "opinion": "",
  360 + "parentId": "HHCS-L-2020-0123",
  361 + "principal": "",
  362 + "responsible": "",
  363 + "start": 1616575959000,
  364 + "taskPoint": "预验收计划",
  365 + "type": "task"
  366 + },
  367 + {
  368 + "duration": 0,
  369 + "end": 1616575959000,
  370 + "isOnTime": false,
  371 + "opinion": "",
  372 + "parentId": "HHCS-L-2020-0123",
  373 + "principal": "",
  374 + "responsible": "",
  375 + "start": 1616575959000,
  376 + "taskPoint": "预验收实际",
  377 + "type": "task"
  378 + }
  379 +];
  380 +let options = {
  381 + taskMapping: {
  382 + progress: "percent"
  383 + },
  384 + maxRows: 100,
  385 + maxHeight: 500,
  386 + title: {
  387 + label: "Your project title as html",
  388 + html: false
  389 + },
  390 + row: {
  391 + height: 24
  392 + },
  393 + calendar: {
  394 + hour: {
  395 + display: false
  396 + }
  397 + },
  398 + chart: {
  399 + progress: {
  400 + bar: false
  401 + },
  402 + expander: {
  403 + display: false
  404 + }
  405 + },
  406 + taskList: {
  407 + expander: {
  408 + straight: false
  409 + },
  410 + columns: [
  411 + {
  412 + id: 1,
  413 + label: "ID",
  414 + value: "id",
  415 + width: 50
  416 + },
  417 + {
  418 + id: 2,
  419 + label: "任务戳点",
  420 + value: "taskPoint",
  421 + width: 150,
  422 + expander: true
  423 + },
  424 + {
  425 + id: 3,
  426 + label: "开始时间",
  427 + value: "start",
  428 + width: 130
  429 + },
  430 + {
  431 + id: 4,
  432 + label: "完成日期",
  433 + value: "end",
  434 + width: 100,
  435 + },
  436 + {
  437 + id: 5,
  438 + label: "部件号",
  439 + value: "principal",
  440 + width: 100
  441 + },
  442 + {
  443 + id: 8,
  444 + label: "名称",
  445 + value: "responsible",
  446 + width: 120
  447 + },
  448 + {
  449 + id: 9,
  450 + label: "意见",
  451 + value: "opinion",
  452 + width: 60
  453 + },
  454 + {
  455 + id: 9,
  456 + label: "完成",
  457 + value: "isOnTime",
  458 + width: 60
  459 + }
  460 + ]
  461 + },
  462 + locale: {
  463 + name: "zh-cn",
  464 + Now: "Now",
  465 + "X-Scale": "Zoom-X",
  466 + "Y-Scale": "Zoom-Y",
  467 + "Task list width": "列头宽度",
  468 + "Before/After": "Expand",
  469 + "Display task list": "Task list",
  470 + weekdays:["周日","周一","周二","周三","周四","周五","周六"],
  471 + months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],
  472 + },
  473 +};
  474 +
  475 +let doingStyle = {
  476 + base: {
  477 + fill: '#BFEFFF',
  478 + stroke: '#BFEFFF'
  479 + }
  480 +}
  481 +let warnStyle = {
  482 + base: {
  483 + fill: '#FF6A6A',
  484 + stroke: '#FF6A6A'
  485 + }
  486 +}
  487 +let finishStyle = {
  488 + base: {
  489 + fill: '#C1FFC1',
  490 + stroke: '#C1FFC1'
  491 + }
  492 +}
  493 +let cancelStyle = {
  494 + base: {
  495 + fill: '#BABABA',
  496 + stroke: '#BABABA'
  497 + }
  498 +}
  499 +
  500 +export default {
  501 + name: 'ProjectRate',
  502 + components: {
  503 + GanttElastic,
  504 + GanttHeader
  505 + },
  506 + mounted() {
  507 + that = this
  508 + },
  509 + data() {
  510 + return {
  511 + tasks,
  512 + options,
  513 + dynamicStyle: {},
  514 + lastId: 16,
  515 + queryParam: []
  516 + }
  517 + },
  518 + methods: {
  519 + moment,
  520 + addTask() {
  521 + this.tasks.push({
  522 + id: this.lastId++,
  523 + label:
  524 + '<a href="https://images.pexels.com/photos/423364/pexels-photo-423364.jpeg?auto=compress&cs=tinysrgb&h=650&w=940" target="_blank" style="color:#0077c0;">Yeaahh! you have added a task bro!</a>',
  525 + projectCode:
  526 + '<a href="https://images.pexels.com/photos/423364/pexels-photo-423364.jpeg?auto=compress&cs=tinysrgb&h=650&w=940" target="_blank" style="color:#0077c0;">Awesome!</a>',
  527 + start: getDate(24 * 3),
  528 + duration: 1 * 24 * 60 * 60 * 1000,
  529 + percent: 50,
  530 + type: 'project'
  531 + })
  532 + },
  533 + tasksUpdate(tasks) {
  534 + this.tasks = tasks
  535 + },
  536 + optionsUpdate(options) {
  537 + this.options = options
  538 + },
  539 + styleUpdate(style) {
  540 + this.dynamicStyle = style
  541 + }
  542 + }
  543 +}
  544 +</script>
  545 +
  546 +<style scoped>
  547 +
  548 +</style>
0 549 \ No newline at end of file
... ...
vue.config.js
... ... @@ -86,7 +86,7 @@ module.exports = {
86 86 }
87 87 }, */
88 88 '/jeecg-boot': {
89   - target: 'localhost:8080', // 请求本地 需要jeecg-boot后台项目
  89 + target: '172.16.28.165:8080', // 请求本地 需要jeecg-boot后台项目
90 90 ws: false,
91 91 changeOrigin: true
92 92 }
... ...