Commit 6545fded authored by ztf's avatar ztf

新增科研计划app

parent 207768f4
......@@ -40,5 +40,6 @@ const subMicroModules = [
'dee-production',
'dee-quality',
'dee-equipment',
'dee-performance'
'dee-performance',
'dee-plan'
]
\ No newline at end of file
......@@ -40,5 +40,6 @@ export const microModules = [
'dee-production',
'dee-quality',
'dee-equipment',
'dee-performance'
'dee-performance',
'dee-plan'
]
......@@ -46,8 +46,8 @@ export default {
},
data() {
return {
linksName: 'ApplyDoc',
replayLinksName: 'ReplyDoc',
linksName: 'ExtApplyDoc',
replayLinksName: 'EXtReplyDoc',
loading: false,
tableData: [],
selection: [],
......
build/*.js
src/assets/*.js
public
dist
module.exports = {
root: true,
parserOptions: {
parser: 'babel-eslint',
sourceType: 'module'
},
env: {
browser: true,
node: true,
es6: true,
},
extends: ['plugin:vue/recommended', 'eslint:recommended'],
// add your custom rules here
//it is base on https://github.com/vuejs/eslint-config-vue
rules: {
"vue/max-attributes-per-line": [2, {
"singleline": 10,
"multiline": {
"max": 1,
"allowFirstLine": false
}
}],
"vue/singleline-html-element-content-newline": "off",
"vue/multiline-html-element-content-newline":"off",
"vue/name-property-casing": ["error", "PascalCase"],
"vue/no-v-html": "off",
'accessor-pairs': 2,
'arrow-spacing': [2, {
'before': true,
'after': true
}],
'block-spacing': [2, 'always'],
'brace-style': [2, '1tbs', {
'allowSingleLine': true
}],
'camelcase': [0, {
'properties': 'always'
}],
'comma-dangle': [2, 'never'],
'comma-spacing': [2, {
'before': false,
'after': true
}],
'comma-style': [2, 'last'],
'constructor-super': 2,
'curly': [2, 'multi-line'],
'dot-location': [2, 'property'],
'eol-last': 2,
'eqeqeq': ["error", "always", {"null": "ignore"}],
'generator-star-spacing': [2, {
'before': true,
'after': true
}],
'handle-callback-err': [2, '^(err|error)$'],
'indent': [2, 2, {
'SwitchCase': 1
}],
'jsx-quotes': [2, 'prefer-single'],
'key-spacing': [2, {
'beforeColon': false,
'afterColon': true
}],
'keyword-spacing': [2, {
'before': true,
'after': true
}],
'new-cap': [2, {
'newIsCap': true,
'capIsNew': false
}],
'new-parens': 2,
'no-array-constructor': 2,
'no-caller': 2,
'no-console': 'off',
'no-class-assign': 2,
'no-cond-assign': 2,
'no-const-assign': 2,
'no-control-regex': 0,
'no-delete-var': 2,
'no-dupe-args': 2,
'no-dupe-class-members': 2,
'no-dupe-keys': 2,
'no-duplicate-case': 2,
'no-empty-character-class': 2,
'no-empty-pattern': 2,
'no-eval': 2,
'no-ex-assign': 2,
'no-extend-native': 2,
'no-extra-bind': 2,
'no-extra-boolean-cast': 2,
'no-extra-parens': [2, 'functions'],
'no-fallthrough': 2,
'no-floating-decimal': 2,
'no-func-assign': 2,
'no-implied-eval': 2,
'no-inner-declarations': [2, 'functions'],
'no-invalid-regexp': 2,
'no-irregular-whitespace': 2,
'no-iterator': 2,
'no-label-var': 2,
'no-labels': [2, {
'allowLoop': false,
'allowSwitch': false
}],
'no-lone-blocks': 2,
'no-mixed-spaces-and-tabs': 2,
'no-multi-spaces': 2,
'no-multi-str': 2,
'no-multiple-empty-lines': [2, {
'max': 1
}],
'no-native-reassign': 2,
'no-negated-in-lhs': 2,
'no-new-object': 2,
'no-new-require': 2,
'no-new-symbol': 2,
'no-new-wrappers': 2,
'no-obj-calls': 2,
'no-octal': 2,
'no-octal-escape': 2,
'no-path-concat': 2,
'no-proto': 2,
'no-redeclare': 2,
'no-regex-spaces': 2,
'no-return-assign': [2, 'except-parens'],
'no-self-assign': 2,
'no-self-compare': 2,
'no-sequences': 2,
'no-shadow-restricted-names': 2,
'no-spaced-func': 2,
'no-sparse-arrays': 2,
'no-this-before-super': 2,
'no-throw-literal': 2,
'no-trailing-spaces': 2,
'no-undef': 2,
'no-undef-init': 2,
'no-unexpected-multiline': 2,
'no-unmodified-loop-condition': 2,
'no-unneeded-ternary': [2, {
'defaultAssignment': false
}],
'no-unreachable': 2,
'no-unsafe-finally': 2,
'no-unused-vars': [2, {
'vars': 'all',
'args': 'none'
}],
'no-useless-call': 2,
'no-useless-computed-key': 2,
'no-useless-constructor': 2,
'no-useless-escape': 0,
'no-whitespace-before-property': 2,
'no-with': 2,
'one-var': [2, {
'initialized': 'never'
}],
'operator-linebreak': [2, 'after', {
'overrides': {
'?': 'before',
':': 'before'
}
}],
'padded-blocks': [2, 'never'],
'quotes': [2, 'single', {
'avoidEscape': true,
'allowTemplateLiterals': true
}],
'semi': [2, 'never'],
'semi-spacing': [2, {
'before': false,
'after': true
}],
'space-before-blocks': [2, 'always'],
'space-before-function-paren': [2, 'never'],
'space-in-parens': [2, 'never'],
'space-infix-ops': 2,
'space-unary-ops': [2, {
'words': true,
'nonwords': false
}],
'spaced-comment': [2, 'always', {
'markers': ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ',']
}],
'template-curly-spacing': [2, 'never'],
'use-isnan': 2,
'valid-typeof': 2,
'wrap-iife': [2, 'any'],
'yield-star-spacing': [2, 'both'],
'yoda': [2, 'never'],
'prefer-const': 2,
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
'object-curly-spacing': [2, 'always', {
objectsInObjects: false
}],
'array-bracket-spacing': [2, 'never']
}
}
.DS_Store
node_modules
/dist
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw*
# app-javascript
## Project setup
```
yarn install
```
### Compiles and hot-reloads for development
```
yarn run serve
```
### Compiles and minifies for production
```
yarn run build
```
### Run your tests
```
yarn run test
```
### Lints and fixes files
```
yarn run lint
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
module.exports = {
presets: [
'@vue/app'
]
}
module.exports = {
moduleFileExtensions: ['js', 'jsx', 'json', 'vue'],
transform: {
'^.+\\.vue$': 'vue-jest',
'.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$':
'jest-transform-stub',
'^.+\\.jsx?$': 'babel-jest'
},
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1'
},
snapshotSerializers: ['jest-serializer-vue'],
testMatch: [
'**/tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)'
],
collectCoverageFrom: ['src/utils/**/*.{js,vue}', '!src/utils/auth.js', '!src/utils/request.js', 'src/components/**/*.{js,vue}'],
coverageDirectory: '<rootDir>/tests/unit/coverage',
// 'collectCoverage': true,
'coverageReporters': [
'lcov',
'text-summary'
],
testURL: 'http://localhost/'
}
{
"name": "dee-plan",
"devPort": 10303,
"version": "0.1.0",
"scripts": {
"serve": "vue-cli-service serve",
"lint": "vue-cli-service lint",
"build": "vue-cli-service build --report"
},
"dependencies": {
"axios": "^0.19.2",
"lodash.foreach": "^4.5.0",
"moment": "^2.26.0",
"vue": "^2.6.10",
"vue-router": "^3.1.3",
"vuedraggable": "2.23.0",
"vuex": "^3.1.2",
"xlsx": "^0.18.5",
"xlsx-js-style": "^1.2.0"
},
"devDependencies": {
"@babel/core": "7.0.0",
"@babel/register": "7.0.0",
"@vue/cli-plugin-babel": "3.6.0",
"@vue/cli-plugin-eslint": "^3.9.1",
"@vue/cli-plugin-unit-jest": "3.6.3",
"@vue/cli-service": "^4.1.0",
"@vue/test-utils": "1.0.0-beta.29",
"autoprefixer": "^9.5.1",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "^8.0.1",
"babel-jest": "23.6.0",
"chalk": "2.4.2",
"connect": "3.6.6",
"css-loader": "^1.0.1",
"eslint": "5.15.3",
"eslint-plugin-prettier": "^3.1.3",
"eslint-plugin-vue": "5.2.2",
"html-webpack-plugin": "3.2.0",
"lint-staged": "^10.2.9",
"mockjs": "1.0.1-beta3",
"node-sass": "^4.14.1",
"runjs": "^4.3.2",
"sass-loader": "^7.3.1",
"script-ext-html-webpack-plugin": "2.1.3",
"script-loader": "0.7.2",
"serve-static": "^1.13.2",
"style-loader": "^1.1.3",
"svg-sprite-loader": "4.1.3",
"svgo": "1.2.2",
"vue-template-compiler": "^2.6.10",
"webpack": "^4.4.1"
},
"postcss": {
"plugins": {
"autoprefixer": {}
}
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/essential",
"@vue/prettier"
],
"rules": {
"no-console": "off",
"no-unused-vars": "off"
},
"parserOptions": {
"parser": "babel-eslint"
}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
],
"lint-staged": {
"*.{js,vue}": [
"vue-cli-service lint",
"git add"
]
},
"license": "MIT"
}
<template>
<div class="app">
<router-view />
</div>
</template>
<script>
import './base'
export default {}
</script>
<style scoped>
.app {
height: 100%;
}
</style>
import {
get,
del,
post,
put
} from '../utils/http'
import $store from '@/store'
// 获取我的收藏数据
export function getCollectData(params) {
return get('/ObjectFavoriteLog/findLogPage', params)
}
// 获取最近访问数据和经常访问
export function getRecentlyVisitData(params) {
return get('/ObjectVisitedLog/findLogPage', params)
}
// 清除最近访问和经常访问
export function delRecentlyAndCommonVisitData() {
return del('/ObjectVisitedLog/clear')
}
// 清除经常访问
export function delCommonVisitData() {
return del('/ObjectFavoriteLog/delSession')
}
// 取消收藏对象
export function cancelCollect(params) {
return post('/ObjectFavoriteLog/unCollect', params)
}
// 修改密码
export function revisePassword(params) {
return post('/DxUserAccount/password/revise', params)
}
// 用户定制APP
export function collectUserApp(params) {
return post(`/userApplication/collect?dxApplicationId=${params}`, true)
}
// 获取用户定制的APP
export function getUserAppList() {
// return get('/userApplication/findCollections')
return $store.dispatch('apiCache/getRequestCache', { url: '/userApplication/findCollections' })
}
// 用户取消定制APP
export function unCollectUserApp(params) {
return post(`/userApplication/unCollect?dxApplicationId=${params}`)
}
// 更新用户信息
export function updateUserInfo(params) {
return put('/DxUserInfo', params)
}
// 获取存储库id
export function getBucketByAppID(params) {
return get('/RepoBucket/getBucketByAppID', params)
}
// 用户上传头像时获取桶
export function getBucketIdByAppName(innerName) {
return post('/userPicture/findBucketId', innerName)
}
// 文件下载
export function downloadFileById(id) {
return get(`/dfs/fileManager/download?fileId=${id}`, null, true)
}
// 查询用户数据
export function getUserInfo(id) {
return get(`/DxUserInfo/${id}`)
}
// 查询用户模块
export function getUserModule() {
// return get('/userModel/findCollections')
return $store.dispatch('apiCache/getRequestCache', { url: '/userModel/findCollections' })
}
// 根据模块id查询模块信息
export function getModuleById(ids) {
// return get(`/DxAppModule/byIds?ids=${ids}`)
return $store.dispatch('apiCache/getRequestCache', { url: `/DxAppModule/byIds?ids=${ids}` })
}
// 用户添加模块
export function collectUserModel(params) {
// const ids = params.map(x => `modelCardIdS=${x}`).join('&')
// const str = ids ? ('?' + ids) : ''
// return post(`/userModel/collect${str}`)
return post(`/userModel/collect`, params)
}
// 用户删除模块
export function unCollectUserModel(id) {
return post(`/userModel/unCollect?modelCode=${id}`)
}
// 根据工作空间id获取首页排序后的数据
export function getPageByWorkspaceId(params) {
return get('/DxWorkspace/findWorkspaceListById', params)
}
export function getUserByScope(params) {
return post('/workflow/inst/participants/scope', params)
}
export function userSearch(params) {
return post('/DxUserInfo/search', params)
}
import Vue from 'vue'
import store from './store'
// 子项目异步注册 store module
// Vue.__share_pool__.store.registerModule(process.env.VUE_APP_NAME, store)
Vue.__share_pool__.store.registerModule('config', store)
export default null
// import Vue from 'vue'
// import routes from './routes'
// import '@/styles/index.scss' // global css
// const sharePool = (Vue.__share_pool__ = Vue.__share_pool__ || {})
// const store = (sharePool.store = sharePool.store || {})
import privateComponents from './privateComponents/index'
function loadComponent(comName, type) {
let resolveComponent
if (type === 'privateComponents') {
resolveComponent = resolve => { require([`@/privateComponents/${'components' + comName}`], resolve) }
} else if (type === 'view') {
resolveComponent = resolve => { require([`@/views/${comName}`], resolve) }
}
return resolveComponent
}
export default {
name: 'dee-plan',
privateComponents,
loadComponent,
beforeEach(from, to, next) {
next()
},
init() {}
}
<!-- -->
<template>
<div />
</template>
<script>
export default {
name: 'Demo',
componentName: '测试',
props: {
},
data() {
return {
}
},
mounted() {
},
methods: {
}
}
</script>
<style lang='scss' scoped>
</style>
const requireComponent = require.context(
'./components', // 在当前目录下查找
true, // 遍历子文件夹
/\.vue$/ // 正则匹配 以 .vue结尾的文件
)
const privateComponents = []
requireComponent.keys().forEach(fileName => {
const comp = requireComponent(fileName)
if (comp.default.componentName) {
let layoutConfigData = comp.default.layoutConfigData
if (!layoutConfigData && comp.default.mixins) {
const hasLayoutConfigData = comp.default.mixins.find(el => {
return el.layoutConfigData
})
if (hasLayoutConfigData) {
layoutConfigData = hasLayoutConfigData.layoutConfigData
}
}
privateComponents.push(
{
componentName: comp.default.componentName,
name: comp.default.name,
path: fileName.slice(1),
layoutConfigData: layoutConfigData || []
}
)
}
})
export default privateComponents
const containerComponents = [
'AppendDoc'
]
const formListComponents = [
'AppendDoc'
]
const tabComponents = [
'AppendDoc'
]
const tableListComponents = [
'AppendDoc'
]
export default {
containerComponents,
formListComponents,
tabComponents,
tableListComponents
}
/* routes-list */
// const APP_NAME = process.env.VUE_APP_NAME;
// import Vue from 'vue'
// const sharePool = (Vue.__share_pool__ = Vue.__share_pool__ || {})
// const store = (sharePool.store = sharePool.store || {})
const App = () => import('./App.vue')
export default [
{
path: '/docCenter',
name: 'docCenter',
component: () => import('@/views/doc/center'),
meta: { title: '文档中心', alive: true }
},
{
path: '/doc',
component: App,
name: 'doc',
meta: { title: '文档中心', icon: 'xitong' },
redirect: '/doc/add',
children: [
{
hidden: true,
path: 'add',
name: 'docAdd',
component: () => import('@/views/doc/add'),
meta: { title: '新建文档', alive: false }
},
{
hidden: true,
path: 'edit',
name: 'docEdit',
component: () => import('@/views/doc/edit'),
meta: { title: '编辑文档' }
}
]
}
]
/* store module */
import { actionInit } from '@/utils/store.js'
export default {
namespaced: true, // namespaced must be true in module app.
state: {
name: process.env.VUE_APP_NAME
},
mutations: {},
actions: actionInit()
}
import Vue from 'vue'
export default new Vue()
export const logicalRelationshipMap = {
SF: {
number: '3',
text: 'start_to_finish'
},
SS: {
number: '1',
text: 'start_to_start'
},
FF: {
number: '2',
text: 'finish_to_finish'
},
FS: {
number: '0',
text: 'finish_to_start'
}
}
export const gantFieldMap = {
text: 'name',
start_date: 'startDate',
'finishDate': 'finishDate',
progress: 'percentWorkComplete'
}
export const userOrgMap = {
managedBy: 'managedOrg',
ownedBy: 'ownedOrg'
}
const YesNoOptions = [
{
key: true,
label: '是'
},
{
key: false,
label: '否'
}
]
const PriorityOptions = [
{ key: '紧急', label: '紧急' },
{ key: '高', label: '高' },
{ key: '中', label: '中' },
{ key: '低', label: '低' }
]
// const StateOptions = [
// { key: 'NotStarted', label: '未开始' },
// { key: 'InProgress', label: '进行中' },
// { key: 'Shelve', label: '搁置中' },
// { key: 'Complete', label: '已完成' },
// { key: 'Closed', label: '已关闭' },
// { key: 'Repulse', label: '打回' }
// ]
export const speColumnMap = {
name: {
name: 'text',
editor: { type: 'text', map_to: 'text' },
align: 'left',
min_width: 200
},
state: {
name: 'state'
// editor: { type: 'select', map_to: 'state', options: StateOptions }
},
'manager.userName': {
name: 'manager'
},
planStartDate: {
name: 'start_date',
editor: { type: 'date', map_to: 'start_date' }
},
planEndDate: {
name: 'end_date',
editor: { type: 'date', map_to: 'end_date' }
},
actualStartDate: {
name: 'actualStartDate',
editor: { type: 'date', map_to: 'actualStartDate' }
},
actualEndDate: {
name: 'actualEndDate',
editor: { type: 'date', map_to: 'actualEndDate' }
},
milepost: {
name: 'milepost',
editor: { type: 'select', map_to: 'milepost', options: YesNoOptions }
},
priority: {
name: 'priority',
editor: { type: 'select', map_to: 'priority', options: PriorityOptions }
},
completionRate: {
name: 'completionRate',
editor: { type: 'text', map_to: 'completionRate' }
},
workDuration: {
name: 'workDuration', // 避免和内置关键字冲突
editor: { type: 'text', map_to: 'workDuration' }
}
}
/** 工作空间--不同项目任务颜色枚举 */
export const taskColorMap = {
'计划': '#f17a72',
'督查': '#6e9bf6',
'会议': '#3ca7ea',
'经费': '#6e9bf6',
'风险': '#a07bef',
'信息': '#3ca7ea'
}
/** 计划任务,可更改的状态*/
export const taskChangeStateOptions = [
{
label: '进行中',
value: '进行中'
},
{
label: '已完成',
value: '已完成'
},
{
label: '已暂停',
value: '已暂停'
}
]
/** 风险严重程度说明 */
export const riskSeverityObject = [
{
value: 'A',
label: 'A',
description: '轻微',
remark: {
a: '基本不影响型号任务目标实现',
b: '无人员伤害'
}
},
{
value: 'B',
label: 'B',
description: '轻度',
remark: {
a: '型号产品系统极轻微损坏或仅次要功能丧失且可以立即修复',
b: '人员轻微伤害'
}
},
{
value: 'C',
label: 'C',
description: '重度',
remark: {
a: '阶段主要任务完成或达到的目标仅为型号任务的主要考核目标',
b: '型号产品轻度损坏或主要功能丧失且可以修复',
c: '人员轻度伤害'
}
},
{
value: 'D',
label: 'D',
description: '严重',
remark: {
a: '型号任务不能达到主要试验目的',
b: '主要性能指标、可靠性指标不能实现',
c: '影响型号任务转场、发射窗口推迟等重大节点',
d: '阶段任务部分完成或仅达到部分任务目标,且未达到的目标是型号任务的主要考核目标',
e: '型号产品或组件技术方案出现颠覆或重大反复',
f: '型号产品系统毁坏或主要功能丧失且无法修复',
g: '人员严重伤害'
}
},
{
value: 'E',
label: 'E',
description: '灾难',
remark: {
a: '型号任务失败'
}
}
]
/** 风险发生可能性说明 */
export const riskPossibilityList = [
{
value: 'a',
label: 'a',
description: '极少',
remark: '几乎不发生,发生概率 p<0.01%'
},
{
value: 'b',
label: 'b',
description: '很少',
remark: '很少发生,发生概率 0.01%≤p<0.1%'
},
{
value: 'c',
label: 'c',
description: '少',
remark: '偶尔发生,发生概率 0.1%<p≤1%'
},
{
value: 'd',
label: 'd',
description: '可能',
remark: '频繁发生,发生概率 1%≤p<10%'
},
{
value: 'e',
label: 'e',
description: '很可能',
remark: '很可能发生,发生概率 p≥10%'
}
]
/** 风险等级计算 */
export const riskLevelMap = {
A: {
a: { label: '极低-I', value: 'I' },
b: { label: '极低-I', value: 'I' },
c: { label: '极低-I', value: 'I' },
d: { label: '低-II', value: 'II' },
e: { label: '中等-III', value: 'III' }
},
B: {
a: { label: '极低-I', value: 'I' },
b: { label: '极低-I', value: 'I' },
c: { label: '低-II', value: 'II' },
d: { label: '中等-III', value: 'III' },
e: { label: '中等-III', value: 'III' }
},
C: {
a: { label: '极低-I', value: 'I' },
b: { label: '低-II', value: 'II' },
c: { label: '中等-III', value: 'III' },
d: { label: '中等-III', value: 'III' },
e: { label: '高-IV', value: 'IV' }
},
D: {
a: { label: '中等-III', value: 'III' },
b: { label: '中等-III', value: 'III' },
c: { label: '中等-III', value: 'III' },
d: { label: '高-IV', value: 'IV' },
e: { label: '极高-V', value: 'V' }
},
E: {
a: { label: '中等-III', value: 'III' },
b: { label: '中等-III', value: 'III' },
c: { label: '高-IV', value: 'IV' },
d: { label: '极高-V', value: 'V' },
e: { label: '极高-V', value: 'V' }
}
}
/** 排会管理图例信息 */
export const meetingExplainList = [
{
color: 'rgba(93, 187, 106, 1)',
className: 'published',
text: '已发放'
},
{
color: 'rgba(67, 162, 235, 1)',
className: 'not_published',
text: '未发放'
},
{
color: 'rgba(229, 105, 105, 1)',
className: 'people_time_conclusion',
text: '人员时间冲突'
},
{
color: 'rgba(243, 182, 75, 1)',
className: 'time_meeting_room_conclusion',
text: '时间会议室冲突'
},
{
color: 'rgba(152, 172, 182, 1)',
className: 'history_meeting',
text: '历史会议'
}
]
export const integralDistribution = {
'动态信息': {
'一周要览': 1,
'集团公司': 2,
'上级部门': 4
},
'专报信息': {
'一周要览': 4,
'集团公司': 8,
'上级部门': 15
},
'综合信息': {
'一周要览': 10,
'集团公司': 20,
'上级部门': 40
}
}
export const taskTypeMap = {
'SupervisionAndInspection': 'SIActivity',
'PPDeptPlan': 'PPActivity',
'WholeCyclePlan': 'WholeCycleActivity'
}
export const reportToList = ['上级部门', '集团公司', '一周要览']
export const assessmentResultMap = {
confirmResult: {
label: '厂所领导',
formKey: ['confirmClassify', 'confirmType', 'confirmDescription']
},
confirmResult2: {
label: '领域办',
formKey: ['confirmClassify2', 'confirmType2', 'confirmDescription2']
},
confirmResult3: {
label: '型号处',
formKey: ['confirmClassify3', 'confirmType3', 'confirmDescription3']
}
}
/** 督查评分部分 */
// 部门总体工作效率评分说明
export const deptWorkEfficiencyExplain = [
{
description: '任务按期或调整一次完成',
score: 40
},
{
description: '调整2次(含)完成',
score: 35
},
{
description: '调整3次(含)及以上完成或延期完成',
score: 30
},
{
description: '统计周期内未完成',
score: '不得分'
}
]
// 部门总体工作质量评分说明
export const deptWorkQualityExplain = [
{
description: '对完成质量非常满意,或在计划时间内高质量完成任务并按时完成办结流程',
score: '30-40'
},
{
description: '对完成质量满意,或在计划时间内基本完成任务',
score: '20-30'
},
{
description: '完成质量一般,或在计划时间内初步完成任务',
score: '10-20'
},
{
description: '完成质量较差',
score: '0-10'
}
]
// 部门总体任务量评分说明
export const deptTaskVolumeExplain = [
{
description: 'x≤3',
score: '10'
},
{
description: '3<x≤5',
score: '8'
},
{
description: '5<x≤7',
score: '5'
},
{
description: '7<x≤10',
score: '3'
},
{
description: 'x>10',
score: '0'
}
]
// 部门总体协调配合评分说明
export const deptCoordinationAndCooperationExplain = [
{
description: '工作质量满足总体工作要求',
score: '4'
},
{
description: '工作效率满足整体工作要求',
score: '4'
},
{
description: '积极协调配合,沟通流畅',
score: '2'
}
]
// 部门总体约束性评分说明
export const deptBindingExplain = [
{
description: '未按时完成事项办结或调整申请流程,或未按要求对督查工作进行阶段目标分解',
score: '-2'
},
{
description: '未按时完成交付物的送审流程,或交付物与要求不符',
score: '-3'
},
{
description: '对督查工作事项落实情况进行结果验证,督查结果与反馈内容差异较大',
score: '-5'
}
]
// 项目任务--不同状态的任务显示不同颜色
export const taskStateAndColorClassMap = {
'编制': 'gantt_task_edit',
'待审核': 'gantt_task_waiting',
'待审批': 'gantt_task_waiting',
'进行中': 'gantt_task_waiting',
'变更申请': 'gantt_task_waiting',
'已暂停': 'gantt_task_stop',
'驳回': 'gantt_task_stop',
'变更中': 'gantt_task_waiting',
'待校对': 'gantt_task_waiting',
'已完成': 'gantt_task_finish',
'完成待确认': 'gantt_task_waiting',
'父项完成待确认': 'gantt_task_waiting'
}
import Vue from 'vue'
const sharePool = (Vue.__share_pool__ = Vue.__share_pool__ || {})
const http = (sharePool.http = sharePool.http || {})
function get(url, params) {
return http.get(url, params)
}
function post(url, params) {
return http.post(url, params)
}
function put(url, params) {
return http.put(url, params)
}
function patch(url, params) {
return http.patch(url, params)
}
function del(url, params) {
return http.del(url, params)
}
function downloadFile(url, type) {
return http.downloadFile(url, type)
}
function downloadFileWithParams(url, type, params) {
return http.downloadFile(url, type, params)
}
function downloadZip(url, type) {
return http.downloadZip(url, type)
}
export { get, post, put, del, patch, downloadFile, downloadZip, downloadFileWithParams }
/**
* Created by CXG on 19/7/3.
*/
/**
* @param {Object} sapproval
* @param {Object} selfAction
* @returns {Object}
*/
export function actionInit(sapproval, selfAction) {
const resOBj = {}
if (sapproval) {
Object.keys(sapproval).forEach(function(key) {
resOBj[key] = ({ commit }, params) => {
return new Promise((resolve, reject) => {
sapproval[key](params).then(res => {
resolve(res)
}).catch(error => {
reject(error)
})
})
}
})
}
if (selfAction) {
return Object.assign(resOBj, selfAction)
} else {
return resOBj
}
}
const webpack = require('webpack')
const APP_NAME = require('./package.json').name
const PORT = require('./package.json').devPort
const NODE_ENV = process.env.NODE_ENV || 'development'
const path = require('path')
log('APP_NAME: ', APP_NAME)
log('NODE_ENV: ', NODE_ENV)
function resolve(dir) {
return path.join(__dirname, dir)
}
module.exports = {
publicPath: `${NODE_ENV === 'development' ? '' : '.'}/${APP_NAME}/`,
css: {
extract: false
},
productionSourceMap: false,
configureWebpack: {
// provide the app's title in webpack's name field, so that
// it can be accessed in index.html to inject the correct title.
resolve: {
alias: {
'@': resolve('src')
}
}
},
chainWebpack: (config) => {
config.externals({
'vue': 'Vue'
})
config.output
.filename('main.js')
.chunkFilename('[name].[chunkhash:8].js')
.jsonpFunction(`webpackJsonp-${APP_NAME}`)
.library(`app-${APP_NAME}`)
.libraryExport('default')
.libraryTarget('umd')
config.optimization.splitChunks(false)
config.plugin('define').use(webpack.DefinePlugin, [{
'process.env.VUE_APP_NAME': JSON.stringify(APP_NAME)
}])
config.plugins
.delete('html')
.delete('preload')
.delete('prefetch')
},
devServer: {
port: PORT
}
}
function log(label, content, options) {
console.log('\x1b[1m%s\x1b[31m%s\x1b[0m', label, content)
}
......@@ -22,6 +22,7 @@ const apps = [
'dee-production',
'dee-quality',
'dee-equipment',
'dee-performance'
'dee-performance',
'dee-plan'
]
module.exports = apps;
\ No newline at end of file
......@@ -22,5 +22,6 @@ export const modules = [
'dee-production',
'dee-quality',
'dee-equipment',
'dee-performance'
'dee-performance',
'dee-plan'
]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment