diff --git a/departments150.json b/departments150.json deleted file mode 100644 index aa6cc37..0000000 --- a/departments150.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "code": "200", - "msg": "操作成功", - "data": { - "childDepartments": [], - "employees": [{ - "id": "53128112", - "employeeName": "测试1", - "isLeave": "0", - "open": "false" - },{ - "id": "53128113", - "employeeName": "测试2", - "isLeave": "0", - "open": "false" - }], - "titleDepartments": [{ - "departmentId": "150", - "departmentKey": "RLXZB_V2", - "departmentName": "人力行政部", - "departmentNames": "人力行政部", - "id": "150", - "parentId": "0" - }] - } -} \ No newline at end of file diff --git a/departments150.json b/departments150.json deleted file mode 100644 index aa6cc37..0000000 --- a/departments150.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "code": "200", - "msg": "操作成功", - "data": { - "childDepartments": [], - "employees": [{ - "id": "53128112", - "employeeName": "测试1", - "isLeave": "0", - "open": "false" - },{ - "id": "53128113", - "employeeName": "测试2", - "isLeave": "0", - "open": "false" - }], - "titleDepartments": [{ - "departmentId": "150", - "departmentKey": "RLXZB_V2", - "departmentName": "人力行政部", - "departmentNames": "人力行政部", - "id": "150", - "parentId": "0" - }] - } -} \ No newline at end of file diff --git a/plop-templates/component/index.hbs b/plop-templates/component/index.hbs deleted file mode 100644 index 162c0d3..0000000 --- a/plop-templates/component/index.hbs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/departments150.json b/departments150.json deleted file mode 100644 index aa6cc37..0000000 --- a/departments150.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "code": "200", - "msg": "操作成功", - "data": { - "childDepartments": [], - "employees": [{ - "id": "53128112", - "employeeName": "测试1", - "isLeave": "0", - "open": "false" - },{ - "id": "53128113", - "employeeName": "测试2", - "isLeave": "0", - "open": "false" - }], - "titleDepartments": [{ - "departmentId": "150", - "departmentKey": "RLXZB_V2", - "departmentName": "人力行政部", - "departmentNames": "人力行政部", - "id": "150", - "parentId": "0" - }] - } -} \ No newline at end of file diff --git a/plop-templates/component/index.hbs b/plop-templates/component/index.hbs deleted file mode 100644 index 162c0d3..0000000 --- a/plop-templates/component/index.hbs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/plop-templates/component/prompt.js b/plop-templates/component/prompt.js deleted file mode 100644 index 2b42bd2..0000000 --- a/plop-templates/component/prompt.js +++ /dev/null @@ -1,65 +0,0 @@ -const fs = require('fs') - -function getFolder(path) { - const components = [] - const files = fs.readdirSync(path) - files.forEach((item) => { - const stat = fs.lstatSync(`${path}/${item}`) - if (stat.isDirectory() === true && item !== 'components') { - components.push(`${path}/${item}`) - components.push(...getFolder(`${path}/${item}`)) - } - }) - return components -} - -module.exports = { - description: '创建组件', - prompts: [ - { - type: 'confirm', - name: 'isGlobal', - message: '是否为全局组件', - default: false, - }, - { - type: 'list', - name: 'path', - message: '请选择组件创建目录', - choices: getFolder('src/views'), - when: (answers) => { - return !answers.isGlobal - }, - }, - { - type: 'input', - name: 'name', - message: '请输入组件名称', - validate: (v) => { - if (!v || v.trim === '') { - return '组件名称不能为空' - } - else { - return true - } - }, - }, - ], - actions: (data) => { - let path = '' - if (data.isGlobal) { - path = 'src/components/{{properCase name}}/index.vue' - } - else { - path = `${data.path}/components/{{properCase name}}/index.vue` - } - const actions = [ - { - type: 'add', - path, - templateFile: 'plop-templates/component/index.hbs', - }, - ] - return actions - }, -} diff --git a/departments150.json b/departments150.json deleted file mode 100644 index aa6cc37..0000000 --- a/departments150.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "code": "200", - "msg": "操作成功", - "data": { - "childDepartments": [], - "employees": [{ - "id": "53128112", - "employeeName": "测试1", - "isLeave": "0", - "open": "false" - },{ - "id": "53128113", - "employeeName": "测试2", - "isLeave": "0", - "open": "false" - }], - "titleDepartments": [{ - "departmentId": "150", - "departmentKey": "RLXZB_V2", - "departmentName": "人力行政部", - "departmentNames": "人力行政部", - "id": "150", - "parentId": "0" - }] - } -} \ No newline at end of file diff --git a/plop-templates/component/index.hbs b/plop-templates/component/index.hbs deleted file mode 100644 index 162c0d3..0000000 --- a/plop-templates/component/index.hbs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/plop-templates/component/prompt.js b/plop-templates/component/prompt.js deleted file mode 100644 index 2b42bd2..0000000 --- a/plop-templates/component/prompt.js +++ /dev/null @@ -1,65 +0,0 @@ -const fs = require('fs') - -function getFolder(path) { - const components = [] - const files = fs.readdirSync(path) - files.forEach((item) => { - const stat = fs.lstatSync(`${path}/${item}`) - if (stat.isDirectory() === true && item !== 'components') { - components.push(`${path}/${item}`) - components.push(...getFolder(`${path}/${item}`)) - } - }) - return components -} - -module.exports = { - description: '创建组件', - prompts: [ - { - type: 'confirm', - name: 'isGlobal', - message: '是否为全局组件', - default: false, - }, - { - type: 'list', - name: 'path', - message: '请选择组件创建目录', - choices: getFolder('src/views'), - when: (answers) => { - return !answers.isGlobal - }, - }, - { - type: 'input', - name: 'name', - message: '请输入组件名称', - validate: (v) => { - if (!v || v.trim === '') { - return '组件名称不能为空' - } - else { - return true - } - }, - }, - ], - actions: (data) => { - let path = '' - if (data.isGlobal) { - path = 'src/components/{{properCase name}}/index.vue' - } - else { - path = `${data.path}/components/{{properCase name}}/index.vue` - } - const actions = [ - { - type: 'add', - path, - templateFile: 'plop-templates/component/index.hbs', - }, - ] - return actions - }, -} diff --git a/plop-templates/page/index.hbs b/plop-templates/page/index.hbs deleted file mode 100644 index acabfe3..0000000 --- a/plop-templates/page/index.hbs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/departments150.json b/departments150.json deleted file mode 100644 index aa6cc37..0000000 --- a/departments150.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "code": "200", - "msg": "操作成功", - "data": { - "childDepartments": [], - "employees": [{ - "id": "53128112", - "employeeName": "测试1", - "isLeave": "0", - "open": "false" - },{ - "id": "53128113", - "employeeName": "测试2", - "isLeave": "0", - "open": "false" - }], - "titleDepartments": [{ - "departmentId": "150", - "departmentKey": "RLXZB_V2", - "departmentName": "人力行政部", - "departmentNames": "人力行政部", - "id": "150", - "parentId": "0" - }] - } -} \ No newline at end of file diff --git a/plop-templates/component/index.hbs b/plop-templates/component/index.hbs deleted file mode 100644 index 162c0d3..0000000 --- a/plop-templates/component/index.hbs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/plop-templates/component/prompt.js b/plop-templates/component/prompt.js deleted file mode 100644 index 2b42bd2..0000000 --- a/plop-templates/component/prompt.js +++ /dev/null @@ -1,65 +0,0 @@ -const fs = require('fs') - -function getFolder(path) { - const components = [] - const files = fs.readdirSync(path) - files.forEach((item) => { - const stat = fs.lstatSync(`${path}/${item}`) - if (stat.isDirectory() === true && item !== 'components') { - components.push(`${path}/${item}`) - components.push(...getFolder(`${path}/${item}`)) - } - }) - return components -} - -module.exports = { - description: '创建组件', - prompts: [ - { - type: 'confirm', - name: 'isGlobal', - message: '是否为全局组件', - default: false, - }, - { - type: 'list', - name: 'path', - message: '请选择组件创建目录', - choices: getFolder('src/views'), - when: (answers) => { - return !answers.isGlobal - }, - }, - { - type: 'input', - name: 'name', - message: '请输入组件名称', - validate: (v) => { - if (!v || v.trim === '') { - return '组件名称不能为空' - } - else { - return true - } - }, - }, - ], - actions: (data) => { - let path = '' - if (data.isGlobal) { - path = 'src/components/{{properCase name}}/index.vue' - } - else { - path = `${data.path}/components/{{properCase name}}/index.vue` - } - const actions = [ - { - type: 'add', - path, - templateFile: 'plop-templates/component/index.hbs', - }, - ] - return actions - }, -} diff --git a/plop-templates/page/index.hbs b/plop-templates/page/index.hbs deleted file mode 100644 index acabfe3..0000000 --- a/plop-templates/page/index.hbs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/plop-templates/page/prompt.js b/plop-templates/page/prompt.js deleted file mode 100644 index 26c2d38..0000000 --- a/plop-templates/page/prompt.js +++ /dev/null @@ -1,54 +0,0 @@ -const path = require('path') -const fs = require('fs') - -function getFolder(path) { - const components = [] - const files = fs.readdirSync(path) - files.forEach((item) => { - const stat = fs.lstatSync(`${path}/${item}`) - if (stat.isDirectory() === true && item !== 'components') { - components.push(`${path}/${item}`) - components.push(...getFolder(`${path}/${item}`)) - } - }) - return components -} - -module.exports = { - description: '创建页面', - prompts: [ - { - type: 'list', - name: 'path', - message: '请选择页面创建目录', - choices: getFolder('src/views'), - }, - { - type: 'input', - name: 'name', - message: '请输入文件名', - validate: (v) => { - if (!v || v.trim === '') { - return '文件名不能为空' - } - else { - return true - } - }, - }, - ], - actions: (data) => { - const relativePath = path.relative('src/views', data.path) - const actions = [ - { - type: 'add', - path: `${data.path}/{{camelCase name}}.vue`, - templateFile: 'plop-templates/page/index.hbs', - data: { - componentName: `${relativePath} ${data.name}`, - }, - }, - ] - return actions - }, -} diff --git a/departments150.json b/departments150.json deleted file mode 100644 index aa6cc37..0000000 --- a/departments150.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "code": "200", - "msg": "操作成功", - "data": { - "childDepartments": [], - "employees": [{ - "id": "53128112", - "employeeName": "测试1", - "isLeave": "0", - "open": "false" - },{ - "id": "53128113", - "employeeName": "测试2", - "isLeave": "0", - "open": "false" - }], - "titleDepartments": [{ - "departmentId": "150", - "departmentKey": "RLXZB_V2", - "departmentName": "人力行政部", - "departmentNames": "人力行政部", - "id": "150", - "parentId": "0" - }] - } -} \ No newline at end of file diff --git a/plop-templates/component/index.hbs b/plop-templates/component/index.hbs deleted file mode 100644 index 162c0d3..0000000 --- a/plop-templates/component/index.hbs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/plop-templates/component/prompt.js b/plop-templates/component/prompt.js deleted file mode 100644 index 2b42bd2..0000000 --- a/plop-templates/component/prompt.js +++ /dev/null @@ -1,65 +0,0 @@ -const fs = require('fs') - -function getFolder(path) { - const components = [] - const files = fs.readdirSync(path) - files.forEach((item) => { - const stat = fs.lstatSync(`${path}/${item}`) - if (stat.isDirectory() === true && item !== 'components') { - components.push(`${path}/${item}`) - components.push(...getFolder(`${path}/${item}`)) - } - }) - return components -} - -module.exports = { - description: '创建组件', - prompts: [ - { - type: 'confirm', - name: 'isGlobal', - message: '是否为全局组件', - default: false, - }, - { - type: 'list', - name: 'path', - message: '请选择组件创建目录', - choices: getFolder('src/views'), - when: (answers) => { - return !answers.isGlobal - }, - }, - { - type: 'input', - name: 'name', - message: '请输入组件名称', - validate: (v) => { - if (!v || v.trim === '') { - return '组件名称不能为空' - } - else { - return true - } - }, - }, - ], - actions: (data) => { - let path = '' - if (data.isGlobal) { - path = 'src/components/{{properCase name}}/index.vue' - } - else { - path = `${data.path}/components/{{properCase name}}/index.vue` - } - const actions = [ - { - type: 'add', - path, - templateFile: 'plop-templates/component/index.hbs', - }, - ] - return actions - }, -} diff --git a/plop-templates/page/index.hbs b/plop-templates/page/index.hbs deleted file mode 100644 index acabfe3..0000000 --- a/plop-templates/page/index.hbs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/plop-templates/page/prompt.js b/plop-templates/page/prompt.js deleted file mode 100644 index 26c2d38..0000000 --- a/plop-templates/page/prompt.js +++ /dev/null @@ -1,54 +0,0 @@ -const path = require('path') -const fs = require('fs') - -function getFolder(path) { - const components = [] - const files = fs.readdirSync(path) - files.forEach((item) => { - const stat = fs.lstatSync(`${path}/${item}`) - if (stat.isDirectory() === true && item !== 'components') { - components.push(`${path}/${item}`) - components.push(...getFolder(`${path}/${item}`)) - } - }) - return components -} - -module.exports = { - description: '创建页面', - prompts: [ - { - type: 'list', - name: 'path', - message: '请选择页面创建目录', - choices: getFolder('src/views'), - }, - { - type: 'input', - name: 'name', - message: '请输入文件名', - validate: (v) => { - if (!v || v.trim === '') { - return '文件名不能为空' - } - else { - return true - } - }, - }, - ], - actions: (data) => { - const relativePath = path.relative('src/views', data.path) - const actions = [ - { - type: 'add', - path: `${data.path}/{{camelCase name}}.vue`, - templateFile: 'plop-templates/page/index.hbs', - data: { - componentName: `${relativePath} ${data.name}`, - }, - }, - ] - return actions - }, -} diff --git a/plop-templates/store/index.hbs b/plop-templates/store/index.hbs deleted file mode 100644 index b3336c5..0000000 --- a/plop-templates/store/index.hbs +++ /dev/null @@ -1,11 +0,0 @@ -const use{{ properCase name }}Store = defineStore( - // 唯一ID - '{{ camelCase name }}', - { - state: () => ({}), - getters: {}, - actions: {}, - }, -) - -export default use{{ properCase name }}Store diff --git a/departments150.json b/departments150.json deleted file mode 100644 index aa6cc37..0000000 --- a/departments150.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "code": "200", - "msg": "操作成功", - "data": { - "childDepartments": [], - "employees": [{ - "id": "53128112", - "employeeName": "测试1", - "isLeave": "0", - "open": "false" - },{ - "id": "53128113", - "employeeName": "测试2", - "isLeave": "0", - "open": "false" - }], - "titleDepartments": [{ - "departmentId": "150", - "departmentKey": "RLXZB_V2", - "departmentName": "人力行政部", - "departmentNames": "人力行政部", - "id": "150", - "parentId": "0" - }] - } -} \ No newline at end of file diff --git a/plop-templates/component/index.hbs b/plop-templates/component/index.hbs deleted file mode 100644 index 162c0d3..0000000 --- a/plop-templates/component/index.hbs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/plop-templates/component/prompt.js b/plop-templates/component/prompt.js deleted file mode 100644 index 2b42bd2..0000000 --- a/plop-templates/component/prompt.js +++ /dev/null @@ -1,65 +0,0 @@ -const fs = require('fs') - -function getFolder(path) { - const components = [] - const files = fs.readdirSync(path) - files.forEach((item) => { - const stat = fs.lstatSync(`${path}/${item}`) - if (stat.isDirectory() === true && item !== 'components') { - components.push(`${path}/${item}`) - components.push(...getFolder(`${path}/${item}`)) - } - }) - return components -} - -module.exports = { - description: '创建组件', - prompts: [ - { - type: 'confirm', - name: 'isGlobal', - message: '是否为全局组件', - default: false, - }, - { - type: 'list', - name: 'path', - message: '请选择组件创建目录', - choices: getFolder('src/views'), - when: (answers) => { - return !answers.isGlobal - }, - }, - { - type: 'input', - name: 'name', - message: '请输入组件名称', - validate: (v) => { - if (!v || v.trim === '') { - return '组件名称不能为空' - } - else { - return true - } - }, - }, - ], - actions: (data) => { - let path = '' - if (data.isGlobal) { - path = 'src/components/{{properCase name}}/index.vue' - } - else { - path = `${data.path}/components/{{properCase name}}/index.vue` - } - const actions = [ - { - type: 'add', - path, - templateFile: 'plop-templates/component/index.hbs', - }, - ] - return actions - }, -} diff --git a/plop-templates/page/index.hbs b/plop-templates/page/index.hbs deleted file mode 100644 index acabfe3..0000000 --- a/plop-templates/page/index.hbs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/plop-templates/page/prompt.js b/plop-templates/page/prompt.js deleted file mode 100644 index 26c2d38..0000000 --- a/plop-templates/page/prompt.js +++ /dev/null @@ -1,54 +0,0 @@ -const path = require('path') -const fs = require('fs') - -function getFolder(path) { - const components = [] - const files = fs.readdirSync(path) - files.forEach((item) => { - const stat = fs.lstatSync(`${path}/${item}`) - if (stat.isDirectory() === true && item !== 'components') { - components.push(`${path}/${item}`) - components.push(...getFolder(`${path}/${item}`)) - } - }) - return components -} - -module.exports = { - description: '创建页面', - prompts: [ - { - type: 'list', - name: 'path', - message: '请选择页面创建目录', - choices: getFolder('src/views'), - }, - { - type: 'input', - name: 'name', - message: '请输入文件名', - validate: (v) => { - if (!v || v.trim === '') { - return '文件名不能为空' - } - else { - return true - } - }, - }, - ], - actions: (data) => { - const relativePath = path.relative('src/views', data.path) - const actions = [ - { - type: 'add', - path: `${data.path}/{{camelCase name}}.vue`, - templateFile: 'plop-templates/page/index.hbs', - data: { - componentName: `${relativePath} ${data.name}`, - }, - }, - ] - return actions - }, -} diff --git a/plop-templates/store/index.hbs b/plop-templates/store/index.hbs deleted file mode 100644 index b3336c5..0000000 --- a/plop-templates/store/index.hbs +++ /dev/null @@ -1,11 +0,0 @@ -const use{{ properCase name }}Store = defineStore( - // 唯一ID - '{{ camelCase name }}', - { - state: () => ({}), - getters: {}, - actions: {}, - }, -) - -export default use{{ properCase name }}Store diff --git a/plop-templates/store/prompt.js b/plop-templates/store/prompt.js deleted file mode 100644 index 2cefa24..0000000 --- a/plop-templates/store/prompt.js +++ /dev/null @@ -1,28 +0,0 @@ -module.exports = { - description: '创建全局状态', - prompts: [ - { - type: 'input', - name: 'name', - message: '请输入模块名称', - validate: (v) => { - if (!v || v.trim === '') { - return '模块名称不能为空' - } - else { - return true - } - }, - }, - ], - actions: () => { - const actions = [ - { - type: 'add', - path: 'src/store/modules/{{camelCase name}}.ts', - templateFile: 'plop-templates/store/index.hbs', - }, - ] - return actions - }, -} diff --git a/departments150.json b/departments150.json deleted file mode 100644 index aa6cc37..0000000 --- a/departments150.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "code": "200", - "msg": "操作成功", - "data": { - "childDepartments": [], - "employees": [{ - "id": "53128112", - "employeeName": "测试1", - "isLeave": "0", - "open": "false" - },{ - "id": "53128113", - "employeeName": "测试2", - "isLeave": "0", - "open": "false" - }], - "titleDepartments": [{ - "departmentId": "150", - "departmentKey": "RLXZB_V2", - "departmentName": "人力行政部", - "departmentNames": "人力行政部", - "id": "150", - "parentId": "0" - }] - } -} \ No newline at end of file diff --git a/plop-templates/component/index.hbs b/plop-templates/component/index.hbs deleted file mode 100644 index 162c0d3..0000000 --- a/plop-templates/component/index.hbs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/plop-templates/component/prompt.js b/plop-templates/component/prompt.js deleted file mode 100644 index 2b42bd2..0000000 --- a/plop-templates/component/prompt.js +++ /dev/null @@ -1,65 +0,0 @@ -const fs = require('fs') - -function getFolder(path) { - const components = [] - const files = fs.readdirSync(path) - files.forEach((item) => { - const stat = fs.lstatSync(`${path}/${item}`) - if (stat.isDirectory() === true && item !== 'components') { - components.push(`${path}/${item}`) - components.push(...getFolder(`${path}/${item}`)) - } - }) - return components -} - -module.exports = { - description: '创建组件', - prompts: [ - { - type: 'confirm', - name: 'isGlobal', - message: '是否为全局组件', - default: false, - }, - { - type: 'list', - name: 'path', - message: '请选择组件创建目录', - choices: getFolder('src/views'), - when: (answers) => { - return !answers.isGlobal - }, - }, - { - type: 'input', - name: 'name', - message: '请输入组件名称', - validate: (v) => { - if (!v || v.trim === '') { - return '组件名称不能为空' - } - else { - return true - } - }, - }, - ], - actions: (data) => { - let path = '' - if (data.isGlobal) { - path = 'src/components/{{properCase name}}/index.vue' - } - else { - path = `${data.path}/components/{{properCase name}}/index.vue` - } - const actions = [ - { - type: 'add', - path, - templateFile: 'plop-templates/component/index.hbs', - }, - ] - return actions - }, -} diff --git a/plop-templates/page/index.hbs b/plop-templates/page/index.hbs deleted file mode 100644 index acabfe3..0000000 --- a/plop-templates/page/index.hbs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/plop-templates/page/prompt.js b/plop-templates/page/prompt.js deleted file mode 100644 index 26c2d38..0000000 --- a/plop-templates/page/prompt.js +++ /dev/null @@ -1,54 +0,0 @@ -const path = require('path') -const fs = require('fs') - -function getFolder(path) { - const components = [] - const files = fs.readdirSync(path) - files.forEach((item) => { - const stat = fs.lstatSync(`${path}/${item}`) - if (stat.isDirectory() === true && item !== 'components') { - components.push(`${path}/${item}`) - components.push(...getFolder(`${path}/${item}`)) - } - }) - return components -} - -module.exports = { - description: '创建页面', - prompts: [ - { - type: 'list', - name: 'path', - message: '请选择页面创建目录', - choices: getFolder('src/views'), - }, - { - type: 'input', - name: 'name', - message: '请输入文件名', - validate: (v) => { - if (!v || v.trim === '') { - return '文件名不能为空' - } - else { - return true - } - }, - }, - ], - actions: (data) => { - const relativePath = path.relative('src/views', data.path) - const actions = [ - { - type: 'add', - path: `${data.path}/{{camelCase name}}.vue`, - templateFile: 'plop-templates/page/index.hbs', - data: { - componentName: `${relativePath} ${data.name}`, - }, - }, - ] - return actions - }, -} diff --git a/plop-templates/store/index.hbs b/plop-templates/store/index.hbs deleted file mode 100644 index b3336c5..0000000 --- a/plop-templates/store/index.hbs +++ /dev/null @@ -1,11 +0,0 @@ -const use{{ properCase name }}Store = defineStore( - // 唯一ID - '{{ camelCase name }}', - { - state: () => ({}), - getters: {}, - actions: {}, - }, -) - -export default use{{ properCase name }}Store diff --git a/plop-templates/store/prompt.js b/plop-templates/store/prompt.js deleted file mode 100644 index 2cefa24..0000000 --- a/plop-templates/store/prompt.js +++ /dev/null @@ -1,28 +0,0 @@ -module.exports = { - description: '创建全局状态', - prompts: [ - { - type: 'input', - name: 'name', - message: '请输入模块名称', - validate: (v) => { - if (!v || v.trim === '') { - return '模块名称不能为空' - } - else { - return true - } - }, - }, - ], - actions: () => { - const actions = [ - { - type: 'add', - path: 'src/store/modules/{{camelCase name}}.ts', - templateFile: 'plop-templates/store/index.hbs', - }, - ] - return actions - }, -} diff --git a/src/api/api/index.ts b/src/api/api/index.ts index 325777a..4541b77 100644 --- a/src/api/api/index.ts +++ b/src/api/api/index.ts @@ -265,7 +265,7 @@ // 设备监测趋势分析 export function getDeviceDetailAnalysis(params: object) { return request({ - url: '/deviceCollectionLog/detailAnalysis', + url: '/deviceCollectionLog/detail-analysis', method: 'get', params, }) diff --git a/departments150.json b/departments150.json deleted file mode 100644 index aa6cc37..0000000 --- a/departments150.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "code": "200", - "msg": "操作成功", - "data": { - "childDepartments": [], - "employees": [{ - "id": "53128112", - "employeeName": "测试1", - "isLeave": "0", - "open": "false" - },{ - "id": "53128113", - "employeeName": "测试2", - "isLeave": "0", - "open": "false" - }], - "titleDepartments": [{ - "departmentId": "150", - "departmentKey": "RLXZB_V2", - "departmentName": "人力行政部", - "departmentNames": "人力行政部", - "id": "150", - "parentId": "0" - }] - } -} \ No newline at end of file diff --git a/plop-templates/component/index.hbs b/plop-templates/component/index.hbs deleted file mode 100644 index 162c0d3..0000000 --- a/plop-templates/component/index.hbs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/plop-templates/component/prompt.js b/plop-templates/component/prompt.js deleted file mode 100644 index 2b42bd2..0000000 --- a/plop-templates/component/prompt.js +++ /dev/null @@ -1,65 +0,0 @@ -const fs = require('fs') - -function getFolder(path) { - const components = [] - const files = fs.readdirSync(path) - files.forEach((item) => { - const stat = fs.lstatSync(`${path}/${item}`) - if (stat.isDirectory() === true && item !== 'components') { - components.push(`${path}/${item}`) - components.push(...getFolder(`${path}/${item}`)) - } - }) - return components -} - -module.exports = { - description: '创建组件', - prompts: [ - { - type: 'confirm', - name: 'isGlobal', - message: '是否为全局组件', - default: false, - }, - { - type: 'list', - name: 'path', - message: '请选择组件创建目录', - choices: getFolder('src/views'), - when: (answers) => { - return !answers.isGlobal - }, - }, - { - type: 'input', - name: 'name', - message: '请输入组件名称', - validate: (v) => { - if (!v || v.trim === '') { - return '组件名称不能为空' - } - else { - return true - } - }, - }, - ], - actions: (data) => { - let path = '' - if (data.isGlobal) { - path = 'src/components/{{properCase name}}/index.vue' - } - else { - path = `${data.path}/components/{{properCase name}}/index.vue` - } - const actions = [ - { - type: 'add', - path, - templateFile: 'plop-templates/component/index.hbs', - }, - ] - return actions - }, -} diff --git a/plop-templates/page/index.hbs b/plop-templates/page/index.hbs deleted file mode 100644 index acabfe3..0000000 --- a/plop-templates/page/index.hbs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/plop-templates/page/prompt.js b/plop-templates/page/prompt.js deleted file mode 100644 index 26c2d38..0000000 --- a/plop-templates/page/prompt.js +++ /dev/null @@ -1,54 +0,0 @@ -const path = require('path') -const fs = require('fs') - -function getFolder(path) { - const components = [] - const files = fs.readdirSync(path) - files.forEach((item) => { - const stat = fs.lstatSync(`${path}/${item}`) - if (stat.isDirectory() === true && item !== 'components') { - components.push(`${path}/${item}`) - components.push(...getFolder(`${path}/${item}`)) - } - }) - return components -} - -module.exports = { - description: '创建页面', - prompts: [ - { - type: 'list', - name: 'path', - message: '请选择页面创建目录', - choices: getFolder('src/views'), - }, - { - type: 'input', - name: 'name', - message: '请输入文件名', - validate: (v) => { - if (!v || v.trim === '') { - return '文件名不能为空' - } - else { - return true - } - }, - }, - ], - actions: (data) => { - const relativePath = path.relative('src/views', data.path) - const actions = [ - { - type: 'add', - path: `${data.path}/{{camelCase name}}.vue`, - templateFile: 'plop-templates/page/index.hbs', - data: { - componentName: `${relativePath} ${data.name}`, - }, - }, - ] - return actions - }, -} diff --git a/plop-templates/store/index.hbs b/plop-templates/store/index.hbs deleted file mode 100644 index b3336c5..0000000 --- a/plop-templates/store/index.hbs +++ /dev/null @@ -1,11 +0,0 @@ -const use{{ properCase name }}Store = defineStore( - // 唯一ID - '{{ camelCase name }}', - { - state: () => ({}), - getters: {}, - actions: {}, - }, -) - -export default use{{ properCase name }}Store diff --git a/plop-templates/store/prompt.js b/plop-templates/store/prompt.js deleted file mode 100644 index 2cefa24..0000000 --- a/plop-templates/store/prompt.js +++ /dev/null @@ -1,28 +0,0 @@ -module.exports = { - description: '创建全局状态', - prompts: [ - { - type: 'input', - name: 'name', - message: '请输入模块名称', - validate: (v) => { - if (!v || v.trim === '') { - return '模块名称不能为空' - } - else { - return true - } - }, - }, - ], - actions: () => { - const actions = [ - { - type: 'add', - path: 'src/store/modules/{{camelCase name}}.ts', - templateFile: 'plop-templates/store/index.hbs', - }, - ] - return actions - }, -} diff --git a/src/api/api/index.ts b/src/api/api/index.ts index 325777a..4541b77 100644 --- a/src/api/api/index.ts +++ b/src/api/api/index.ts @@ -265,7 +265,7 @@ // 设备监测趋势分析 export function getDeviceDetailAnalysis(params: object) { return request({ - url: '/deviceCollectionLog/detailAnalysis', + url: '/deviceCollectionLog/detail-analysis', method: 'get', params, }) diff --git a/src/components.d.ts b/src/components.d.ts index 419ee11..a1b0897 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -7,13 +7,10 @@ declare module '@vue/runtime-core' { export interface GlobalComponents { - AddNode: typeof import('./components/workFlow/addNode.vue')['default'] - AddNodeBan: typeof import('./components/workFlow/addNodeBan.vue')['default'] AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default'] AppContainer: typeof import('./components/AppContainer/index.vue')['default'] ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default'] ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default'] - ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default'] Auth: typeof import('./components/Auth/index.vue')['default'] AuthAll: typeof import('./components/AuthAll/index.vue')['default'] BarChartHorizontal: typeof import('./components/Echart/BarChartHorizontal.vue')['default'] @@ -23,10 +20,6 @@ BatchActionBar: typeof import('./components/BatchActionBar/index.vue')['default'] BenchCol: typeof import('./components/benchCol/index.vue')['default'] ButtonBox: typeof import('./components/buttonBox/buttonBox.vue')['default'] - CertificationMonitor: typeof import('./components/Sample/certificationMonitor.vue')['default'] - CertificationRecords: typeof import('./components/Sample/certificationRecords.vue')['default'] - ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default'] - CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default'] @@ -44,19 +37,14 @@ InfoWindow2: typeof import('./components/map/infoWindow2.vue')['default'] LineChart: typeof import('./components/Echart/LineChart.vue')['default'] Map: typeof import('./components/map/index.vue')['default'] - MeasureRecords: typeof import('./components/Sample/measureRecords.vue')['default'] - NodeWrap: typeof import('./components/workFlow/nodeWrap.vue')['default'] - NodeWrapBan: typeof import('./components/workFlow/nodeWrapBan.vue')['default'] NormalTable: typeof import('./components/NormalTable/index.vue')['default'] PageHeader: typeof import('./components/PageHeader/index.vue')['default'] PageMain: typeof import('./components/PageMain/index.vue')['default'] PcasCascader: typeof import('./components/PcasCascader/index.vue')['default'] PieChart: typeof import('./components/Echart/PieChart.vue')['default'] - PromoterDrawer: typeof import('./components/drawer/promoterDrawer.vue')['default'] QrDialog: typeof import('./components/QrDialog/index.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] - ScanSampleDialog: typeof import('./components/ScanSampleDialog/index.vue')['default'] SearchArea: typeof import('./components/SearchArea/index.vue')['default'] SearchBar: typeof import('./components/SearchBar/index.vue')['default'] SearchItem: typeof import('./components/SearchArea/SearchItem.vue')['default'] diff --git a/departments150.json b/departments150.json deleted file mode 100644 index aa6cc37..0000000 --- a/departments150.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "code": "200", - "msg": "操作成功", - "data": { - "childDepartments": [], - "employees": [{ - "id": "53128112", - "employeeName": "测试1", - "isLeave": "0", - "open": "false" - },{ - "id": "53128113", - "employeeName": "测试2", - "isLeave": "0", - "open": "false" - }], - "titleDepartments": [{ - "departmentId": "150", - "departmentKey": "RLXZB_V2", - "departmentName": "人力行政部", - "departmentNames": "人力行政部", - "id": "150", - "parentId": "0" - }] - } -} \ No newline at end of file diff --git a/plop-templates/component/index.hbs b/plop-templates/component/index.hbs deleted file mode 100644 index 162c0d3..0000000 --- a/plop-templates/component/index.hbs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/plop-templates/component/prompt.js b/plop-templates/component/prompt.js deleted file mode 100644 index 2b42bd2..0000000 --- a/plop-templates/component/prompt.js +++ /dev/null @@ -1,65 +0,0 @@ -const fs = require('fs') - -function getFolder(path) { - const components = [] - const files = fs.readdirSync(path) - files.forEach((item) => { - const stat = fs.lstatSync(`${path}/${item}`) - if (stat.isDirectory() === true && item !== 'components') { - components.push(`${path}/${item}`) - components.push(...getFolder(`${path}/${item}`)) - } - }) - return components -} - -module.exports = { - description: '创建组件', - prompts: [ - { - type: 'confirm', - name: 'isGlobal', - message: '是否为全局组件', - default: false, - }, - { - type: 'list', - name: 'path', - message: '请选择组件创建目录', - choices: getFolder('src/views'), - when: (answers) => { - return !answers.isGlobal - }, - }, - { - type: 'input', - name: 'name', - message: '请输入组件名称', - validate: (v) => { - if (!v || v.trim === '') { - return '组件名称不能为空' - } - else { - return true - } - }, - }, - ], - actions: (data) => { - let path = '' - if (data.isGlobal) { - path = 'src/components/{{properCase name}}/index.vue' - } - else { - path = `${data.path}/components/{{properCase name}}/index.vue` - } - const actions = [ - { - type: 'add', - path, - templateFile: 'plop-templates/component/index.hbs', - }, - ] - return actions - }, -} diff --git a/plop-templates/page/index.hbs b/plop-templates/page/index.hbs deleted file mode 100644 index acabfe3..0000000 --- a/plop-templates/page/index.hbs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/plop-templates/page/prompt.js b/plop-templates/page/prompt.js deleted file mode 100644 index 26c2d38..0000000 --- a/plop-templates/page/prompt.js +++ /dev/null @@ -1,54 +0,0 @@ -const path = require('path') -const fs = require('fs') - -function getFolder(path) { - const components = [] - const files = fs.readdirSync(path) - files.forEach((item) => { - const stat = fs.lstatSync(`${path}/${item}`) - if (stat.isDirectory() === true && item !== 'components') { - components.push(`${path}/${item}`) - components.push(...getFolder(`${path}/${item}`)) - } - }) - return components -} - -module.exports = { - description: '创建页面', - prompts: [ - { - type: 'list', - name: 'path', - message: '请选择页面创建目录', - choices: getFolder('src/views'), - }, - { - type: 'input', - name: 'name', - message: '请输入文件名', - validate: (v) => { - if (!v || v.trim === '') { - return '文件名不能为空' - } - else { - return true - } - }, - }, - ], - actions: (data) => { - const relativePath = path.relative('src/views', data.path) - const actions = [ - { - type: 'add', - path: `${data.path}/{{camelCase name}}.vue`, - templateFile: 'plop-templates/page/index.hbs', - data: { - componentName: `${relativePath} ${data.name}`, - }, - }, - ] - return actions - }, -} diff --git a/plop-templates/store/index.hbs b/plop-templates/store/index.hbs deleted file mode 100644 index b3336c5..0000000 --- a/plop-templates/store/index.hbs +++ /dev/null @@ -1,11 +0,0 @@ -const use{{ properCase name }}Store = defineStore( - // 唯一ID - '{{ camelCase name }}', - { - state: () => ({}), - getters: {}, - actions: {}, - }, -) - -export default use{{ properCase name }}Store diff --git a/plop-templates/store/prompt.js b/plop-templates/store/prompt.js deleted file mode 100644 index 2cefa24..0000000 --- a/plop-templates/store/prompt.js +++ /dev/null @@ -1,28 +0,0 @@ -module.exports = { - description: '创建全局状态', - prompts: [ - { - type: 'input', - name: 'name', - message: '请输入模块名称', - validate: (v) => { - if (!v || v.trim === '') { - return '模块名称不能为空' - } - else { - return true - } - }, - }, - ], - actions: () => { - const actions = [ - { - type: 'add', - path: 'src/store/modules/{{camelCase name}}.ts', - templateFile: 'plop-templates/store/index.hbs', - }, - ] - return actions - }, -} diff --git a/src/api/api/index.ts b/src/api/api/index.ts index 325777a..4541b77 100644 --- a/src/api/api/index.ts +++ b/src/api/api/index.ts @@ -265,7 +265,7 @@ // 设备监测趋势分析 export function getDeviceDetailAnalysis(params: object) { return request({ - url: '/deviceCollectionLog/detailAnalysis', + url: '/deviceCollectionLog/detail-analysis', method: 'get', params, }) diff --git a/src/components.d.ts b/src/components.d.ts index 419ee11..a1b0897 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -7,13 +7,10 @@ declare module '@vue/runtime-core' { export interface GlobalComponents { - AddNode: typeof import('./components/workFlow/addNode.vue')['default'] - AddNodeBan: typeof import('./components/workFlow/addNodeBan.vue')['default'] AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default'] AppContainer: typeof import('./components/AppContainer/index.vue')['default'] ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default'] ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default'] - ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default'] Auth: typeof import('./components/Auth/index.vue')['default'] AuthAll: typeof import('./components/AuthAll/index.vue')['default'] BarChartHorizontal: typeof import('./components/Echart/BarChartHorizontal.vue')['default'] @@ -23,10 +20,6 @@ BatchActionBar: typeof import('./components/BatchActionBar/index.vue')['default'] BenchCol: typeof import('./components/benchCol/index.vue')['default'] ButtonBox: typeof import('./components/buttonBox/buttonBox.vue')['default'] - CertificationMonitor: typeof import('./components/Sample/certificationMonitor.vue')['default'] - CertificationRecords: typeof import('./components/Sample/certificationRecords.vue')['default'] - ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default'] - CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default'] @@ -44,19 +37,14 @@ InfoWindow2: typeof import('./components/map/infoWindow2.vue')['default'] LineChart: typeof import('./components/Echart/LineChart.vue')['default'] Map: typeof import('./components/map/index.vue')['default'] - MeasureRecords: typeof import('./components/Sample/measureRecords.vue')['default'] - NodeWrap: typeof import('./components/workFlow/nodeWrap.vue')['default'] - NodeWrapBan: typeof import('./components/workFlow/nodeWrapBan.vue')['default'] NormalTable: typeof import('./components/NormalTable/index.vue')['default'] PageHeader: typeof import('./components/PageHeader/index.vue')['default'] PageMain: typeof import('./components/PageMain/index.vue')['default'] PcasCascader: typeof import('./components/PcasCascader/index.vue')['default'] PieChart: typeof import('./components/Echart/PieChart.vue')['default'] - PromoterDrawer: typeof import('./components/drawer/promoterDrawer.vue')['default'] QrDialog: typeof import('./components/QrDialog/index.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] - ScanSampleDialog: typeof import('./components/ScanSampleDialog/index.vue')['default'] SearchArea: typeof import('./components/SearchArea/index.vue')['default'] SearchBar: typeof import('./components/SearchBar/index.vue')['default'] SearchItem: typeof import('./components/SearchArea/SearchItem.vue')['default'] diff --git a/src/components/Echart/LineChart.vue b/src/components/Echart/LineChart.vue index 841e0cb..fefb873 100644 --- a/src/components/Echart/LineChart.vue +++ b/src/components/Echart/LineChart.vue @@ -45,14 +45,14 @@ default: () => { return { show: true, - icon: 'circle', - orient: 'vertile', // 图例方向 - align: 'left', // 图例标记和文本的对齐,默认自动 - top: 5, - right: 20, - itemWidth: 12, - itemHeight: 12, - padding: [0, 0, 0, 120], + // icon: 'circle', + orient: 'horizontal', // 图例方向 + // align: 'left', // 图例标记和文本的对齐,默认自动 + // top: 5, + // right: 20, + // itemWidth: 12, + // itemHeight: 12, + // padding: [0, 0, 0, 120], } }, }, @@ -151,7 +151,7 @@ */ gradient: { type: Boolean, - default: true, + default: false, }, /** * y轴最大值 @@ -172,7 +172,7 @@ */ smooth: { type: Boolean, - default: true, + default: false, }, }) @@ -192,9 +192,21 @@ ) // 构建option function buildOption() { - const option: lineOption = { + const option: any = { grid: props.grid, legend: props.legend, // 图例 + toolbox: { + show: true, + feature: { + dataZoom: { + yAxisIndex: 'none', + }, + dataView: { readOnly: false }, + magicType: { type: ['line', 'bar'] }, + restore: {}, + saveAsImage: {}, + }, + }, tooltip: { trigger: 'axis', textStyle: { @@ -213,7 +225,7 @@ xAxis: [ { type: props.xAxisType, - boundaryGap: true, + boundaryGap: false, axisLine: { lineStyle: { color: props.axisLineColor, // 轴线的颜色 @@ -223,20 +235,20 @@ color: props.fontColor, // X轴名称颜色 fontSize: 14, }, - splitLine: { - show: false, - lineStyle: { - color: ['#7a6b74'], - type: props.axisLineType, - }, - }, + // splitLine: { + // show: false, + // lineStyle: { + // color: ['#7a6b74'], + // type: props.axisLineType, + // }, + // }, }, ], yAxis: [ { name: props.unit, type: 'value', - boundaryGap: true, + // boundaryGap: true, axisLine: { show: false, lineStyle: { @@ -252,7 +264,7 @@ show: true, lineStyle: { color: ['#bfbfbf'], - type: 'dashed', + type: 'solid', }, }, }, @@ -285,15 +297,24 @@ // 遍历data, 拆分轴线名称,数据和颜色 for (const itemIndex in props.data) { const item = props.data[itemIndex] - const series: lineSeriesOption = { + const series: any = { name: item.name, // 线系列名 type: 'line', - symbol: 'none', // 去掉折线节点 + // symbol: 'none', // 去掉折线节点 smooth: props.smooth, // 曲线平滑设置 lineStyle: { width: 2, }, data: item.data, + markPoint: { + data: [ + { type: 'max', name: 'Max' }, + { type: 'min', name: 'Min' }, + ], + }, + markLine: { + data: [{ type: 'average', name: 'Avg' }], + }, } // 线段颜色 if (item.color || props.colors.length > 0) { @@ -341,7 +362,6 @@ chart.resize() } } - window.addEventListener('resize', () => { chart.resize() }) @@ -352,7 +372,11 @@ diff --git a/plop-templates/component/prompt.js b/plop-templates/component/prompt.js deleted file mode 100644 index 2b42bd2..0000000 --- a/plop-templates/component/prompt.js +++ /dev/null @@ -1,65 +0,0 @@ -const fs = require('fs') - -function getFolder(path) { - const components = [] - const files = fs.readdirSync(path) - files.forEach((item) => { - const stat = fs.lstatSync(`${path}/${item}`) - if (stat.isDirectory() === true && item !== 'components') { - components.push(`${path}/${item}`) - components.push(...getFolder(`${path}/${item}`)) - } - }) - return components -} - -module.exports = { - description: '创建组件', - prompts: [ - { - type: 'confirm', - name: 'isGlobal', - message: '是否为全局组件', - default: false, - }, - { - type: 'list', - name: 'path', - message: '请选择组件创建目录', - choices: getFolder('src/views'), - when: (answers) => { - return !answers.isGlobal - }, - }, - { - type: 'input', - name: 'name', - message: '请输入组件名称', - validate: (v) => { - if (!v || v.trim === '') { - return '组件名称不能为空' - } - else { - return true - } - }, - }, - ], - actions: (data) => { - let path = '' - if (data.isGlobal) { - path = 'src/components/{{properCase name}}/index.vue' - } - else { - path = `${data.path}/components/{{properCase name}}/index.vue` - } - const actions = [ - { - type: 'add', - path, - templateFile: 'plop-templates/component/index.hbs', - }, - ] - return actions - }, -} diff --git a/plop-templates/page/index.hbs b/plop-templates/page/index.hbs deleted file mode 100644 index acabfe3..0000000 --- a/plop-templates/page/index.hbs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/plop-templates/page/prompt.js b/plop-templates/page/prompt.js deleted file mode 100644 index 26c2d38..0000000 --- a/plop-templates/page/prompt.js +++ /dev/null @@ -1,54 +0,0 @@ -const path = require('path') -const fs = require('fs') - -function getFolder(path) { - const components = [] - const files = fs.readdirSync(path) - files.forEach((item) => { - const stat = fs.lstatSync(`${path}/${item}`) - if (stat.isDirectory() === true && item !== 'components') { - components.push(`${path}/${item}`) - components.push(...getFolder(`${path}/${item}`)) - } - }) - return components -} - -module.exports = { - description: '创建页面', - prompts: [ - { - type: 'list', - name: 'path', - message: '请选择页面创建目录', - choices: getFolder('src/views'), - }, - { - type: 'input', - name: 'name', - message: '请输入文件名', - validate: (v) => { - if (!v || v.trim === '') { - return '文件名不能为空' - } - else { - return true - } - }, - }, - ], - actions: (data) => { - const relativePath = path.relative('src/views', data.path) - const actions = [ - { - type: 'add', - path: `${data.path}/{{camelCase name}}.vue`, - templateFile: 'plop-templates/page/index.hbs', - data: { - componentName: `${relativePath} ${data.name}`, - }, - }, - ] - return actions - }, -} diff --git a/plop-templates/store/index.hbs b/plop-templates/store/index.hbs deleted file mode 100644 index b3336c5..0000000 --- a/plop-templates/store/index.hbs +++ /dev/null @@ -1,11 +0,0 @@ -const use{{ properCase name }}Store = defineStore( - // 唯一ID - '{{ camelCase name }}', - { - state: () => ({}), - getters: {}, - actions: {}, - }, -) - -export default use{{ properCase name }}Store diff --git a/plop-templates/store/prompt.js b/plop-templates/store/prompt.js deleted file mode 100644 index 2cefa24..0000000 --- a/plop-templates/store/prompt.js +++ /dev/null @@ -1,28 +0,0 @@ -module.exports = { - description: '创建全局状态', - prompts: [ - { - type: 'input', - name: 'name', - message: '请输入模块名称', - validate: (v) => { - if (!v || v.trim === '') { - return '模块名称不能为空' - } - else { - return true - } - }, - }, - ], - actions: () => { - const actions = [ - { - type: 'add', - path: 'src/store/modules/{{camelCase name}}.ts', - templateFile: 'plop-templates/store/index.hbs', - }, - ] - return actions - }, -} diff --git a/src/api/api/index.ts b/src/api/api/index.ts index 325777a..4541b77 100644 --- a/src/api/api/index.ts +++ b/src/api/api/index.ts @@ -265,7 +265,7 @@ // 设备监测趋势分析 export function getDeviceDetailAnalysis(params: object) { return request({ - url: '/deviceCollectionLog/detailAnalysis', + url: '/deviceCollectionLog/detail-analysis', method: 'get', params, }) diff --git a/src/components.d.ts b/src/components.d.ts index 419ee11..a1b0897 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -7,13 +7,10 @@ declare module '@vue/runtime-core' { export interface GlobalComponents { - AddNode: typeof import('./components/workFlow/addNode.vue')['default'] - AddNodeBan: typeof import('./components/workFlow/addNodeBan.vue')['default'] AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default'] AppContainer: typeof import('./components/AppContainer/index.vue')['default'] ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default'] ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default'] - ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default'] Auth: typeof import('./components/Auth/index.vue')['default'] AuthAll: typeof import('./components/AuthAll/index.vue')['default'] BarChartHorizontal: typeof import('./components/Echart/BarChartHorizontal.vue')['default'] @@ -23,10 +20,6 @@ BatchActionBar: typeof import('./components/BatchActionBar/index.vue')['default'] BenchCol: typeof import('./components/benchCol/index.vue')['default'] ButtonBox: typeof import('./components/buttonBox/buttonBox.vue')['default'] - CertificationMonitor: typeof import('./components/Sample/certificationMonitor.vue')['default'] - CertificationRecords: typeof import('./components/Sample/certificationRecords.vue')['default'] - ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default'] - CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default'] @@ -44,19 +37,14 @@ InfoWindow2: typeof import('./components/map/infoWindow2.vue')['default'] LineChart: typeof import('./components/Echart/LineChart.vue')['default'] Map: typeof import('./components/map/index.vue')['default'] - MeasureRecords: typeof import('./components/Sample/measureRecords.vue')['default'] - NodeWrap: typeof import('./components/workFlow/nodeWrap.vue')['default'] - NodeWrapBan: typeof import('./components/workFlow/nodeWrapBan.vue')['default'] NormalTable: typeof import('./components/NormalTable/index.vue')['default'] PageHeader: typeof import('./components/PageHeader/index.vue')['default'] PageMain: typeof import('./components/PageMain/index.vue')['default'] PcasCascader: typeof import('./components/PcasCascader/index.vue')['default'] PieChart: typeof import('./components/Echart/PieChart.vue')['default'] - PromoterDrawer: typeof import('./components/drawer/promoterDrawer.vue')['default'] QrDialog: typeof import('./components/QrDialog/index.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] - ScanSampleDialog: typeof import('./components/ScanSampleDialog/index.vue')['default'] SearchArea: typeof import('./components/SearchArea/index.vue')['default'] SearchBar: typeof import('./components/SearchBar/index.vue')['default'] SearchItem: typeof import('./components/SearchArea/SearchItem.vue')['default'] diff --git a/src/components/Echart/LineChart.vue b/src/components/Echart/LineChart.vue index 841e0cb..fefb873 100644 --- a/src/components/Echart/LineChart.vue +++ b/src/components/Echart/LineChart.vue @@ -45,14 +45,14 @@ default: () => { return { show: true, - icon: 'circle', - orient: 'vertile', // 图例方向 - align: 'left', // 图例标记和文本的对齐,默认自动 - top: 5, - right: 20, - itemWidth: 12, - itemHeight: 12, - padding: [0, 0, 0, 120], + // icon: 'circle', + orient: 'horizontal', // 图例方向 + // align: 'left', // 图例标记和文本的对齐,默认自动 + // top: 5, + // right: 20, + // itemWidth: 12, + // itemHeight: 12, + // padding: [0, 0, 0, 120], } }, }, @@ -151,7 +151,7 @@ */ gradient: { type: Boolean, - default: true, + default: false, }, /** * y轴最大值 @@ -172,7 +172,7 @@ */ smooth: { type: Boolean, - default: true, + default: false, }, }) @@ -192,9 +192,21 @@ ) // 构建option function buildOption() { - const option: lineOption = { + const option: any = { grid: props.grid, legend: props.legend, // 图例 + toolbox: { + show: true, + feature: { + dataZoom: { + yAxisIndex: 'none', + }, + dataView: { readOnly: false }, + magicType: { type: ['line', 'bar'] }, + restore: {}, + saveAsImage: {}, + }, + }, tooltip: { trigger: 'axis', textStyle: { @@ -213,7 +225,7 @@ xAxis: [ { type: props.xAxisType, - boundaryGap: true, + boundaryGap: false, axisLine: { lineStyle: { color: props.axisLineColor, // 轴线的颜色 @@ -223,20 +235,20 @@ color: props.fontColor, // X轴名称颜色 fontSize: 14, }, - splitLine: { - show: false, - lineStyle: { - color: ['#7a6b74'], - type: props.axisLineType, - }, - }, + // splitLine: { + // show: false, + // lineStyle: { + // color: ['#7a6b74'], + // type: props.axisLineType, + // }, + // }, }, ], yAxis: [ { name: props.unit, type: 'value', - boundaryGap: true, + // boundaryGap: true, axisLine: { show: false, lineStyle: { @@ -252,7 +264,7 @@ show: true, lineStyle: { color: ['#bfbfbf'], - type: 'dashed', + type: 'solid', }, }, }, @@ -285,15 +297,24 @@ // 遍历data, 拆分轴线名称,数据和颜色 for (const itemIndex in props.data) { const item = props.data[itemIndex] - const series: lineSeriesOption = { + const series: any = { name: item.name, // 线系列名 type: 'line', - symbol: 'none', // 去掉折线节点 + // symbol: 'none', // 去掉折线节点 smooth: props.smooth, // 曲线平滑设置 lineStyle: { width: 2, }, data: item.data, + markPoint: { + data: [ + { type: 'max', name: 'Max' }, + { type: 'min', name: 'Min' }, + ], + }, + markLine: { + data: [{ type: 'average', name: 'Avg' }], + }, } // 线段颜色 if (item.color || props.colors.length > 0) { @@ -341,7 +362,6 @@ chart.resize() } } - window.addEventListener('resize', () => { chart.resize() }) @@ -352,7 +372,11 @@ diff --git a/plop-templates/component/prompt.js b/plop-templates/component/prompt.js deleted file mode 100644 index 2b42bd2..0000000 --- a/plop-templates/component/prompt.js +++ /dev/null @@ -1,65 +0,0 @@ -const fs = require('fs') - -function getFolder(path) { - const components = [] - const files = fs.readdirSync(path) - files.forEach((item) => { - const stat = fs.lstatSync(`${path}/${item}`) - if (stat.isDirectory() === true && item !== 'components') { - components.push(`${path}/${item}`) - components.push(...getFolder(`${path}/${item}`)) - } - }) - return components -} - -module.exports = { - description: '创建组件', - prompts: [ - { - type: 'confirm', - name: 'isGlobal', - message: '是否为全局组件', - default: false, - }, - { - type: 'list', - name: 'path', - message: '请选择组件创建目录', - choices: getFolder('src/views'), - when: (answers) => { - return !answers.isGlobal - }, - }, - { - type: 'input', - name: 'name', - message: '请输入组件名称', - validate: (v) => { - if (!v || v.trim === '') { - return '组件名称不能为空' - } - else { - return true - } - }, - }, - ], - actions: (data) => { - let path = '' - if (data.isGlobal) { - path = 'src/components/{{properCase name}}/index.vue' - } - else { - path = `${data.path}/components/{{properCase name}}/index.vue` - } - const actions = [ - { - type: 'add', - path, - templateFile: 'plop-templates/component/index.hbs', - }, - ] - return actions - }, -} diff --git a/plop-templates/page/index.hbs b/plop-templates/page/index.hbs deleted file mode 100644 index acabfe3..0000000 --- a/plop-templates/page/index.hbs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/plop-templates/page/prompt.js b/plop-templates/page/prompt.js deleted file mode 100644 index 26c2d38..0000000 --- a/plop-templates/page/prompt.js +++ /dev/null @@ -1,54 +0,0 @@ -const path = require('path') -const fs = require('fs') - -function getFolder(path) { - const components = [] - const files = fs.readdirSync(path) - files.forEach((item) => { - const stat = fs.lstatSync(`${path}/${item}`) - if (stat.isDirectory() === true && item !== 'components') { - components.push(`${path}/${item}`) - components.push(...getFolder(`${path}/${item}`)) - } - }) - return components -} - -module.exports = { - description: '创建页面', - prompts: [ - { - type: 'list', - name: 'path', - message: '请选择页面创建目录', - choices: getFolder('src/views'), - }, - { - type: 'input', - name: 'name', - message: '请输入文件名', - validate: (v) => { - if (!v || v.trim === '') { - return '文件名不能为空' - } - else { - return true - } - }, - }, - ], - actions: (data) => { - const relativePath = path.relative('src/views', data.path) - const actions = [ - { - type: 'add', - path: `${data.path}/{{camelCase name}}.vue`, - templateFile: 'plop-templates/page/index.hbs', - data: { - componentName: `${relativePath} ${data.name}`, - }, - }, - ] - return actions - }, -} diff --git a/plop-templates/store/index.hbs b/plop-templates/store/index.hbs deleted file mode 100644 index b3336c5..0000000 --- a/plop-templates/store/index.hbs +++ /dev/null @@ -1,11 +0,0 @@ -const use{{ properCase name }}Store = defineStore( - // 唯一ID - '{{ camelCase name }}', - { - state: () => ({}), - getters: {}, - actions: {}, - }, -) - -export default use{{ properCase name }}Store diff --git a/plop-templates/store/prompt.js b/plop-templates/store/prompt.js deleted file mode 100644 index 2cefa24..0000000 --- a/plop-templates/store/prompt.js +++ /dev/null @@ -1,28 +0,0 @@ -module.exports = { - description: '创建全局状态', - prompts: [ - { - type: 'input', - name: 'name', - message: '请输入模块名称', - validate: (v) => { - if (!v || v.trim === '') { - return '模块名称不能为空' - } - else { - return true - } - }, - }, - ], - actions: () => { - const actions = [ - { - type: 'add', - path: 'src/store/modules/{{camelCase name}}.ts', - templateFile: 'plop-templates/store/index.hbs', - }, - ] - return actions - }, -} diff --git a/src/api/api/index.ts b/src/api/api/index.ts index 325777a..4541b77 100644 --- a/src/api/api/index.ts +++ b/src/api/api/index.ts @@ -265,7 +265,7 @@ // 设备监测趋势分析 export function getDeviceDetailAnalysis(params: object) { return request({ - url: '/deviceCollectionLog/detailAnalysis', + url: '/deviceCollectionLog/detail-analysis', method: 'get', params, }) diff --git a/src/components.d.ts b/src/components.d.ts index 419ee11..a1b0897 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -7,13 +7,10 @@ declare module '@vue/runtime-core' { export interface GlobalComponents { - AddNode: typeof import('./components/workFlow/addNode.vue')['default'] - AddNodeBan: typeof import('./components/workFlow/addNodeBan.vue')['default'] AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default'] AppContainer: typeof import('./components/AppContainer/index.vue')['default'] ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default'] ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default'] - ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default'] Auth: typeof import('./components/Auth/index.vue')['default'] AuthAll: typeof import('./components/AuthAll/index.vue')['default'] BarChartHorizontal: typeof import('./components/Echart/BarChartHorizontal.vue')['default'] @@ -23,10 +20,6 @@ BatchActionBar: typeof import('./components/BatchActionBar/index.vue')['default'] BenchCol: typeof import('./components/benchCol/index.vue')['default'] ButtonBox: typeof import('./components/buttonBox/buttonBox.vue')['default'] - CertificationMonitor: typeof import('./components/Sample/certificationMonitor.vue')['default'] - CertificationRecords: typeof import('./components/Sample/certificationRecords.vue')['default'] - ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default'] - CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default'] @@ -44,19 +37,14 @@ InfoWindow2: typeof import('./components/map/infoWindow2.vue')['default'] LineChart: typeof import('./components/Echart/LineChart.vue')['default'] Map: typeof import('./components/map/index.vue')['default'] - MeasureRecords: typeof import('./components/Sample/measureRecords.vue')['default'] - NodeWrap: typeof import('./components/workFlow/nodeWrap.vue')['default'] - NodeWrapBan: typeof import('./components/workFlow/nodeWrapBan.vue')['default'] NormalTable: typeof import('./components/NormalTable/index.vue')['default'] PageHeader: typeof import('./components/PageHeader/index.vue')['default'] PageMain: typeof import('./components/PageMain/index.vue')['default'] PcasCascader: typeof import('./components/PcasCascader/index.vue')['default'] PieChart: typeof import('./components/Echart/PieChart.vue')['default'] - PromoterDrawer: typeof import('./components/drawer/promoterDrawer.vue')['default'] QrDialog: typeof import('./components/QrDialog/index.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] - ScanSampleDialog: typeof import('./components/ScanSampleDialog/index.vue')['default'] SearchArea: typeof import('./components/SearchArea/index.vue')['default'] SearchBar: typeof import('./components/SearchBar/index.vue')['default'] SearchItem: typeof import('./components/SearchArea/SearchItem.vue')['default'] diff --git a/src/components/Echart/LineChart.vue b/src/components/Echart/LineChart.vue index 841e0cb..fefb873 100644 --- a/src/components/Echart/LineChart.vue +++ b/src/components/Echart/LineChart.vue @@ -45,14 +45,14 @@ default: () => { return { show: true, - icon: 'circle', - orient: 'vertile', // 图例方向 - align: 'left', // 图例标记和文本的对齐,默认自动 - top: 5, - right: 20, - itemWidth: 12, - itemHeight: 12, - padding: [0, 0, 0, 120], + // icon: 'circle', + orient: 'horizontal', // 图例方向 + // align: 'left', // 图例标记和文本的对齐,默认自动 + // top: 5, + // right: 20, + // itemWidth: 12, + // itemHeight: 12, + // padding: [0, 0, 0, 120], } }, }, @@ -151,7 +151,7 @@ */ gradient: { type: Boolean, - default: true, + default: false, }, /** * y轴最大值 @@ -172,7 +172,7 @@ */ smooth: { type: Boolean, - default: true, + default: false, }, }) @@ -192,9 +192,21 @@ ) // 构建option function buildOption() { - const option: lineOption = { + const option: any = { grid: props.grid, legend: props.legend, // 图例 + toolbox: { + show: true, + feature: { + dataZoom: { + yAxisIndex: 'none', + }, + dataView: { readOnly: false }, + magicType: { type: ['line', 'bar'] }, + restore: {}, + saveAsImage: {}, + }, + }, tooltip: { trigger: 'axis', textStyle: { @@ -213,7 +225,7 @@ xAxis: [ { type: props.xAxisType, - boundaryGap: true, + boundaryGap: false, axisLine: { lineStyle: { color: props.axisLineColor, // 轴线的颜色 @@ -223,20 +235,20 @@ color: props.fontColor, // X轴名称颜色 fontSize: 14, }, - splitLine: { - show: false, - lineStyle: { - color: ['#7a6b74'], - type: props.axisLineType, - }, - }, + // splitLine: { + // show: false, + // lineStyle: { + // color: ['#7a6b74'], + // type: props.axisLineType, + // }, + // }, }, ], yAxis: [ { name: props.unit, type: 'value', - boundaryGap: true, + // boundaryGap: true, axisLine: { show: false, lineStyle: { @@ -252,7 +264,7 @@ show: true, lineStyle: { color: ['#bfbfbf'], - type: 'dashed', + type: 'solid', }, }, }, @@ -285,15 +297,24 @@ // 遍历data, 拆分轴线名称,数据和颜色 for (const itemIndex in props.data) { const item = props.data[itemIndex] - const series: lineSeriesOption = { + const series: any = { name: item.name, // 线系列名 type: 'line', - symbol: 'none', // 去掉折线节点 + // symbol: 'none', // 去掉折线节点 smooth: props.smooth, // 曲线平滑设置 lineStyle: { width: 2, }, data: item.data, + markPoint: { + data: [ + { type: 'max', name: 'Max' }, + { type: 'min', name: 'Min' }, + ], + }, + markLine: { + data: [{ type: 'average', name: 'Avg' }], + }, } // 线段颜色 if (item.color || props.colors.length > 0) { @@ -341,7 +362,6 @@ chart.resize() } } - window.addEventListener('resize', () => { chart.resize() }) @@ -352,7 +372,11 @@ diff --git a/plop-templates/component/prompt.js b/plop-templates/component/prompt.js deleted file mode 100644 index 2b42bd2..0000000 --- a/plop-templates/component/prompt.js +++ /dev/null @@ -1,65 +0,0 @@ -const fs = require('fs') - -function getFolder(path) { - const components = [] - const files = fs.readdirSync(path) - files.forEach((item) => { - const stat = fs.lstatSync(`${path}/${item}`) - if (stat.isDirectory() === true && item !== 'components') { - components.push(`${path}/${item}`) - components.push(...getFolder(`${path}/${item}`)) - } - }) - return components -} - -module.exports = { - description: '创建组件', - prompts: [ - { - type: 'confirm', - name: 'isGlobal', - message: '是否为全局组件', - default: false, - }, - { - type: 'list', - name: 'path', - message: '请选择组件创建目录', - choices: getFolder('src/views'), - when: (answers) => { - return !answers.isGlobal - }, - }, - { - type: 'input', - name: 'name', - message: '请输入组件名称', - validate: (v) => { - if (!v || v.trim === '') { - return '组件名称不能为空' - } - else { - return true - } - }, - }, - ], - actions: (data) => { - let path = '' - if (data.isGlobal) { - path = 'src/components/{{properCase name}}/index.vue' - } - else { - path = `${data.path}/components/{{properCase name}}/index.vue` - } - const actions = [ - { - type: 'add', - path, - templateFile: 'plop-templates/component/index.hbs', - }, - ] - return actions - }, -} diff --git a/plop-templates/page/index.hbs b/plop-templates/page/index.hbs deleted file mode 100644 index acabfe3..0000000 --- a/plop-templates/page/index.hbs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/plop-templates/page/prompt.js b/plop-templates/page/prompt.js deleted file mode 100644 index 26c2d38..0000000 --- a/plop-templates/page/prompt.js +++ /dev/null @@ -1,54 +0,0 @@ -const path = require('path') -const fs = require('fs') - -function getFolder(path) { - const components = [] - const files = fs.readdirSync(path) - files.forEach((item) => { - const stat = fs.lstatSync(`${path}/${item}`) - if (stat.isDirectory() === true && item !== 'components') { - components.push(`${path}/${item}`) - components.push(...getFolder(`${path}/${item}`)) - } - }) - return components -} - -module.exports = { - description: '创建页面', - prompts: [ - { - type: 'list', - name: 'path', - message: '请选择页面创建目录', - choices: getFolder('src/views'), - }, - { - type: 'input', - name: 'name', - message: '请输入文件名', - validate: (v) => { - if (!v || v.trim === '') { - return '文件名不能为空' - } - else { - return true - } - }, - }, - ], - actions: (data) => { - const relativePath = path.relative('src/views', data.path) - const actions = [ - { - type: 'add', - path: `${data.path}/{{camelCase name}}.vue`, - templateFile: 'plop-templates/page/index.hbs', - data: { - componentName: `${relativePath} ${data.name}`, - }, - }, - ] - return actions - }, -} diff --git a/plop-templates/store/index.hbs b/plop-templates/store/index.hbs deleted file mode 100644 index b3336c5..0000000 --- a/plop-templates/store/index.hbs +++ /dev/null @@ -1,11 +0,0 @@ -const use{{ properCase name }}Store = defineStore( - // 唯一ID - '{{ camelCase name }}', - { - state: () => ({}), - getters: {}, - actions: {}, - }, -) - -export default use{{ properCase name }}Store diff --git a/plop-templates/store/prompt.js b/plop-templates/store/prompt.js deleted file mode 100644 index 2cefa24..0000000 --- a/plop-templates/store/prompt.js +++ /dev/null @@ -1,28 +0,0 @@ -module.exports = { - description: '创建全局状态', - prompts: [ - { - type: 'input', - name: 'name', - message: '请输入模块名称', - validate: (v) => { - if (!v || v.trim === '') { - return '模块名称不能为空' - } - else { - return true - } - }, - }, - ], - actions: () => { - const actions = [ - { - type: 'add', - path: 'src/store/modules/{{camelCase name}}.ts', - templateFile: 'plop-templates/store/index.hbs', - }, - ] - return actions - }, -} diff --git a/src/api/api/index.ts b/src/api/api/index.ts index 325777a..4541b77 100644 --- a/src/api/api/index.ts +++ b/src/api/api/index.ts @@ -265,7 +265,7 @@ // 设备监测趋势分析 export function getDeviceDetailAnalysis(params: object) { return request({ - url: '/deviceCollectionLog/detailAnalysis', + url: '/deviceCollectionLog/detail-analysis', method: 'get', params, }) diff --git a/src/components.d.ts b/src/components.d.ts index 419ee11..a1b0897 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -7,13 +7,10 @@ declare module '@vue/runtime-core' { export interface GlobalComponents { - AddNode: typeof import('./components/workFlow/addNode.vue')['default'] - AddNodeBan: typeof import('./components/workFlow/addNodeBan.vue')['default'] AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default'] AppContainer: typeof import('./components/AppContainer/index.vue')['default'] ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default'] ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default'] - ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default'] Auth: typeof import('./components/Auth/index.vue')['default'] AuthAll: typeof import('./components/AuthAll/index.vue')['default'] BarChartHorizontal: typeof import('./components/Echart/BarChartHorizontal.vue')['default'] @@ -23,10 +20,6 @@ BatchActionBar: typeof import('./components/BatchActionBar/index.vue')['default'] BenchCol: typeof import('./components/benchCol/index.vue')['default'] ButtonBox: typeof import('./components/buttonBox/buttonBox.vue')['default'] - CertificationMonitor: typeof import('./components/Sample/certificationMonitor.vue')['default'] - CertificationRecords: typeof import('./components/Sample/certificationRecords.vue')['default'] - ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default'] - CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default'] @@ -44,19 +37,14 @@ InfoWindow2: typeof import('./components/map/infoWindow2.vue')['default'] LineChart: typeof import('./components/Echart/LineChart.vue')['default'] Map: typeof import('./components/map/index.vue')['default'] - MeasureRecords: typeof import('./components/Sample/measureRecords.vue')['default'] - NodeWrap: typeof import('./components/workFlow/nodeWrap.vue')['default'] - NodeWrapBan: typeof import('./components/workFlow/nodeWrapBan.vue')['default'] NormalTable: typeof import('./components/NormalTable/index.vue')['default'] PageHeader: typeof import('./components/PageHeader/index.vue')['default'] PageMain: typeof import('./components/PageMain/index.vue')['default'] PcasCascader: typeof import('./components/PcasCascader/index.vue')['default'] PieChart: typeof import('./components/Echart/PieChart.vue')['default'] - PromoterDrawer: typeof import('./components/drawer/promoterDrawer.vue')['default'] QrDialog: typeof import('./components/QrDialog/index.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] - ScanSampleDialog: typeof import('./components/ScanSampleDialog/index.vue')['default'] SearchArea: typeof import('./components/SearchArea/index.vue')['default'] SearchBar: typeof import('./components/SearchBar/index.vue')['default'] SearchItem: typeof import('./components/SearchArea/SearchItem.vue')['default'] diff --git a/src/components/Echart/LineChart.vue b/src/components/Echart/LineChart.vue index 841e0cb..fefb873 100644 --- a/src/components/Echart/LineChart.vue +++ b/src/components/Echart/LineChart.vue @@ -45,14 +45,14 @@ default: () => { return { show: true, - icon: 'circle', - orient: 'vertile', // 图例方向 - align: 'left', // 图例标记和文本的对齐,默认自动 - top: 5, - right: 20, - itemWidth: 12, - itemHeight: 12, - padding: [0, 0, 0, 120], + // icon: 'circle', + orient: 'horizontal', // 图例方向 + // align: 'left', // 图例标记和文本的对齐,默认自动 + // top: 5, + // right: 20, + // itemWidth: 12, + // itemHeight: 12, + // padding: [0, 0, 0, 120], } }, }, @@ -151,7 +151,7 @@ */ gradient: { type: Boolean, - default: true, + default: false, }, /** * y轴最大值 @@ -172,7 +172,7 @@ */ smooth: { type: Boolean, - default: true, + default: false, }, }) @@ -192,9 +192,21 @@ ) // 构建option function buildOption() { - const option: lineOption = { + const option: any = { grid: props.grid, legend: props.legend, // 图例 + toolbox: { + show: true, + feature: { + dataZoom: { + yAxisIndex: 'none', + }, + dataView: { readOnly: false }, + magicType: { type: ['line', 'bar'] }, + restore: {}, + saveAsImage: {}, + }, + }, tooltip: { trigger: 'axis', textStyle: { @@ -213,7 +225,7 @@ xAxis: [ { type: props.xAxisType, - boundaryGap: true, + boundaryGap: false, axisLine: { lineStyle: { color: props.axisLineColor, // 轴线的颜色 @@ -223,20 +235,20 @@ color: props.fontColor, // X轴名称颜色 fontSize: 14, }, - splitLine: { - show: false, - lineStyle: { - color: ['#7a6b74'], - type: props.axisLineType, - }, - }, + // splitLine: { + // show: false, + // lineStyle: { + // color: ['#7a6b74'], + // type: props.axisLineType, + // }, + // }, }, ], yAxis: [ { name: props.unit, type: 'value', - boundaryGap: true, + // boundaryGap: true, axisLine: { show: false, lineStyle: { @@ -252,7 +264,7 @@ show: true, lineStyle: { color: ['#bfbfbf'], - type: 'dashed', + type: 'solid', }, }, }, @@ -285,15 +297,24 @@ // 遍历data, 拆分轴线名称,数据和颜色 for (const itemIndex in props.data) { const item = props.data[itemIndex] - const series: lineSeriesOption = { + const series: any = { name: item.name, // 线系列名 type: 'line', - symbol: 'none', // 去掉折线节点 + // symbol: 'none', // 去掉折线节点 smooth: props.smooth, // 曲线平滑设置 lineStyle: { width: 2, }, data: item.data, + markPoint: { + data: [ + { type: 'max', name: 'Max' }, + { type: 'min', name: 'Min' }, + ], + }, + markLine: { + data: [{ type: 'average', name: 'Avg' }], + }, } // 线段颜色 if (item.color || props.colors.length > 0) { @@ -341,7 +362,6 @@ chart.resize() } } - window.addEventListener('resize', () => { chart.resize() }) @@ -352,7 +372,11 @@ diff --git a/plop-templates/component/prompt.js b/plop-templates/component/prompt.js deleted file mode 100644 index 2b42bd2..0000000 --- a/plop-templates/component/prompt.js +++ /dev/null @@ -1,65 +0,0 @@ -const fs = require('fs') - -function getFolder(path) { - const components = [] - const files = fs.readdirSync(path) - files.forEach((item) => { - const stat = fs.lstatSync(`${path}/${item}`) - if (stat.isDirectory() === true && item !== 'components') { - components.push(`${path}/${item}`) - components.push(...getFolder(`${path}/${item}`)) - } - }) - return components -} - -module.exports = { - description: '创建组件', - prompts: [ - { - type: 'confirm', - name: 'isGlobal', - message: '是否为全局组件', - default: false, - }, - { - type: 'list', - name: 'path', - message: '请选择组件创建目录', - choices: getFolder('src/views'), - when: (answers) => { - return !answers.isGlobal - }, - }, - { - type: 'input', - name: 'name', - message: '请输入组件名称', - validate: (v) => { - if (!v || v.trim === '') { - return '组件名称不能为空' - } - else { - return true - } - }, - }, - ], - actions: (data) => { - let path = '' - if (data.isGlobal) { - path = 'src/components/{{properCase name}}/index.vue' - } - else { - path = `${data.path}/components/{{properCase name}}/index.vue` - } - const actions = [ - { - type: 'add', - path, - templateFile: 'plop-templates/component/index.hbs', - }, - ] - return actions - }, -} diff --git a/plop-templates/page/index.hbs b/plop-templates/page/index.hbs deleted file mode 100644 index acabfe3..0000000 --- a/plop-templates/page/index.hbs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/plop-templates/page/prompt.js b/plop-templates/page/prompt.js deleted file mode 100644 index 26c2d38..0000000 --- a/plop-templates/page/prompt.js +++ /dev/null @@ -1,54 +0,0 @@ -const path = require('path') -const fs = require('fs') - -function getFolder(path) { - const components = [] - const files = fs.readdirSync(path) - files.forEach((item) => { - const stat = fs.lstatSync(`${path}/${item}`) - if (stat.isDirectory() === true && item !== 'components') { - components.push(`${path}/${item}`) - components.push(...getFolder(`${path}/${item}`)) - } - }) - return components -} - -module.exports = { - description: '创建页面', - prompts: [ - { - type: 'list', - name: 'path', - message: '请选择页面创建目录', - choices: getFolder('src/views'), - }, - { - type: 'input', - name: 'name', - message: '请输入文件名', - validate: (v) => { - if (!v || v.trim === '') { - return '文件名不能为空' - } - else { - return true - } - }, - }, - ], - actions: (data) => { - const relativePath = path.relative('src/views', data.path) - const actions = [ - { - type: 'add', - path: `${data.path}/{{camelCase name}}.vue`, - templateFile: 'plop-templates/page/index.hbs', - data: { - componentName: `${relativePath} ${data.name}`, - }, - }, - ] - return actions - }, -} diff --git a/plop-templates/store/index.hbs b/plop-templates/store/index.hbs deleted file mode 100644 index b3336c5..0000000 --- a/plop-templates/store/index.hbs +++ /dev/null @@ -1,11 +0,0 @@ -const use{{ properCase name }}Store = defineStore( - // 唯一ID - '{{ camelCase name }}', - { - state: () => ({}), - getters: {}, - actions: {}, - }, -) - -export default use{{ properCase name }}Store diff --git a/plop-templates/store/prompt.js b/plop-templates/store/prompt.js deleted file mode 100644 index 2cefa24..0000000 --- a/plop-templates/store/prompt.js +++ /dev/null @@ -1,28 +0,0 @@ -module.exports = { - description: '创建全局状态', - prompts: [ - { - type: 'input', - name: 'name', - message: '请输入模块名称', - validate: (v) => { - if (!v || v.trim === '') { - return '模块名称不能为空' - } - else { - return true - } - }, - }, - ], - actions: () => { - const actions = [ - { - type: 'add', - path: 'src/store/modules/{{camelCase name}}.ts', - templateFile: 'plop-templates/store/index.hbs', - }, - ] - return actions - }, -} diff --git a/src/api/api/index.ts b/src/api/api/index.ts index 325777a..4541b77 100644 --- a/src/api/api/index.ts +++ b/src/api/api/index.ts @@ -265,7 +265,7 @@ // 设备监测趋势分析 export function getDeviceDetailAnalysis(params: object) { return request({ - url: '/deviceCollectionLog/detailAnalysis', + url: '/deviceCollectionLog/detail-analysis', method: 'get', params, }) diff --git a/src/components.d.ts b/src/components.d.ts index 419ee11..a1b0897 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -7,13 +7,10 @@ declare module '@vue/runtime-core' { export interface GlobalComponents { - AddNode: typeof import('./components/workFlow/addNode.vue')['default'] - AddNodeBan: typeof import('./components/workFlow/addNodeBan.vue')['default'] AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default'] AppContainer: typeof import('./components/AppContainer/index.vue')['default'] ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default'] ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default'] - ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default'] Auth: typeof import('./components/Auth/index.vue')['default'] AuthAll: typeof import('./components/AuthAll/index.vue')['default'] BarChartHorizontal: typeof import('./components/Echart/BarChartHorizontal.vue')['default'] @@ -23,10 +20,6 @@ BatchActionBar: typeof import('./components/BatchActionBar/index.vue')['default'] BenchCol: typeof import('./components/benchCol/index.vue')['default'] ButtonBox: typeof import('./components/buttonBox/buttonBox.vue')['default'] - CertificationMonitor: typeof import('./components/Sample/certificationMonitor.vue')['default'] - CertificationRecords: typeof import('./components/Sample/certificationRecords.vue')['default'] - ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default'] - CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default'] @@ -44,19 +37,14 @@ InfoWindow2: typeof import('./components/map/infoWindow2.vue')['default'] LineChart: typeof import('./components/Echart/LineChart.vue')['default'] Map: typeof import('./components/map/index.vue')['default'] - MeasureRecords: typeof import('./components/Sample/measureRecords.vue')['default'] - NodeWrap: typeof import('./components/workFlow/nodeWrap.vue')['default'] - NodeWrapBan: typeof import('./components/workFlow/nodeWrapBan.vue')['default'] NormalTable: typeof import('./components/NormalTable/index.vue')['default'] PageHeader: typeof import('./components/PageHeader/index.vue')['default'] PageMain: typeof import('./components/PageMain/index.vue')['default'] PcasCascader: typeof import('./components/PcasCascader/index.vue')['default'] PieChart: typeof import('./components/Echart/PieChart.vue')['default'] - PromoterDrawer: typeof import('./components/drawer/promoterDrawer.vue')['default'] QrDialog: typeof import('./components/QrDialog/index.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] - ScanSampleDialog: typeof import('./components/ScanSampleDialog/index.vue')['default'] SearchArea: typeof import('./components/SearchArea/index.vue')['default'] SearchBar: typeof import('./components/SearchBar/index.vue')['default'] SearchItem: typeof import('./components/SearchArea/SearchItem.vue')['default'] diff --git a/src/components/Echart/LineChart.vue b/src/components/Echart/LineChart.vue index 841e0cb..fefb873 100644 --- a/src/components/Echart/LineChart.vue +++ b/src/components/Echart/LineChart.vue @@ -45,14 +45,14 @@ default: () => { return { show: true, - icon: 'circle', - orient: 'vertile', // 图例方向 - align: 'left', // 图例标记和文本的对齐,默认自动 - top: 5, - right: 20, - itemWidth: 12, - itemHeight: 12, - padding: [0, 0, 0, 120], + // icon: 'circle', + orient: 'horizontal', // 图例方向 + // align: 'left', // 图例标记和文本的对齐,默认自动 + // top: 5, + // right: 20, + // itemWidth: 12, + // itemHeight: 12, + // padding: [0, 0, 0, 120], } }, }, @@ -151,7 +151,7 @@ */ gradient: { type: Boolean, - default: true, + default: false, }, /** * y轴最大值 @@ -172,7 +172,7 @@ */ smooth: { type: Boolean, - default: true, + default: false, }, }) @@ -192,9 +192,21 @@ ) // 构建option function buildOption() { - const option: lineOption = { + const option: any = { grid: props.grid, legend: props.legend, // 图例 + toolbox: { + show: true, + feature: { + dataZoom: { + yAxisIndex: 'none', + }, + dataView: { readOnly: false }, + magicType: { type: ['line', 'bar'] }, + restore: {}, + saveAsImage: {}, + }, + }, tooltip: { trigger: 'axis', textStyle: { @@ -213,7 +225,7 @@ xAxis: [ { type: props.xAxisType, - boundaryGap: true, + boundaryGap: false, axisLine: { lineStyle: { color: props.axisLineColor, // 轴线的颜色 @@ -223,20 +235,20 @@ color: props.fontColor, // X轴名称颜色 fontSize: 14, }, - splitLine: { - show: false, - lineStyle: { - color: ['#7a6b74'], - type: props.axisLineType, - }, - }, + // splitLine: { + // show: false, + // lineStyle: { + // color: ['#7a6b74'], + // type: props.axisLineType, + // }, + // }, }, ], yAxis: [ { name: props.unit, type: 'value', - boundaryGap: true, + // boundaryGap: true, axisLine: { show: false, lineStyle: { @@ -252,7 +264,7 @@ show: true, lineStyle: { color: ['#bfbfbf'], - type: 'dashed', + type: 'solid', }, }, }, @@ -285,15 +297,24 @@ // 遍历data, 拆分轴线名称,数据和颜色 for (const itemIndex in props.data) { const item = props.data[itemIndex] - const series: lineSeriesOption = { + const series: any = { name: item.name, // 线系列名 type: 'line', - symbol: 'none', // 去掉折线节点 + // symbol: 'none', // 去掉折线节点 smooth: props.smooth, // 曲线平滑设置 lineStyle: { width: 2, }, data: item.data, + markPoint: { + data: [ + { type: 'max', name: 'Max' }, + { type: 'min', name: 'Min' }, + ], + }, + markLine: { + data: [{ type: 'average', name: 'Avg' }], + }, } // 线段颜色 if (item.color || props.colors.length > 0) { @@ -341,7 +362,6 @@ chart.resize() } } - window.addEventListener('resize', () => { chart.resize() }) @@ -352,7 +372,11 @@ - diff --git a/departments150.json b/departments150.json deleted file mode 100644 index aa6cc37..0000000 --- a/departments150.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "code": "200", - "msg": "操作成功", - "data": { - "childDepartments": [], - "employees": [{ - "id": "53128112", - "employeeName": "测试1", - "isLeave": "0", - "open": "false" - },{ - "id": "53128113", - "employeeName": "测试2", - "isLeave": "0", - "open": "false" - }], - "titleDepartments": [{ - "departmentId": "150", - "departmentKey": "RLXZB_V2", - "departmentName": "人力行政部", - "departmentNames": "人力行政部", - "id": "150", - "parentId": "0" - }] - } -} \ No newline at end of file diff --git a/plop-templates/component/index.hbs b/plop-templates/component/index.hbs deleted file mode 100644 index 162c0d3..0000000 --- a/plop-templates/component/index.hbs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/plop-templates/component/prompt.js b/plop-templates/component/prompt.js deleted file mode 100644 index 2b42bd2..0000000 --- a/plop-templates/component/prompt.js +++ /dev/null @@ -1,65 +0,0 @@ -const fs = require('fs') - -function getFolder(path) { - const components = [] - const files = fs.readdirSync(path) - files.forEach((item) => { - const stat = fs.lstatSync(`${path}/${item}`) - if (stat.isDirectory() === true && item !== 'components') { - components.push(`${path}/${item}`) - components.push(...getFolder(`${path}/${item}`)) - } - }) - return components -} - -module.exports = { - description: '创建组件', - prompts: [ - { - type: 'confirm', - name: 'isGlobal', - message: '是否为全局组件', - default: false, - }, - { - type: 'list', - name: 'path', - message: '请选择组件创建目录', - choices: getFolder('src/views'), - when: (answers) => { - return !answers.isGlobal - }, - }, - { - type: 'input', - name: 'name', - message: '请输入组件名称', - validate: (v) => { - if (!v || v.trim === '') { - return '组件名称不能为空' - } - else { - return true - } - }, - }, - ], - actions: (data) => { - let path = '' - if (data.isGlobal) { - path = 'src/components/{{properCase name}}/index.vue' - } - else { - path = `${data.path}/components/{{properCase name}}/index.vue` - } - const actions = [ - { - type: 'add', - path, - templateFile: 'plop-templates/component/index.hbs', - }, - ] - return actions - }, -} diff --git a/plop-templates/page/index.hbs b/plop-templates/page/index.hbs deleted file mode 100644 index acabfe3..0000000 --- a/plop-templates/page/index.hbs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/plop-templates/page/prompt.js b/plop-templates/page/prompt.js deleted file mode 100644 index 26c2d38..0000000 --- a/plop-templates/page/prompt.js +++ /dev/null @@ -1,54 +0,0 @@ -const path = require('path') -const fs = require('fs') - -function getFolder(path) { - const components = [] - const files = fs.readdirSync(path) - files.forEach((item) => { - const stat = fs.lstatSync(`${path}/${item}`) - if (stat.isDirectory() === true && item !== 'components') { - components.push(`${path}/${item}`) - components.push(...getFolder(`${path}/${item}`)) - } - }) - return components -} - -module.exports = { - description: '创建页面', - prompts: [ - { - type: 'list', - name: 'path', - message: '请选择页面创建目录', - choices: getFolder('src/views'), - }, - { - type: 'input', - name: 'name', - message: '请输入文件名', - validate: (v) => { - if (!v || v.trim === '') { - return '文件名不能为空' - } - else { - return true - } - }, - }, - ], - actions: (data) => { - const relativePath = path.relative('src/views', data.path) - const actions = [ - { - type: 'add', - path: `${data.path}/{{camelCase name}}.vue`, - templateFile: 'plop-templates/page/index.hbs', - data: { - componentName: `${relativePath} ${data.name}`, - }, - }, - ] - return actions - }, -} diff --git a/plop-templates/store/index.hbs b/plop-templates/store/index.hbs deleted file mode 100644 index b3336c5..0000000 --- a/plop-templates/store/index.hbs +++ /dev/null @@ -1,11 +0,0 @@ -const use{{ properCase name }}Store = defineStore( - // 唯一ID - '{{ camelCase name }}', - { - state: () => ({}), - getters: {}, - actions: {}, - }, -) - -export default use{{ properCase name }}Store diff --git a/plop-templates/store/prompt.js b/plop-templates/store/prompt.js deleted file mode 100644 index 2cefa24..0000000 --- a/plop-templates/store/prompt.js +++ /dev/null @@ -1,28 +0,0 @@ -module.exports = { - description: '创建全局状态', - prompts: [ - { - type: 'input', - name: 'name', - message: '请输入模块名称', - validate: (v) => { - if (!v || v.trim === '') { - return '模块名称不能为空' - } - else { - return true - } - }, - }, - ], - actions: () => { - const actions = [ - { - type: 'add', - path: 'src/store/modules/{{camelCase name}}.ts', - templateFile: 'plop-templates/store/index.hbs', - }, - ] - return actions - }, -} diff --git a/src/api/api/index.ts b/src/api/api/index.ts index 325777a..4541b77 100644 --- a/src/api/api/index.ts +++ b/src/api/api/index.ts @@ -265,7 +265,7 @@ // 设备监测趋势分析 export function getDeviceDetailAnalysis(params: object) { return request({ - url: '/deviceCollectionLog/detailAnalysis', + url: '/deviceCollectionLog/detail-analysis', method: 'get', params, }) diff --git a/src/components.d.ts b/src/components.d.ts index 419ee11..a1b0897 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -7,13 +7,10 @@ declare module '@vue/runtime-core' { export interface GlobalComponents { - AddNode: typeof import('./components/workFlow/addNode.vue')['default'] - AddNodeBan: typeof import('./components/workFlow/addNodeBan.vue')['default'] AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default'] AppContainer: typeof import('./components/AppContainer/index.vue')['default'] ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default'] ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default'] - ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default'] Auth: typeof import('./components/Auth/index.vue')['default'] AuthAll: typeof import('./components/AuthAll/index.vue')['default'] BarChartHorizontal: typeof import('./components/Echart/BarChartHorizontal.vue')['default'] @@ -23,10 +20,6 @@ BatchActionBar: typeof import('./components/BatchActionBar/index.vue')['default'] BenchCol: typeof import('./components/benchCol/index.vue')['default'] ButtonBox: typeof import('./components/buttonBox/buttonBox.vue')['default'] - CertificationMonitor: typeof import('./components/Sample/certificationMonitor.vue')['default'] - CertificationRecords: typeof import('./components/Sample/certificationRecords.vue')['default'] - ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default'] - CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default'] @@ -44,19 +37,14 @@ InfoWindow2: typeof import('./components/map/infoWindow2.vue')['default'] LineChart: typeof import('./components/Echart/LineChart.vue')['default'] Map: typeof import('./components/map/index.vue')['default'] - MeasureRecords: typeof import('./components/Sample/measureRecords.vue')['default'] - NodeWrap: typeof import('./components/workFlow/nodeWrap.vue')['default'] - NodeWrapBan: typeof import('./components/workFlow/nodeWrapBan.vue')['default'] NormalTable: typeof import('./components/NormalTable/index.vue')['default'] PageHeader: typeof import('./components/PageHeader/index.vue')['default'] PageMain: typeof import('./components/PageMain/index.vue')['default'] PcasCascader: typeof import('./components/PcasCascader/index.vue')['default'] PieChart: typeof import('./components/Echart/PieChart.vue')['default'] - PromoterDrawer: typeof import('./components/drawer/promoterDrawer.vue')['default'] QrDialog: typeof import('./components/QrDialog/index.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] - ScanSampleDialog: typeof import('./components/ScanSampleDialog/index.vue')['default'] SearchArea: typeof import('./components/SearchArea/index.vue')['default'] SearchBar: typeof import('./components/SearchBar/index.vue')['default'] SearchItem: typeof import('./components/SearchArea/SearchItem.vue')['default'] diff --git a/src/components/Echart/LineChart.vue b/src/components/Echart/LineChart.vue index 841e0cb..fefb873 100644 --- a/src/components/Echart/LineChart.vue +++ b/src/components/Echart/LineChart.vue @@ -45,14 +45,14 @@ default: () => { return { show: true, - icon: 'circle', - orient: 'vertile', // 图例方向 - align: 'left', // 图例标记和文本的对齐,默认自动 - top: 5, - right: 20, - itemWidth: 12, - itemHeight: 12, - padding: [0, 0, 0, 120], + // icon: 'circle', + orient: 'horizontal', // 图例方向 + // align: 'left', // 图例标记和文本的对齐,默认自动 + // top: 5, + // right: 20, + // itemWidth: 12, + // itemHeight: 12, + // padding: [0, 0, 0, 120], } }, }, @@ -151,7 +151,7 @@ */ gradient: { type: Boolean, - default: true, + default: false, }, /** * y轴最大值 @@ -172,7 +172,7 @@ */ smooth: { type: Boolean, - default: true, + default: false, }, }) @@ -192,9 +192,21 @@ ) // 构建option function buildOption() { - const option: lineOption = { + const option: any = { grid: props.grid, legend: props.legend, // 图例 + toolbox: { + show: true, + feature: { + dataZoom: { + yAxisIndex: 'none', + }, + dataView: { readOnly: false }, + magicType: { type: ['line', 'bar'] }, + restore: {}, + saveAsImage: {}, + }, + }, tooltip: { trigger: 'axis', textStyle: { @@ -213,7 +225,7 @@ xAxis: [ { type: props.xAxisType, - boundaryGap: true, + boundaryGap: false, axisLine: { lineStyle: { color: props.axisLineColor, // 轴线的颜色 @@ -223,20 +235,20 @@ color: props.fontColor, // X轴名称颜色 fontSize: 14, }, - splitLine: { - show: false, - lineStyle: { - color: ['#7a6b74'], - type: props.axisLineType, - }, - }, + // splitLine: { + // show: false, + // lineStyle: { + // color: ['#7a6b74'], + // type: props.axisLineType, + // }, + // }, }, ], yAxis: [ { name: props.unit, type: 'value', - boundaryGap: true, + // boundaryGap: true, axisLine: { show: false, lineStyle: { @@ -252,7 +264,7 @@ show: true, lineStyle: { color: ['#bfbfbf'], - type: 'dashed', + type: 'solid', }, }, }, @@ -285,15 +297,24 @@ // 遍历data, 拆分轴线名称,数据和颜色 for (const itemIndex in props.data) { const item = props.data[itemIndex] - const series: lineSeriesOption = { + const series: any = { name: item.name, // 线系列名 type: 'line', - symbol: 'none', // 去掉折线节点 + // symbol: 'none', // 去掉折线节点 smooth: props.smooth, // 曲线平滑设置 lineStyle: { width: 2, }, data: item.data, + markPoint: { + data: [ + { type: 'max', name: 'Max' }, + { type: 'min', name: 'Min' }, + ], + }, + markLine: { + data: [{ type: 'average', name: 'Avg' }], + }, } // 线段颜色 if (item.color || props.colors.length > 0) { @@ -341,7 +362,6 @@ chart.resize() } } - window.addEventListener('resize', () => { chart.resize() }) @@ -352,7 +372,11 @@ - diff --git a/src/components/ScanSampleDialog/scan-interface.ts b/src/components/ScanSampleDialog/scan-interface.ts deleted file mode 100644 index 1c3aa33..0000000 --- a/src/components/ScanSampleDialog/scan-interface.ts +++ /dev/null @@ -1,12 +0,0 @@ -export interface ISampleScan { - sampleId?: string // 样品id - sampleNo: string // 样品编号 - sampleName: string // 样品名称 - sampleModel: string // 样品型号 - manufacturingNo: string // 出厂编号 - customerNo: string // 委托方代码 - customerName: string // 委托方名称 - orderId: string // 委托书id - orderNo: string // 委托书编号 - labelBind: string // 标签绑定 -} diff --git a/departments150.json b/departments150.json deleted file mode 100644 index aa6cc37..0000000 --- a/departments150.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "code": "200", - "msg": "操作成功", - "data": { - "childDepartments": [], - "employees": [{ - "id": "53128112", - "employeeName": "测试1", - "isLeave": "0", - "open": "false" - },{ - "id": "53128113", - "employeeName": "测试2", - "isLeave": "0", - "open": "false" - }], - "titleDepartments": [{ - "departmentId": "150", - "departmentKey": "RLXZB_V2", - "departmentName": "人力行政部", - "departmentNames": "人力行政部", - "id": "150", - "parentId": "0" - }] - } -} \ No newline at end of file diff --git a/plop-templates/component/index.hbs b/plop-templates/component/index.hbs deleted file mode 100644 index 162c0d3..0000000 --- a/plop-templates/component/index.hbs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/plop-templates/component/prompt.js b/plop-templates/component/prompt.js deleted file mode 100644 index 2b42bd2..0000000 --- a/plop-templates/component/prompt.js +++ /dev/null @@ -1,65 +0,0 @@ -const fs = require('fs') - -function getFolder(path) { - const components = [] - const files = fs.readdirSync(path) - files.forEach((item) => { - const stat = fs.lstatSync(`${path}/${item}`) - if (stat.isDirectory() === true && item !== 'components') { - components.push(`${path}/${item}`) - components.push(...getFolder(`${path}/${item}`)) - } - }) - return components -} - -module.exports = { - description: '创建组件', - prompts: [ - { - type: 'confirm', - name: 'isGlobal', - message: '是否为全局组件', - default: false, - }, - { - type: 'list', - name: 'path', - message: '请选择组件创建目录', - choices: getFolder('src/views'), - when: (answers) => { - return !answers.isGlobal - }, - }, - { - type: 'input', - name: 'name', - message: '请输入组件名称', - validate: (v) => { - if (!v || v.trim === '') { - return '组件名称不能为空' - } - else { - return true - } - }, - }, - ], - actions: (data) => { - let path = '' - if (data.isGlobal) { - path = 'src/components/{{properCase name}}/index.vue' - } - else { - path = `${data.path}/components/{{properCase name}}/index.vue` - } - const actions = [ - { - type: 'add', - path, - templateFile: 'plop-templates/component/index.hbs', - }, - ] - return actions - }, -} diff --git a/plop-templates/page/index.hbs b/plop-templates/page/index.hbs deleted file mode 100644 index acabfe3..0000000 --- a/plop-templates/page/index.hbs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/plop-templates/page/prompt.js b/plop-templates/page/prompt.js deleted file mode 100644 index 26c2d38..0000000 --- a/plop-templates/page/prompt.js +++ /dev/null @@ -1,54 +0,0 @@ -const path = require('path') -const fs = require('fs') - -function getFolder(path) { - const components = [] - const files = fs.readdirSync(path) - files.forEach((item) => { - const stat = fs.lstatSync(`${path}/${item}`) - if (stat.isDirectory() === true && item !== 'components') { - components.push(`${path}/${item}`) - components.push(...getFolder(`${path}/${item}`)) - } - }) - return components -} - -module.exports = { - description: '创建页面', - prompts: [ - { - type: 'list', - name: 'path', - message: '请选择页面创建目录', - choices: getFolder('src/views'), - }, - { - type: 'input', - name: 'name', - message: '请输入文件名', - validate: (v) => { - if (!v || v.trim === '') { - return '文件名不能为空' - } - else { - return true - } - }, - }, - ], - actions: (data) => { - const relativePath = path.relative('src/views', data.path) - const actions = [ - { - type: 'add', - path: `${data.path}/{{camelCase name}}.vue`, - templateFile: 'plop-templates/page/index.hbs', - data: { - componentName: `${relativePath} ${data.name}`, - }, - }, - ] - return actions - }, -} diff --git a/plop-templates/store/index.hbs b/plop-templates/store/index.hbs deleted file mode 100644 index b3336c5..0000000 --- a/plop-templates/store/index.hbs +++ /dev/null @@ -1,11 +0,0 @@ -const use{{ properCase name }}Store = defineStore( - // 唯一ID - '{{ camelCase name }}', - { - state: () => ({}), - getters: {}, - actions: {}, - }, -) - -export default use{{ properCase name }}Store diff --git a/plop-templates/store/prompt.js b/plop-templates/store/prompt.js deleted file mode 100644 index 2cefa24..0000000 --- a/plop-templates/store/prompt.js +++ /dev/null @@ -1,28 +0,0 @@ -module.exports = { - description: '创建全局状态', - prompts: [ - { - type: 'input', - name: 'name', - message: '请输入模块名称', - validate: (v) => { - if (!v || v.trim === '') { - return '模块名称不能为空' - } - else { - return true - } - }, - }, - ], - actions: () => { - const actions = [ - { - type: 'add', - path: 'src/store/modules/{{camelCase name}}.ts', - templateFile: 'plop-templates/store/index.hbs', - }, - ] - return actions - }, -} diff --git a/src/api/api/index.ts b/src/api/api/index.ts index 325777a..4541b77 100644 --- a/src/api/api/index.ts +++ b/src/api/api/index.ts @@ -265,7 +265,7 @@ // 设备监测趋势分析 export function getDeviceDetailAnalysis(params: object) { return request({ - url: '/deviceCollectionLog/detailAnalysis', + url: '/deviceCollectionLog/detail-analysis', method: 'get', params, }) diff --git a/src/components.d.ts b/src/components.d.ts index 419ee11..a1b0897 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -7,13 +7,10 @@ declare module '@vue/runtime-core' { export interface GlobalComponents { - AddNode: typeof import('./components/workFlow/addNode.vue')['default'] - AddNodeBan: typeof import('./components/workFlow/addNodeBan.vue')['default'] AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default'] AppContainer: typeof import('./components/AppContainer/index.vue')['default'] ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default'] ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default'] - ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default'] Auth: typeof import('./components/Auth/index.vue')['default'] AuthAll: typeof import('./components/AuthAll/index.vue')['default'] BarChartHorizontal: typeof import('./components/Echart/BarChartHorizontal.vue')['default'] @@ -23,10 +20,6 @@ BatchActionBar: typeof import('./components/BatchActionBar/index.vue')['default'] BenchCol: typeof import('./components/benchCol/index.vue')['default'] ButtonBox: typeof import('./components/buttonBox/buttonBox.vue')['default'] - CertificationMonitor: typeof import('./components/Sample/certificationMonitor.vue')['default'] - CertificationRecords: typeof import('./components/Sample/certificationRecords.vue')['default'] - ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default'] - CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default'] @@ -44,19 +37,14 @@ InfoWindow2: typeof import('./components/map/infoWindow2.vue')['default'] LineChart: typeof import('./components/Echart/LineChart.vue')['default'] Map: typeof import('./components/map/index.vue')['default'] - MeasureRecords: typeof import('./components/Sample/measureRecords.vue')['default'] - NodeWrap: typeof import('./components/workFlow/nodeWrap.vue')['default'] - NodeWrapBan: typeof import('./components/workFlow/nodeWrapBan.vue')['default'] NormalTable: typeof import('./components/NormalTable/index.vue')['default'] PageHeader: typeof import('./components/PageHeader/index.vue')['default'] PageMain: typeof import('./components/PageMain/index.vue')['default'] PcasCascader: typeof import('./components/PcasCascader/index.vue')['default'] PieChart: typeof import('./components/Echart/PieChart.vue')['default'] - PromoterDrawer: typeof import('./components/drawer/promoterDrawer.vue')['default'] QrDialog: typeof import('./components/QrDialog/index.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] - ScanSampleDialog: typeof import('./components/ScanSampleDialog/index.vue')['default'] SearchArea: typeof import('./components/SearchArea/index.vue')['default'] SearchBar: typeof import('./components/SearchBar/index.vue')['default'] SearchItem: typeof import('./components/SearchArea/SearchItem.vue')['default'] diff --git a/src/components/Echart/LineChart.vue b/src/components/Echart/LineChart.vue index 841e0cb..fefb873 100644 --- a/src/components/Echart/LineChart.vue +++ b/src/components/Echart/LineChart.vue @@ -45,14 +45,14 @@ default: () => { return { show: true, - icon: 'circle', - orient: 'vertile', // 图例方向 - align: 'left', // 图例标记和文本的对齐,默认自动 - top: 5, - right: 20, - itemWidth: 12, - itemHeight: 12, - padding: [0, 0, 0, 120], + // icon: 'circle', + orient: 'horizontal', // 图例方向 + // align: 'left', // 图例标记和文本的对齐,默认自动 + // top: 5, + // right: 20, + // itemWidth: 12, + // itemHeight: 12, + // padding: [0, 0, 0, 120], } }, }, @@ -151,7 +151,7 @@ */ gradient: { type: Boolean, - default: true, + default: false, }, /** * y轴最大值 @@ -172,7 +172,7 @@ */ smooth: { type: Boolean, - default: true, + default: false, }, }) @@ -192,9 +192,21 @@ ) // 构建option function buildOption() { - const option: lineOption = { + const option: any = { grid: props.grid, legend: props.legend, // 图例 + toolbox: { + show: true, + feature: { + dataZoom: { + yAxisIndex: 'none', + }, + dataView: { readOnly: false }, + magicType: { type: ['line', 'bar'] }, + restore: {}, + saveAsImage: {}, + }, + }, tooltip: { trigger: 'axis', textStyle: { @@ -213,7 +225,7 @@ xAxis: [ { type: props.xAxisType, - boundaryGap: true, + boundaryGap: false, axisLine: { lineStyle: { color: props.axisLineColor, // 轴线的颜色 @@ -223,20 +235,20 @@ color: props.fontColor, // X轴名称颜色 fontSize: 14, }, - splitLine: { - show: false, - lineStyle: { - color: ['#7a6b74'], - type: props.axisLineType, - }, - }, + // splitLine: { + // show: false, + // lineStyle: { + // color: ['#7a6b74'], + // type: props.axisLineType, + // }, + // }, }, ], yAxis: [ { name: props.unit, type: 'value', - boundaryGap: true, + // boundaryGap: true, axisLine: { show: false, lineStyle: { @@ -252,7 +264,7 @@ show: true, lineStyle: { color: ['#bfbfbf'], - type: 'dashed', + type: 'solid', }, }, }, @@ -285,15 +297,24 @@ // 遍历data, 拆分轴线名称,数据和颜色 for (const itemIndex in props.data) { const item = props.data[itemIndex] - const series: lineSeriesOption = { + const series: any = { name: item.name, // 线系列名 type: 'line', - symbol: 'none', // 去掉折线节点 + // symbol: 'none', // 去掉折线节点 smooth: props.smooth, // 曲线平滑设置 lineStyle: { width: 2, }, data: item.data, + markPoint: { + data: [ + { type: 'max', name: 'Max' }, + { type: 'min', name: 'Min' }, + ], + }, + markLine: { + data: [{ type: 'average', name: 'Avg' }], + }, } // 线段颜色 if (item.color || props.colors.length > 0) { @@ -341,7 +362,6 @@ chart.resize() } } - window.addEventListener('resize', () => { chart.resize() }) @@ -352,7 +372,11 @@ - diff --git a/src/components/ScanSampleDialog/scan-interface.ts b/src/components/ScanSampleDialog/scan-interface.ts deleted file mode 100644 index 1c3aa33..0000000 --- a/src/components/ScanSampleDialog/scan-interface.ts +++ /dev/null @@ -1,12 +0,0 @@ -export interface ISampleScan { - sampleId?: string // 样品id - sampleNo: string // 样品编号 - sampleName: string // 样品名称 - sampleModel: string // 样品型号 - manufacturingNo: string // 出厂编号 - customerNo: string // 委托方代码 - customerName: string // 委托方名称 - orderId: string // 委托书id - orderNo: string // 委托书编号 - labelBind: string // 标签绑定 -} diff --git a/src/components/drawer/approverDrawer.vue b/src/components/drawer/approverDrawer.vue deleted file mode 100644 index 6fdad69..0000000 --- a/src/components/drawer/approverDrawer.vue +++ /dev/null @@ -1,458 +0,0 @@ - - - - - - - - diff --git a/departments150.json b/departments150.json deleted file mode 100644 index aa6cc37..0000000 --- a/departments150.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "code": "200", - "msg": "操作成功", - "data": { - "childDepartments": [], - "employees": [{ - "id": "53128112", - "employeeName": "测试1", - "isLeave": "0", - "open": "false" - },{ - "id": "53128113", - "employeeName": "测试2", - "isLeave": "0", - "open": "false" - }], - "titleDepartments": [{ - "departmentId": "150", - "departmentKey": "RLXZB_V2", - "departmentName": "人力行政部", - "departmentNames": "人力行政部", - "id": "150", - "parentId": "0" - }] - } -} \ No newline at end of file diff --git a/plop-templates/component/index.hbs b/plop-templates/component/index.hbs deleted file mode 100644 index 162c0d3..0000000 --- a/plop-templates/component/index.hbs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/plop-templates/component/prompt.js b/plop-templates/component/prompt.js deleted file mode 100644 index 2b42bd2..0000000 --- a/plop-templates/component/prompt.js +++ /dev/null @@ -1,65 +0,0 @@ -const fs = require('fs') - -function getFolder(path) { - const components = [] - const files = fs.readdirSync(path) - files.forEach((item) => { - const stat = fs.lstatSync(`${path}/${item}`) - if (stat.isDirectory() === true && item !== 'components') { - components.push(`${path}/${item}`) - components.push(...getFolder(`${path}/${item}`)) - } - }) - return components -} - -module.exports = { - description: '创建组件', - prompts: [ - { - type: 'confirm', - name: 'isGlobal', - message: '是否为全局组件', - default: false, - }, - { - type: 'list', - name: 'path', - message: '请选择组件创建目录', - choices: getFolder('src/views'), - when: (answers) => { - return !answers.isGlobal - }, - }, - { - type: 'input', - name: 'name', - message: '请输入组件名称', - validate: (v) => { - if (!v || v.trim === '') { - return '组件名称不能为空' - } - else { - return true - } - }, - }, - ], - actions: (data) => { - let path = '' - if (data.isGlobal) { - path = 'src/components/{{properCase name}}/index.vue' - } - else { - path = `${data.path}/components/{{properCase name}}/index.vue` - } - const actions = [ - { - type: 'add', - path, - templateFile: 'plop-templates/component/index.hbs', - }, - ] - return actions - }, -} diff --git a/plop-templates/page/index.hbs b/plop-templates/page/index.hbs deleted file mode 100644 index acabfe3..0000000 --- a/plop-templates/page/index.hbs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/plop-templates/page/prompt.js b/plop-templates/page/prompt.js deleted file mode 100644 index 26c2d38..0000000 --- a/plop-templates/page/prompt.js +++ /dev/null @@ -1,54 +0,0 @@ -const path = require('path') -const fs = require('fs') - -function getFolder(path) { - const components = [] - const files = fs.readdirSync(path) - files.forEach((item) => { - const stat = fs.lstatSync(`${path}/${item}`) - if (stat.isDirectory() === true && item !== 'components') { - components.push(`${path}/${item}`) - components.push(...getFolder(`${path}/${item}`)) - } - }) - return components -} - -module.exports = { - description: '创建页面', - prompts: [ - { - type: 'list', - name: 'path', - message: '请选择页面创建目录', - choices: getFolder('src/views'), - }, - { - type: 'input', - name: 'name', - message: '请输入文件名', - validate: (v) => { - if (!v || v.trim === '') { - return '文件名不能为空' - } - else { - return true - } - }, - }, - ], - actions: (data) => { - const relativePath = path.relative('src/views', data.path) - const actions = [ - { - type: 'add', - path: `${data.path}/{{camelCase name}}.vue`, - templateFile: 'plop-templates/page/index.hbs', - data: { - componentName: `${relativePath} ${data.name}`, - }, - }, - ] - return actions - }, -} diff --git a/plop-templates/store/index.hbs b/plop-templates/store/index.hbs deleted file mode 100644 index b3336c5..0000000 --- a/plop-templates/store/index.hbs +++ /dev/null @@ -1,11 +0,0 @@ -const use{{ properCase name }}Store = defineStore( - // 唯一ID - '{{ camelCase name }}', - { - state: () => ({}), - getters: {}, - actions: {}, - }, -) - -export default use{{ properCase name }}Store diff --git a/plop-templates/store/prompt.js b/plop-templates/store/prompt.js deleted file mode 100644 index 2cefa24..0000000 --- a/plop-templates/store/prompt.js +++ /dev/null @@ -1,28 +0,0 @@ -module.exports = { - description: '创建全局状态', - prompts: [ - { - type: 'input', - name: 'name', - message: '请输入模块名称', - validate: (v) => { - if (!v || v.trim === '') { - return '模块名称不能为空' - } - else { - return true - } - }, - }, - ], - actions: () => { - const actions = [ - { - type: 'add', - path: 'src/store/modules/{{camelCase name}}.ts', - templateFile: 'plop-templates/store/index.hbs', - }, - ] - return actions - }, -} diff --git a/src/api/api/index.ts b/src/api/api/index.ts index 325777a..4541b77 100644 --- a/src/api/api/index.ts +++ b/src/api/api/index.ts @@ -265,7 +265,7 @@ // 设备监测趋势分析 export function getDeviceDetailAnalysis(params: object) { return request({ - url: '/deviceCollectionLog/detailAnalysis', + url: '/deviceCollectionLog/detail-analysis', method: 'get', params, }) diff --git a/src/components.d.ts b/src/components.d.ts index 419ee11..a1b0897 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -7,13 +7,10 @@ declare module '@vue/runtime-core' { export interface GlobalComponents { - AddNode: typeof import('./components/workFlow/addNode.vue')['default'] - AddNodeBan: typeof import('./components/workFlow/addNodeBan.vue')['default'] AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default'] AppContainer: typeof import('./components/AppContainer/index.vue')['default'] ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default'] ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default'] - ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default'] Auth: typeof import('./components/Auth/index.vue')['default'] AuthAll: typeof import('./components/AuthAll/index.vue')['default'] BarChartHorizontal: typeof import('./components/Echart/BarChartHorizontal.vue')['default'] @@ -23,10 +20,6 @@ BatchActionBar: typeof import('./components/BatchActionBar/index.vue')['default'] BenchCol: typeof import('./components/benchCol/index.vue')['default'] ButtonBox: typeof import('./components/buttonBox/buttonBox.vue')['default'] - CertificationMonitor: typeof import('./components/Sample/certificationMonitor.vue')['default'] - CertificationRecords: typeof import('./components/Sample/certificationRecords.vue')['default'] - ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default'] - CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default'] @@ -44,19 +37,14 @@ InfoWindow2: typeof import('./components/map/infoWindow2.vue')['default'] LineChart: typeof import('./components/Echart/LineChart.vue')['default'] Map: typeof import('./components/map/index.vue')['default'] - MeasureRecords: typeof import('./components/Sample/measureRecords.vue')['default'] - NodeWrap: typeof import('./components/workFlow/nodeWrap.vue')['default'] - NodeWrapBan: typeof import('./components/workFlow/nodeWrapBan.vue')['default'] NormalTable: typeof import('./components/NormalTable/index.vue')['default'] PageHeader: typeof import('./components/PageHeader/index.vue')['default'] PageMain: typeof import('./components/PageMain/index.vue')['default'] PcasCascader: typeof import('./components/PcasCascader/index.vue')['default'] PieChart: typeof import('./components/Echart/PieChart.vue')['default'] - PromoterDrawer: typeof import('./components/drawer/promoterDrawer.vue')['default'] QrDialog: typeof import('./components/QrDialog/index.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] - ScanSampleDialog: typeof import('./components/ScanSampleDialog/index.vue')['default'] SearchArea: typeof import('./components/SearchArea/index.vue')['default'] SearchBar: typeof import('./components/SearchBar/index.vue')['default'] SearchItem: typeof import('./components/SearchArea/SearchItem.vue')['default'] diff --git a/src/components/Echart/LineChart.vue b/src/components/Echart/LineChart.vue index 841e0cb..fefb873 100644 --- a/src/components/Echart/LineChart.vue +++ b/src/components/Echart/LineChart.vue @@ -45,14 +45,14 @@ default: () => { return { show: true, - icon: 'circle', - orient: 'vertile', // 图例方向 - align: 'left', // 图例标记和文本的对齐,默认自动 - top: 5, - right: 20, - itemWidth: 12, - itemHeight: 12, - padding: [0, 0, 0, 120], + // icon: 'circle', + orient: 'horizontal', // 图例方向 + // align: 'left', // 图例标记和文本的对齐,默认自动 + // top: 5, + // right: 20, + // itemWidth: 12, + // itemHeight: 12, + // padding: [0, 0, 0, 120], } }, }, @@ -151,7 +151,7 @@ */ gradient: { type: Boolean, - default: true, + default: false, }, /** * y轴最大值 @@ -172,7 +172,7 @@ */ smooth: { type: Boolean, - default: true, + default: false, }, }) @@ -192,9 +192,21 @@ ) // 构建option function buildOption() { - const option: lineOption = { + const option: any = { grid: props.grid, legend: props.legend, // 图例 + toolbox: { + show: true, + feature: { + dataZoom: { + yAxisIndex: 'none', + }, + dataView: { readOnly: false }, + magicType: { type: ['line', 'bar'] }, + restore: {}, + saveAsImage: {}, + }, + }, tooltip: { trigger: 'axis', textStyle: { @@ -213,7 +225,7 @@ xAxis: [ { type: props.xAxisType, - boundaryGap: true, + boundaryGap: false, axisLine: { lineStyle: { color: props.axisLineColor, // 轴线的颜色 @@ -223,20 +235,20 @@ color: props.fontColor, // X轴名称颜色 fontSize: 14, }, - splitLine: { - show: false, - lineStyle: { - color: ['#7a6b74'], - type: props.axisLineType, - }, - }, + // splitLine: { + // show: false, + // lineStyle: { + // color: ['#7a6b74'], + // type: props.axisLineType, + // }, + // }, }, ], yAxis: [ { name: props.unit, type: 'value', - boundaryGap: true, + // boundaryGap: true, axisLine: { show: false, lineStyle: { @@ -252,7 +264,7 @@ show: true, lineStyle: { color: ['#bfbfbf'], - type: 'dashed', + type: 'solid', }, }, }, @@ -285,15 +297,24 @@ // 遍历data, 拆分轴线名称,数据和颜色 for (const itemIndex in props.data) { const item = props.data[itemIndex] - const series: lineSeriesOption = { + const series: any = { name: item.name, // 线系列名 type: 'line', - symbol: 'none', // 去掉折线节点 + // symbol: 'none', // 去掉折线节点 smooth: props.smooth, // 曲线平滑设置 lineStyle: { width: 2, }, data: item.data, + markPoint: { + data: [ + { type: 'max', name: 'Max' }, + { type: 'min', name: 'Min' }, + ], + }, + markLine: { + data: [{ type: 'average', name: 'Avg' }], + }, } // 线段颜色 if (item.color || props.colors.length > 0) { @@ -341,7 +362,6 @@ chart.resize() } } - window.addEventListener('resize', () => { chart.resize() }) @@ -352,7 +372,11 @@ - diff --git a/src/components/ScanSampleDialog/scan-interface.ts b/src/components/ScanSampleDialog/scan-interface.ts deleted file mode 100644 index 1c3aa33..0000000 --- a/src/components/ScanSampleDialog/scan-interface.ts +++ /dev/null @@ -1,12 +0,0 @@ -export interface ISampleScan { - sampleId?: string // 样品id - sampleNo: string // 样品编号 - sampleName: string // 样品名称 - sampleModel: string // 样品型号 - manufacturingNo: string // 出厂编号 - customerNo: string // 委托方代码 - customerName: string // 委托方名称 - orderId: string // 委托书id - orderNo: string // 委托书编号 - labelBind: string // 标签绑定 -} diff --git a/src/components/drawer/approverDrawer.vue b/src/components/drawer/approverDrawer.vue deleted file mode 100644 index 6fdad69..0000000 --- a/src/components/drawer/approverDrawer.vue +++ /dev/null @@ -1,458 +0,0 @@ - - - - - - - - diff --git a/src/components/drawer/conditionDrawer.vue b/src/components/drawer/conditionDrawer.vue deleted file mode 100644 index 3746fe7..0000000 --- a/src/components/drawer/conditionDrawer.vue +++ /dev/null @@ -1,401 +0,0 @@ - - - - - - diff --git a/departments150.json b/departments150.json deleted file mode 100644 index aa6cc37..0000000 --- a/departments150.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "code": "200", - "msg": "操作成功", - "data": { - "childDepartments": [], - "employees": [{ - "id": "53128112", - "employeeName": "测试1", - "isLeave": "0", - "open": "false" - },{ - "id": "53128113", - "employeeName": "测试2", - "isLeave": "0", - "open": "false" - }], - "titleDepartments": [{ - "departmentId": "150", - "departmentKey": "RLXZB_V2", - "departmentName": "人力行政部", - "departmentNames": "人力行政部", - "id": "150", - "parentId": "0" - }] - } -} \ No newline at end of file diff --git a/plop-templates/component/index.hbs b/plop-templates/component/index.hbs deleted file mode 100644 index 162c0d3..0000000 --- a/plop-templates/component/index.hbs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/plop-templates/component/prompt.js b/plop-templates/component/prompt.js deleted file mode 100644 index 2b42bd2..0000000 --- a/plop-templates/component/prompt.js +++ /dev/null @@ -1,65 +0,0 @@ -const fs = require('fs') - -function getFolder(path) { - const components = [] - const files = fs.readdirSync(path) - files.forEach((item) => { - const stat = fs.lstatSync(`${path}/${item}`) - if (stat.isDirectory() === true && item !== 'components') { - components.push(`${path}/${item}`) - components.push(...getFolder(`${path}/${item}`)) - } - }) - return components -} - -module.exports = { - description: '创建组件', - prompts: [ - { - type: 'confirm', - name: 'isGlobal', - message: '是否为全局组件', - default: false, - }, - { - type: 'list', - name: 'path', - message: '请选择组件创建目录', - choices: getFolder('src/views'), - when: (answers) => { - return !answers.isGlobal - }, - }, - { - type: 'input', - name: 'name', - message: '请输入组件名称', - validate: (v) => { - if (!v || v.trim === '') { - return '组件名称不能为空' - } - else { - return true - } - }, - }, - ], - actions: (data) => { - let path = '' - if (data.isGlobal) { - path = 'src/components/{{properCase name}}/index.vue' - } - else { - path = `${data.path}/components/{{properCase name}}/index.vue` - } - const actions = [ - { - type: 'add', - path, - templateFile: 'plop-templates/component/index.hbs', - }, - ] - return actions - }, -} diff --git a/plop-templates/page/index.hbs b/plop-templates/page/index.hbs deleted file mode 100644 index acabfe3..0000000 --- a/plop-templates/page/index.hbs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/plop-templates/page/prompt.js b/plop-templates/page/prompt.js deleted file mode 100644 index 26c2d38..0000000 --- a/plop-templates/page/prompt.js +++ /dev/null @@ -1,54 +0,0 @@ -const path = require('path') -const fs = require('fs') - -function getFolder(path) { - const components = [] - const files = fs.readdirSync(path) - files.forEach((item) => { - const stat = fs.lstatSync(`${path}/${item}`) - if (stat.isDirectory() === true && item !== 'components') { - components.push(`${path}/${item}`) - components.push(...getFolder(`${path}/${item}`)) - } - }) - return components -} - -module.exports = { - description: '创建页面', - prompts: [ - { - type: 'list', - name: 'path', - message: '请选择页面创建目录', - choices: getFolder('src/views'), - }, - { - type: 'input', - name: 'name', - message: '请输入文件名', - validate: (v) => { - if (!v || v.trim === '') { - return '文件名不能为空' - } - else { - return true - } - }, - }, - ], - actions: (data) => { - const relativePath = path.relative('src/views', data.path) - const actions = [ - { - type: 'add', - path: `${data.path}/{{camelCase name}}.vue`, - templateFile: 'plop-templates/page/index.hbs', - data: { - componentName: `${relativePath} ${data.name}`, - }, - }, - ] - return actions - }, -} diff --git a/plop-templates/store/index.hbs b/plop-templates/store/index.hbs deleted file mode 100644 index b3336c5..0000000 --- a/plop-templates/store/index.hbs +++ /dev/null @@ -1,11 +0,0 @@ -const use{{ properCase name }}Store = defineStore( - // 唯一ID - '{{ camelCase name }}', - { - state: () => ({}), - getters: {}, - actions: {}, - }, -) - -export default use{{ properCase name }}Store diff --git a/plop-templates/store/prompt.js b/plop-templates/store/prompt.js deleted file mode 100644 index 2cefa24..0000000 --- a/plop-templates/store/prompt.js +++ /dev/null @@ -1,28 +0,0 @@ -module.exports = { - description: '创建全局状态', - prompts: [ - { - type: 'input', - name: 'name', - message: '请输入模块名称', - validate: (v) => { - if (!v || v.trim === '') { - return '模块名称不能为空' - } - else { - return true - } - }, - }, - ], - actions: () => { - const actions = [ - { - type: 'add', - path: 'src/store/modules/{{camelCase name}}.ts', - templateFile: 'plop-templates/store/index.hbs', - }, - ] - return actions - }, -} diff --git a/src/api/api/index.ts b/src/api/api/index.ts index 325777a..4541b77 100644 --- a/src/api/api/index.ts +++ b/src/api/api/index.ts @@ -265,7 +265,7 @@ // 设备监测趋势分析 export function getDeviceDetailAnalysis(params: object) { return request({ - url: '/deviceCollectionLog/detailAnalysis', + url: '/deviceCollectionLog/detail-analysis', method: 'get', params, }) diff --git a/src/components.d.ts b/src/components.d.ts index 419ee11..a1b0897 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -7,13 +7,10 @@ declare module '@vue/runtime-core' { export interface GlobalComponents { - AddNode: typeof import('./components/workFlow/addNode.vue')['default'] - AddNodeBan: typeof import('./components/workFlow/addNodeBan.vue')['default'] AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default'] AppContainer: typeof import('./components/AppContainer/index.vue')['default'] ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default'] ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default'] - ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default'] Auth: typeof import('./components/Auth/index.vue')['default'] AuthAll: typeof import('./components/AuthAll/index.vue')['default'] BarChartHorizontal: typeof import('./components/Echart/BarChartHorizontal.vue')['default'] @@ -23,10 +20,6 @@ BatchActionBar: typeof import('./components/BatchActionBar/index.vue')['default'] BenchCol: typeof import('./components/benchCol/index.vue')['default'] ButtonBox: typeof import('./components/buttonBox/buttonBox.vue')['default'] - CertificationMonitor: typeof import('./components/Sample/certificationMonitor.vue')['default'] - CertificationRecords: typeof import('./components/Sample/certificationRecords.vue')['default'] - ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default'] - CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default'] @@ -44,19 +37,14 @@ InfoWindow2: typeof import('./components/map/infoWindow2.vue')['default'] LineChart: typeof import('./components/Echart/LineChart.vue')['default'] Map: typeof import('./components/map/index.vue')['default'] - MeasureRecords: typeof import('./components/Sample/measureRecords.vue')['default'] - NodeWrap: typeof import('./components/workFlow/nodeWrap.vue')['default'] - NodeWrapBan: typeof import('./components/workFlow/nodeWrapBan.vue')['default'] NormalTable: typeof import('./components/NormalTable/index.vue')['default'] PageHeader: typeof import('./components/PageHeader/index.vue')['default'] PageMain: typeof import('./components/PageMain/index.vue')['default'] PcasCascader: typeof import('./components/PcasCascader/index.vue')['default'] PieChart: typeof import('./components/Echart/PieChart.vue')['default'] - PromoterDrawer: typeof import('./components/drawer/promoterDrawer.vue')['default'] QrDialog: typeof import('./components/QrDialog/index.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] - ScanSampleDialog: typeof import('./components/ScanSampleDialog/index.vue')['default'] SearchArea: typeof import('./components/SearchArea/index.vue')['default'] SearchBar: typeof import('./components/SearchBar/index.vue')['default'] SearchItem: typeof import('./components/SearchArea/SearchItem.vue')['default'] diff --git a/src/components/Echart/LineChart.vue b/src/components/Echart/LineChart.vue index 841e0cb..fefb873 100644 --- a/src/components/Echart/LineChart.vue +++ b/src/components/Echart/LineChart.vue @@ -45,14 +45,14 @@ default: () => { return { show: true, - icon: 'circle', - orient: 'vertile', // 图例方向 - align: 'left', // 图例标记和文本的对齐,默认自动 - top: 5, - right: 20, - itemWidth: 12, - itemHeight: 12, - padding: [0, 0, 0, 120], + // icon: 'circle', + orient: 'horizontal', // 图例方向 + // align: 'left', // 图例标记和文本的对齐,默认自动 + // top: 5, + // right: 20, + // itemWidth: 12, + // itemHeight: 12, + // padding: [0, 0, 0, 120], } }, }, @@ -151,7 +151,7 @@ */ gradient: { type: Boolean, - default: true, + default: false, }, /** * y轴最大值 @@ -172,7 +172,7 @@ */ smooth: { type: Boolean, - default: true, + default: false, }, }) @@ -192,9 +192,21 @@ ) // 构建option function buildOption() { - const option: lineOption = { + const option: any = { grid: props.grid, legend: props.legend, // 图例 + toolbox: { + show: true, + feature: { + dataZoom: { + yAxisIndex: 'none', + }, + dataView: { readOnly: false }, + magicType: { type: ['line', 'bar'] }, + restore: {}, + saveAsImage: {}, + }, + }, tooltip: { trigger: 'axis', textStyle: { @@ -213,7 +225,7 @@ xAxis: [ { type: props.xAxisType, - boundaryGap: true, + boundaryGap: false, axisLine: { lineStyle: { color: props.axisLineColor, // 轴线的颜色 @@ -223,20 +235,20 @@ color: props.fontColor, // X轴名称颜色 fontSize: 14, }, - splitLine: { - show: false, - lineStyle: { - color: ['#7a6b74'], - type: props.axisLineType, - }, - }, + // splitLine: { + // show: false, + // lineStyle: { + // color: ['#7a6b74'], + // type: props.axisLineType, + // }, + // }, }, ], yAxis: [ { name: props.unit, type: 'value', - boundaryGap: true, + // boundaryGap: true, axisLine: { show: false, lineStyle: { @@ -252,7 +264,7 @@ show: true, lineStyle: { color: ['#bfbfbf'], - type: 'dashed', + type: 'solid', }, }, }, @@ -285,15 +297,24 @@ // 遍历data, 拆分轴线名称,数据和颜色 for (const itemIndex in props.data) { const item = props.data[itemIndex] - const series: lineSeriesOption = { + const series: any = { name: item.name, // 线系列名 type: 'line', - symbol: 'none', // 去掉折线节点 + // symbol: 'none', // 去掉折线节点 smooth: props.smooth, // 曲线平滑设置 lineStyle: { width: 2, }, data: item.data, + markPoint: { + data: [ + { type: 'max', name: 'Max' }, + { type: 'min', name: 'Min' }, + ], + }, + markLine: { + data: [{ type: 'average', name: 'Avg' }], + }, } // 线段颜色 if (item.color || props.colors.length > 0) { @@ -341,7 +362,6 @@ chart.resize() } } - window.addEventListener('resize', () => { chart.resize() }) @@ -352,7 +372,11 @@ - diff --git a/src/components/ScanSampleDialog/scan-interface.ts b/src/components/ScanSampleDialog/scan-interface.ts deleted file mode 100644 index 1c3aa33..0000000 --- a/src/components/ScanSampleDialog/scan-interface.ts +++ /dev/null @@ -1,12 +0,0 @@ -export interface ISampleScan { - sampleId?: string // 样品id - sampleNo: string // 样品编号 - sampleName: string // 样品名称 - sampleModel: string // 样品型号 - manufacturingNo: string // 出厂编号 - customerNo: string // 委托方代码 - customerName: string // 委托方名称 - orderId: string // 委托书id - orderNo: string // 委托书编号 - labelBind: string // 标签绑定 -} diff --git a/src/components/drawer/approverDrawer.vue b/src/components/drawer/approverDrawer.vue deleted file mode 100644 index 6fdad69..0000000 --- a/src/components/drawer/approverDrawer.vue +++ /dev/null @@ -1,458 +0,0 @@ - - - - - - - - diff --git a/src/components/drawer/conditionDrawer.vue b/src/components/drawer/conditionDrawer.vue deleted file mode 100644 index 3746fe7..0000000 --- a/src/components/drawer/conditionDrawer.vue +++ /dev/null @@ -1,401 +0,0 @@ - - - - - - diff --git a/src/components/drawer/copyerDrawer.vue b/src/components/drawer/copyerDrawer.vue deleted file mode 100644 index e06bd1f..0000000 --- a/src/components/drawer/copyerDrawer.vue +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - - diff --git a/departments150.json b/departments150.json deleted file mode 100644 index aa6cc37..0000000 --- a/departments150.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "code": "200", - "msg": "操作成功", - "data": { - "childDepartments": [], - "employees": [{ - "id": "53128112", - "employeeName": "测试1", - "isLeave": "0", - "open": "false" - },{ - "id": "53128113", - "employeeName": "测试2", - "isLeave": "0", - "open": "false" - }], - "titleDepartments": [{ - "departmentId": "150", - "departmentKey": "RLXZB_V2", - "departmentName": "人力行政部", - "departmentNames": "人力行政部", - "id": "150", - "parentId": "0" - }] - } -} \ No newline at end of file diff --git a/plop-templates/component/index.hbs b/plop-templates/component/index.hbs deleted file mode 100644 index 162c0d3..0000000 --- a/plop-templates/component/index.hbs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/plop-templates/component/prompt.js b/plop-templates/component/prompt.js deleted file mode 100644 index 2b42bd2..0000000 --- a/plop-templates/component/prompt.js +++ /dev/null @@ -1,65 +0,0 @@ -const fs = require('fs') - -function getFolder(path) { - const components = [] - const files = fs.readdirSync(path) - files.forEach((item) => { - const stat = fs.lstatSync(`${path}/${item}`) - if (stat.isDirectory() === true && item !== 'components') { - components.push(`${path}/${item}`) - components.push(...getFolder(`${path}/${item}`)) - } - }) - return components -} - -module.exports = { - description: '创建组件', - prompts: [ - { - type: 'confirm', - name: 'isGlobal', - message: '是否为全局组件', - default: false, - }, - { - type: 'list', - name: 'path', - message: '请选择组件创建目录', - choices: getFolder('src/views'), - when: (answers) => { - return !answers.isGlobal - }, - }, - { - type: 'input', - name: 'name', - message: '请输入组件名称', - validate: (v) => { - if (!v || v.trim === '') { - return '组件名称不能为空' - } - else { - return true - } - }, - }, - ], - actions: (data) => { - let path = '' - if (data.isGlobal) { - path = 'src/components/{{properCase name}}/index.vue' - } - else { - path = `${data.path}/components/{{properCase name}}/index.vue` - } - const actions = [ - { - type: 'add', - path, - templateFile: 'plop-templates/component/index.hbs', - }, - ] - return actions - }, -} diff --git a/plop-templates/page/index.hbs b/plop-templates/page/index.hbs deleted file mode 100644 index acabfe3..0000000 --- a/plop-templates/page/index.hbs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/plop-templates/page/prompt.js b/plop-templates/page/prompt.js deleted file mode 100644 index 26c2d38..0000000 --- a/plop-templates/page/prompt.js +++ /dev/null @@ -1,54 +0,0 @@ -const path = require('path') -const fs = require('fs') - -function getFolder(path) { - const components = [] - const files = fs.readdirSync(path) - files.forEach((item) => { - const stat = fs.lstatSync(`${path}/${item}`) - if (stat.isDirectory() === true && item !== 'components') { - components.push(`${path}/${item}`) - components.push(...getFolder(`${path}/${item}`)) - } - }) - return components -} - -module.exports = { - description: '创建页面', - prompts: [ - { - type: 'list', - name: 'path', - message: '请选择页面创建目录', - choices: getFolder('src/views'), - }, - { - type: 'input', - name: 'name', - message: '请输入文件名', - validate: (v) => { - if (!v || v.trim === '') { - return '文件名不能为空' - } - else { - return true - } - }, - }, - ], - actions: (data) => { - const relativePath = path.relative('src/views', data.path) - const actions = [ - { - type: 'add', - path: `${data.path}/{{camelCase name}}.vue`, - templateFile: 'plop-templates/page/index.hbs', - data: { - componentName: `${relativePath} ${data.name}`, - }, - }, - ] - return actions - }, -} diff --git a/plop-templates/store/index.hbs b/plop-templates/store/index.hbs deleted file mode 100644 index b3336c5..0000000 --- a/plop-templates/store/index.hbs +++ /dev/null @@ -1,11 +0,0 @@ -const use{{ properCase name }}Store = defineStore( - // 唯一ID - '{{ camelCase name }}', - { - state: () => ({}), - getters: {}, - actions: {}, - }, -) - -export default use{{ properCase name }}Store diff --git a/plop-templates/store/prompt.js b/plop-templates/store/prompt.js deleted file mode 100644 index 2cefa24..0000000 --- a/plop-templates/store/prompt.js +++ /dev/null @@ -1,28 +0,0 @@ -module.exports = { - description: '创建全局状态', - prompts: [ - { - type: 'input', - name: 'name', - message: '请输入模块名称', - validate: (v) => { - if (!v || v.trim === '') { - return '模块名称不能为空' - } - else { - return true - } - }, - }, - ], - actions: () => { - const actions = [ - { - type: 'add', - path: 'src/store/modules/{{camelCase name}}.ts', - templateFile: 'plop-templates/store/index.hbs', - }, - ] - return actions - }, -} diff --git a/src/api/api/index.ts b/src/api/api/index.ts index 325777a..4541b77 100644 --- a/src/api/api/index.ts +++ b/src/api/api/index.ts @@ -265,7 +265,7 @@ // 设备监测趋势分析 export function getDeviceDetailAnalysis(params: object) { return request({ - url: '/deviceCollectionLog/detailAnalysis', + url: '/deviceCollectionLog/detail-analysis', method: 'get', params, }) diff --git a/src/components.d.ts b/src/components.d.ts index 419ee11..a1b0897 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -7,13 +7,10 @@ declare module '@vue/runtime-core' { export interface GlobalComponents { - AddNode: typeof import('./components/workFlow/addNode.vue')['default'] - AddNodeBan: typeof import('./components/workFlow/addNodeBan.vue')['default'] AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default'] AppContainer: typeof import('./components/AppContainer/index.vue')['default'] ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default'] ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default'] - ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default'] Auth: typeof import('./components/Auth/index.vue')['default'] AuthAll: typeof import('./components/AuthAll/index.vue')['default'] BarChartHorizontal: typeof import('./components/Echart/BarChartHorizontal.vue')['default'] @@ -23,10 +20,6 @@ BatchActionBar: typeof import('./components/BatchActionBar/index.vue')['default'] BenchCol: typeof import('./components/benchCol/index.vue')['default'] ButtonBox: typeof import('./components/buttonBox/buttonBox.vue')['default'] - CertificationMonitor: typeof import('./components/Sample/certificationMonitor.vue')['default'] - CertificationRecords: typeof import('./components/Sample/certificationRecords.vue')['default'] - ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default'] - CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default'] @@ -44,19 +37,14 @@ InfoWindow2: typeof import('./components/map/infoWindow2.vue')['default'] LineChart: typeof import('./components/Echart/LineChart.vue')['default'] Map: typeof import('./components/map/index.vue')['default'] - MeasureRecords: typeof import('./components/Sample/measureRecords.vue')['default'] - NodeWrap: typeof import('./components/workFlow/nodeWrap.vue')['default'] - NodeWrapBan: typeof import('./components/workFlow/nodeWrapBan.vue')['default'] NormalTable: typeof import('./components/NormalTable/index.vue')['default'] PageHeader: typeof import('./components/PageHeader/index.vue')['default'] PageMain: typeof import('./components/PageMain/index.vue')['default'] PcasCascader: typeof import('./components/PcasCascader/index.vue')['default'] PieChart: typeof import('./components/Echart/PieChart.vue')['default'] - PromoterDrawer: typeof import('./components/drawer/promoterDrawer.vue')['default'] QrDialog: typeof import('./components/QrDialog/index.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] - ScanSampleDialog: typeof import('./components/ScanSampleDialog/index.vue')['default'] SearchArea: typeof import('./components/SearchArea/index.vue')['default'] SearchBar: typeof import('./components/SearchBar/index.vue')['default'] SearchItem: typeof import('./components/SearchArea/SearchItem.vue')['default'] diff --git a/src/components/Echart/LineChart.vue b/src/components/Echart/LineChart.vue index 841e0cb..fefb873 100644 --- a/src/components/Echart/LineChart.vue +++ b/src/components/Echart/LineChart.vue @@ -45,14 +45,14 @@ default: () => { return { show: true, - icon: 'circle', - orient: 'vertile', // 图例方向 - align: 'left', // 图例标记和文本的对齐,默认自动 - top: 5, - right: 20, - itemWidth: 12, - itemHeight: 12, - padding: [0, 0, 0, 120], + // icon: 'circle', + orient: 'horizontal', // 图例方向 + // align: 'left', // 图例标记和文本的对齐,默认自动 + // top: 5, + // right: 20, + // itemWidth: 12, + // itemHeight: 12, + // padding: [0, 0, 0, 120], } }, }, @@ -151,7 +151,7 @@ */ gradient: { type: Boolean, - default: true, + default: false, }, /** * y轴最大值 @@ -172,7 +172,7 @@ */ smooth: { type: Boolean, - default: true, + default: false, }, }) @@ -192,9 +192,21 @@ ) // 构建option function buildOption() { - const option: lineOption = { + const option: any = { grid: props.grid, legend: props.legend, // 图例 + toolbox: { + show: true, + feature: { + dataZoom: { + yAxisIndex: 'none', + }, + dataView: { readOnly: false }, + magicType: { type: ['line', 'bar'] }, + restore: {}, + saveAsImage: {}, + }, + }, tooltip: { trigger: 'axis', textStyle: { @@ -213,7 +225,7 @@ xAxis: [ { type: props.xAxisType, - boundaryGap: true, + boundaryGap: false, axisLine: { lineStyle: { color: props.axisLineColor, // 轴线的颜色 @@ -223,20 +235,20 @@ color: props.fontColor, // X轴名称颜色 fontSize: 14, }, - splitLine: { - show: false, - lineStyle: { - color: ['#7a6b74'], - type: props.axisLineType, - }, - }, + // splitLine: { + // show: false, + // lineStyle: { + // color: ['#7a6b74'], + // type: props.axisLineType, + // }, + // }, }, ], yAxis: [ { name: props.unit, type: 'value', - boundaryGap: true, + // boundaryGap: true, axisLine: { show: false, lineStyle: { @@ -252,7 +264,7 @@ show: true, lineStyle: { color: ['#bfbfbf'], - type: 'dashed', + type: 'solid', }, }, }, @@ -285,15 +297,24 @@ // 遍历data, 拆分轴线名称,数据和颜色 for (const itemIndex in props.data) { const item = props.data[itemIndex] - const series: lineSeriesOption = { + const series: any = { name: item.name, // 线系列名 type: 'line', - symbol: 'none', // 去掉折线节点 + // symbol: 'none', // 去掉折线节点 smooth: props.smooth, // 曲线平滑设置 lineStyle: { width: 2, }, data: item.data, + markPoint: { + data: [ + { type: 'max', name: 'Max' }, + { type: 'min', name: 'Min' }, + ], + }, + markLine: { + data: [{ type: 'average', name: 'Avg' }], + }, } // 线段颜色 if (item.color || props.colors.length > 0) { @@ -341,7 +362,6 @@ chart.resize() } } - window.addEventListener('resize', () => { chart.resize() }) @@ -352,7 +372,11 @@ - diff --git a/src/components/ScanSampleDialog/scan-interface.ts b/src/components/ScanSampleDialog/scan-interface.ts deleted file mode 100644 index 1c3aa33..0000000 --- a/src/components/ScanSampleDialog/scan-interface.ts +++ /dev/null @@ -1,12 +0,0 @@ -export interface ISampleScan { - sampleId?: string // 样品id - sampleNo: string // 样品编号 - sampleName: string // 样品名称 - sampleModel: string // 样品型号 - manufacturingNo: string // 出厂编号 - customerNo: string // 委托方代码 - customerName: string // 委托方名称 - orderId: string // 委托书id - orderNo: string // 委托书编号 - labelBind: string // 标签绑定 -} diff --git a/src/components/drawer/approverDrawer.vue b/src/components/drawer/approverDrawer.vue deleted file mode 100644 index 6fdad69..0000000 --- a/src/components/drawer/approverDrawer.vue +++ /dev/null @@ -1,458 +0,0 @@ - - - - - - - - diff --git a/src/components/drawer/conditionDrawer.vue b/src/components/drawer/conditionDrawer.vue deleted file mode 100644 index 3746fe7..0000000 --- a/src/components/drawer/conditionDrawer.vue +++ /dev/null @@ -1,401 +0,0 @@ - - - - - - diff --git a/src/components/drawer/copyerDrawer.vue b/src/components/drawer/copyerDrawer.vue deleted file mode 100644 index e06bd1f..0000000 --- a/src/components/drawer/copyerDrawer.vue +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - - diff --git a/src/components/drawer/promoterDrawer.vue b/src/components/drawer/promoterDrawer.vue deleted file mode 100644 index bdf885c..0000000 --- a/src/components/drawer/promoterDrawer.vue +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - diff --git a/departments150.json b/departments150.json deleted file mode 100644 index aa6cc37..0000000 --- a/departments150.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "code": "200", - "msg": "操作成功", - "data": { - "childDepartments": [], - "employees": [{ - "id": "53128112", - "employeeName": "测试1", - "isLeave": "0", - "open": "false" - },{ - "id": "53128113", - "employeeName": "测试2", - "isLeave": "0", - "open": "false" - }], - "titleDepartments": [{ - "departmentId": "150", - "departmentKey": "RLXZB_V2", - "departmentName": "人力行政部", - "departmentNames": "人力行政部", - "id": "150", - "parentId": "0" - }] - } -} \ No newline at end of file diff --git a/plop-templates/component/index.hbs b/plop-templates/component/index.hbs deleted file mode 100644 index 162c0d3..0000000 --- a/plop-templates/component/index.hbs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/plop-templates/component/prompt.js b/plop-templates/component/prompt.js deleted file mode 100644 index 2b42bd2..0000000 --- a/plop-templates/component/prompt.js +++ /dev/null @@ -1,65 +0,0 @@ -const fs = require('fs') - -function getFolder(path) { - const components = [] - const files = fs.readdirSync(path) - files.forEach((item) => { - const stat = fs.lstatSync(`${path}/${item}`) - if (stat.isDirectory() === true && item !== 'components') { - components.push(`${path}/${item}`) - components.push(...getFolder(`${path}/${item}`)) - } - }) - return components -} - -module.exports = { - description: '创建组件', - prompts: [ - { - type: 'confirm', - name: 'isGlobal', - message: '是否为全局组件', - default: false, - }, - { - type: 'list', - name: 'path', - message: '请选择组件创建目录', - choices: getFolder('src/views'), - when: (answers) => { - return !answers.isGlobal - }, - }, - { - type: 'input', - name: 'name', - message: '请输入组件名称', - validate: (v) => { - if (!v || v.trim === '') { - return '组件名称不能为空' - } - else { - return true - } - }, - }, - ], - actions: (data) => { - let path = '' - if (data.isGlobal) { - path = 'src/components/{{properCase name}}/index.vue' - } - else { - path = `${data.path}/components/{{properCase name}}/index.vue` - } - const actions = [ - { - type: 'add', - path, - templateFile: 'plop-templates/component/index.hbs', - }, - ] - return actions - }, -} diff --git a/plop-templates/page/index.hbs b/plop-templates/page/index.hbs deleted file mode 100644 index acabfe3..0000000 --- a/plop-templates/page/index.hbs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/plop-templates/page/prompt.js b/plop-templates/page/prompt.js deleted file mode 100644 index 26c2d38..0000000 --- a/plop-templates/page/prompt.js +++ /dev/null @@ -1,54 +0,0 @@ -const path = require('path') -const fs = require('fs') - -function getFolder(path) { - const components = [] - const files = fs.readdirSync(path) - files.forEach((item) => { - const stat = fs.lstatSync(`${path}/${item}`) - if (stat.isDirectory() === true && item !== 'components') { - components.push(`${path}/${item}`) - components.push(...getFolder(`${path}/${item}`)) - } - }) - return components -} - -module.exports = { - description: '创建页面', - prompts: [ - { - type: 'list', - name: 'path', - message: '请选择页面创建目录', - choices: getFolder('src/views'), - }, - { - type: 'input', - name: 'name', - message: '请输入文件名', - validate: (v) => { - if (!v || v.trim === '') { - return '文件名不能为空' - } - else { - return true - } - }, - }, - ], - actions: (data) => { - const relativePath = path.relative('src/views', data.path) - const actions = [ - { - type: 'add', - path: `${data.path}/{{camelCase name}}.vue`, - templateFile: 'plop-templates/page/index.hbs', - data: { - componentName: `${relativePath} ${data.name}`, - }, - }, - ] - return actions - }, -} diff --git a/plop-templates/store/index.hbs b/plop-templates/store/index.hbs deleted file mode 100644 index b3336c5..0000000 --- a/plop-templates/store/index.hbs +++ /dev/null @@ -1,11 +0,0 @@ -const use{{ properCase name }}Store = defineStore( - // 唯一ID - '{{ camelCase name }}', - { - state: () => ({}), - getters: {}, - actions: {}, - }, -) - -export default use{{ properCase name }}Store diff --git a/plop-templates/store/prompt.js b/plop-templates/store/prompt.js deleted file mode 100644 index 2cefa24..0000000 --- a/plop-templates/store/prompt.js +++ /dev/null @@ -1,28 +0,0 @@ -module.exports = { - description: '创建全局状态', - prompts: [ - { - type: 'input', - name: 'name', - message: '请输入模块名称', - validate: (v) => { - if (!v || v.trim === '') { - return '模块名称不能为空' - } - else { - return true - } - }, - }, - ], - actions: () => { - const actions = [ - { - type: 'add', - path: 'src/store/modules/{{camelCase name}}.ts', - templateFile: 'plop-templates/store/index.hbs', - }, - ] - return actions - }, -} diff --git a/src/api/api/index.ts b/src/api/api/index.ts index 325777a..4541b77 100644 --- a/src/api/api/index.ts +++ b/src/api/api/index.ts @@ -265,7 +265,7 @@ // 设备监测趋势分析 export function getDeviceDetailAnalysis(params: object) { return request({ - url: '/deviceCollectionLog/detailAnalysis', + url: '/deviceCollectionLog/detail-analysis', method: 'get', params, }) diff --git a/src/components.d.ts b/src/components.d.ts index 419ee11..a1b0897 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -7,13 +7,10 @@ declare module '@vue/runtime-core' { export interface GlobalComponents { - AddNode: typeof import('./components/workFlow/addNode.vue')['default'] - AddNodeBan: typeof import('./components/workFlow/addNodeBan.vue')['default'] AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default'] AppContainer: typeof import('./components/AppContainer/index.vue')['default'] ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default'] ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default'] - ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default'] Auth: typeof import('./components/Auth/index.vue')['default'] AuthAll: typeof import('./components/AuthAll/index.vue')['default'] BarChartHorizontal: typeof import('./components/Echart/BarChartHorizontal.vue')['default'] @@ -23,10 +20,6 @@ BatchActionBar: typeof import('./components/BatchActionBar/index.vue')['default'] BenchCol: typeof import('./components/benchCol/index.vue')['default'] ButtonBox: typeof import('./components/buttonBox/buttonBox.vue')['default'] - CertificationMonitor: typeof import('./components/Sample/certificationMonitor.vue')['default'] - CertificationRecords: typeof import('./components/Sample/certificationRecords.vue')['default'] - ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default'] - CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default'] @@ -44,19 +37,14 @@ InfoWindow2: typeof import('./components/map/infoWindow2.vue')['default'] LineChart: typeof import('./components/Echart/LineChart.vue')['default'] Map: typeof import('./components/map/index.vue')['default'] - MeasureRecords: typeof import('./components/Sample/measureRecords.vue')['default'] - NodeWrap: typeof import('./components/workFlow/nodeWrap.vue')['default'] - NodeWrapBan: typeof import('./components/workFlow/nodeWrapBan.vue')['default'] NormalTable: typeof import('./components/NormalTable/index.vue')['default'] PageHeader: typeof import('./components/PageHeader/index.vue')['default'] PageMain: typeof import('./components/PageMain/index.vue')['default'] PcasCascader: typeof import('./components/PcasCascader/index.vue')['default'] PieChart: typeof import('./components/Echart/PieChart.vue')['default'] - PromoterDrawer: typeof import('./components/drawer/promoterDrawer.vue')['default'] QrDialog: typeof import('./components/QrDialog/index.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] - ScanSampleDialog: typeof import('./components/ScanSampleDialog/index.vue')['default'] SearchArea: typeof import('./components/SearchArea/index.vue')['default'] SearchBar: typeof import('./components/SearchBar/index.vue')['default'] SearchItem: typeof import('./components/SearchArea/SearchItem.vue')['default'] diff --git a/src/components/Echart/LineChart.vue b/src/components/Echart/LineChart.vue index 841e0cb..fefb873 100644 --- a/src/components/Echart/LineChart.vue +++ b/src/components/Echart/LineChart.vue @@ -45,14 +45,14 @@ default: () => { return { show: true, - icon: 'circle', - orient: 'vertile', // 图例方向 - align: 'left', // 图例标记和文本的对齐,默认自动 - top: 5, - right: 20, - itemWidth: 12, - itemHeight: 12, - padding: [0, 0, 0, 120], + // icon: 'circle', + orient: 'horizontal', // 图例方向 + // align: 'left', // 图例标记和文本的对齐,默认自动 + // top: 5, + // right: 20, + // itemWidth: 12, + // itemHeight: 12, + // padding: [0, 0, 0, 120], } }, }, @@ -151,7 +151,7 @@ */ gradient: { type: Boolean, - default: true, + default: false, }, /** * y轴最大值 @@ -172,7 +172,7 @@ */ smooth: { type: Boolean, - default: true, + default: false, }, }) @@ -192,9 +192,21 @@ ) // 构建option function buildOption() { - const option: lineOption = { + const option: any = { grid: props.grid, legend: props.legend, // 图例 + toolbox: { + show: true, + feature: { + dataZoom: { + yAxisIndex: 'none', + }, + dataView: { readOnly: false }, + magicType: { type: ['line', 'bar'] }, + restore: {}, + saveAsImage: {}, + }, + }, tooltip: { trigger: 'axis', textStyle: { @@ -213,7 +225,7 @@ xAxis: [ { type: props.xAxisType, - boundaryGap: true, + boundaryGap: false, axisLine: { lineStyle: { color: props.axisLineColor, // 轴线的颜色 @@ -223,20 +235,20 @@ color: props.fontColor, // X轴名称颜色 fontSize: 14, }, - splitLine: { - show: false, - lineStyle: { - color: ['#7a6b74'], - type: props.axisLineType, - }, - }, + // splitLine: { + // show: false, + // lineStyle: { + // color: ['#7a6b74'], + // type: props.axisLineType, + // }, + // }, }, ], yAxis: [ { name: props.unit, type: 'value', - boundaryGap: true, + // boundaryGap: true, axisLine: { show: false, lineStyle: { @@ -252,7 +264,7 @@ show: true, lineStyle: { color: ['#bfbfbf'], - type: 'dashed', + type: 'solid', }, }, }, @@ -285,15 +297,24 @@ // 遍历data, 拆分轴线名称,数据和颜色 for (const itemIndex in props.data) { const item = props.data[itemIndex] - const series: lineSeriesOption = { + const series: any = { name: item.name, // 线系列名 type: 'line', - symbol: 'none', // 去掉折线节点 + // symbol: 'none', // 去掉折线节点 smooth: props.smooth, // 曲线平滑设置 lineStyle: { width: 2, }, data: item.data, + markPoint: { + data: [ + { type: 'max', name: 'Max' }, + { type: 'min', name: 'Min' }, + ], + }, + markLine: { + data: [{ type: 'average', name: 'Avg' }], + }, } // 线段颜色 if (item.color || props.colors.length > 0) { @@ -341,7 +362,6 @@ chart.resize() } } - window.addEventListener('resize', () => { chart.resize() }) @@ -352,7 +372,11 @@ - diff --git a/src/components/ScanSampleDialog/scan-interface.ts b/src/components/ScanSampleDialog/scan-interface.ts deleted file mode 100644 index 1c3aa33..0000000 --- a/src/components/ScanSampleDialog/scan-interface.ts +++ /dev/null @@ -1,12 +0,0 @@ -export interface ISampleScan { - sampleId?: string // 样品id - sampleNo: string // 样品编号 - sampleName: string // 样品名称 - sampleModel: string // 样品型号 - manufacturingNo: string // 出厂编号 - customerNo: string // 委托方代码 - customerName: string // 委托方名称 - orderId: string // 委托书id - orderNo: string // 委托书编号 - labelBind: string // 标签绑定 -} diff --git a/src/components/drawer/approverDrawer.vue b/src/components/drawer/approverDrawer.vue deleted file mode 100644 index 6fdad69..0000000 --- a/src/components/drawer/approverDrawer.vue +++ /dev/null @@ -1,458 +0,0 @@ - - - - - - - - diff --git a/src/components/drawer/conditionDrawer.vue b/src/components/drawer/conditionDrawer.vue deleted file mode 100644 index 3746fe7..0000000 --- a/src/components/drawer/conditionDrawer.vue +++ /dev/null @@ -1,401 +0,0 @@ - - - - - - diff --git a/src/components/drawer/copyerDrawer.vue b/src/components/drawer/copyerDrawer.vue deleted file mode 100644 index e06bd1f..0000000 --- a/src/components/drawer/copyerDrawer.vue +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - - diff --git a/src/components/drawer/promoterDrawer.vue b/src/components/drawer/promoterDrawer.vue deleted file mode 100644 index bdf885c..0000000 --- a/src/components/drawer/promoterDrawer.vue +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - diff --git a/src/components/workFlow/addNode.vue b/src/components/workFlow/addNode.vue deleted file mode 100644 index b773386..0000000 --- a/src/components/workFlow/addNode.vue +++ /dev/null @@ -1,243 +0,0 @@ - - - - - - - diff --git a/departments150.json b/departments150.json deleted file mode 100644 index aa6cc37..0000000 --- a/departments150.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "code": "200", - "msg": "操作成功", - "data": { - "childDepartments": [], - "employees": [{ - "id": "53128112", - "employeeName": "测试1", - "isLeave": "0", - "open": "false" - },{ - "id": "53128113", - "employeeName": "测试2", - "isLeave": "0", - "open": "false" - }], - "titleDepartments": [{ - "departmentId": "150", - "departmentKey": "RLXZB_V2", - "departmentName": "人力行政部", - "departmentNames": "人力行政部", - "id": "150", - "parentId": "0" - }] - } -} \ No newline at end of file diff --git a/plop-templates/component/index.hbs b/plop-templates/component/index.hbs deleted file mode 100644 index 162c0d3..0000000 --- a/plop-templates/component/index.hbs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/plop-templates/component/prompt.js b/plop-templates/component/prompt.js deleted file mode 100644 index 2b42bd2..0000000 --- a/plop-templates/component/prompt.js +++ /dev/null @@ -1,65 +0,0 @@ -const fs = require('fs') - -function getFolder(path) { - const components = [] - const files = fs.readdirSync(path) - files.forEach((item) => { - const stat = fs.lstatSync(`${path}/${item}`) - if (stat.isDirectory() === true && item !== 'components') { - components.push(`${path}/${item}`) - components.push(...getFolder(`${path}/${item}`)) - } - }) - return components -} - -module.exports = { - description: '创建组件', - prompts: [ - { - type: 'confirm', - name: 'isGlobal', - message: '是否为全局组件', - default: false, - }, - { - type: 'list', - name: 'path', - message: '请选择组件创建目录', - choices: getFolder('src/views'), - when: (answers) => { - return !answers.isGlobal - }, - }, - { - type: 'input', - name: 'name', - message: '请输入组件名称', - validate: (v) => { - if (!v || v.trim === '') { - return '组件名称不能为空' - } - else { - return true - } - }, - }, - ], - actions: (data) => { - let path = '' - if (data.isGlobal) { - path = 'src/components/{{properCase name}}/index.vue' - } - else { - path = `${data.path}/components/{{properCase name}}/index.vue` - } - const actions = [ - { - type: 'add', - path, - templateFile: 'plop-templates/component/index.hbs', - }, - ] - return actions - }, -} diff --git a/plop-templates/page/index.hbs b/plop-templates/page/index.hbs deleted file mode 100644 index acabfe3..0000000 --- a/plop-templates/page/index.hbs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/plop-templates/page/prompt.js b/plop-templates/page/prompt.js deleted file mode 100644 index 26c2d38..0000000 --- a/plop-templates/page/prompt.js +++ /dev/null @@ -1,54 +0,0 @@ -const path = require('path') -const fs = require('fs') - -function getFolder(path) { - const components = [] - const files = fs.readdirSync(path) - files.forEach((item) => { - const stat = fs.lstatSync(`${path}/${item}`) - if (stat.isDirectory() === true && item !== 'components') { - components.push(`${path}/${item}`) - components.push(...getFolder(`${path}/${item}`)) - } - }) - return components -} - -module.exports = { - description: '创建页面', - prompts: [ - { - type: 'list', - name: 'path', - message: '请选择页面创建目录', - choices: getFolder('src/views'), - }, - { - type: 'input', - name: 'name', - message: '请输入文件名', - validate: (v) => { - if (!v || v.trim === '') { - return '文件名不能为空' - } - else { - return true - } - }, - }, - ], - actions: (data) => { - const relativePath = path.relative('src/views', data.path) - const actions = [ - { - type: 'add', - path: `${data.path}/{{camelCase name}}.vue`, - templateFile: 'plop-templates/page/index.hbs', - data: { - componentName: `${relativePath} ${data.name}`, - }, - }, - ] - return actions - }, -} diff --git a/plop-templates/store/index.hbs b/plop-templates/store/index.hbs deleted file mode 100644 index b3336c5..0000000 --- a/plop-templates/store/index.hbs +++ /dev/null @@ -1,11 +0,0 @@ -const use{{ properCase name }}Store = defineStore( - // 唯一ID - '{{ camelCase name }}', - { - state: () => ({}), - getters: {}, - actions: {}, - }, -) - -export default use{{ properCase name }}Store diff --git a/plop-templates/store/prompt.js b/plop-templates/store/prompt.js deleted file mode 100644 index 2cefa24..0000000 --- a/plop-templates/store/prompt.js +++ /dev/null @@ -1,28 +0,0 @@ -module.exports = { - description: '创建全局状态', - prompts: [ - { - type: 'input', - name: 'name', - message: '请输入模块名称', - validate: (v) => { - if (!v || v.trim === '') { - return '模块名称不能为空' - } - else { - return true - } - }, - }, - ], - actions: () => { - const actions = [ - { - type: 'add', - path: 'src/store/modules/{{camelCase name}}.ts', - templateFile: 'plop-templates/store/index.hbs', - }, - ] - return actions - }, -} diff --git a/src/api/api/index.ts b/src/api/api/index.ts index 325777a..4541b77 100644 --- a/src/api/api/index.ts +++ b/src/api/api/index.ts @@ -265,7 +265,7 @@ // 设备监测趋势分析 export function getDeviceDetailAnalysis(params: object) { return request({ - url: '/deviceCollectionLog/detailAnalysis', + url: '/deviceCollectionLog/detail-analysis', method: 'get', params, }) diff --git a/src/components.d.ts b/src/components.d.ts index 419ee11..a1b0897 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -7,13 +7,10 @@ declare module '@vue/runtime-core' { export interface GlobalComponents { - AddNode: typeof import('./components/workFlow/addNode.vue')['default'] - AddNodeBan: typeof import('./components/workFlow/addNodeBan.vue')['default'] AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default'] AppContainer: typeof import('./components/AppContainer/index.vue')['default'] ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default'] ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default'] - ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default'] Auth: typeof import('./components/Auth/index.vue')['default'] AuthAll: typeof import('./components/AuthAll/index.vue')['default'] BarChartHorizontal: typeof import('./components/Echart/BarChartHorizontal.vue')['default'] @@ -23,10 +20,6 @@ BatchActionBar: typeof import('./components/BatchActionBar/index.vue')['default'] BenchCol: typeof import('./components/benchCol/index.vue')['default'] ButtonBox: typeof import('./components/buttonBox/buttonBox.vue')['default'] - CertificationMonitor: typeof import('./components/Sample/certificationMonitor.vue')['default'] - CertificationRecords: typeof import('./components/Sample/certificationRecords.vue')['default'] - ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default'] - CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default'] @@ -44,19 +37,14 @@ InfoWindow2: typeof import('./components/map/infoWindow2.vue')['default'] LineChart: typeof import('./components/Echart/LineChart.vue')['default'] Map: typeof import('./components/map/index.vue')['default'] - MeasureRecords: typeof import('./components/Sample/measureRecords.vue')['default'] - NodeWrap: typeof import('./components/workFlow/nodeWrap.vue')['default'] - NodeWrapBan: typeof import('./components/workFlow/nodeWrapBan.vue')['default'] NormalTable: typeof import('./components/NormalTable/index.vue')['default'] PageHeader: typeof import('./components/PageHeader/index.vue')['default'] PageMain: typeof import('./components/PageMain/index.vue')['default'] PcasCascader: typeof import('./components/PcasCascader/index.vue')['default'] PieChart: typeof import('./components/Echart/PieChart.vue')['default'] - PromoterDrawer: typeof import('./components/drawer/promoterDrawer.vue')['default'] QrDialog: typeof import('./components/QrDialog/index.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] - ScanSampleDialog: typeof import('./components/ScanSampleDialog/index.vue')['default'] SearchArea: typeof import('./components/SearchArea/index.vue')['default'] SearchBar: typeof import('./components/SearchBar/index.vue')['default'] SearchItem: typeof import('./components/SearchArea/SearchItem.vue')['default'] diff --git a/src/components/Echart/LineChart.vue b/src/components/Echart/LineChart.vue index 841e0cb..fefb873 100644 --- a/src/components/Echart/LineChart.vue +++ b/src/components/Echart/LineChart.vue @@ -45,14 +45,14 @@ default: () => { return { show: true, - icon: 'circle', - orient: 'vertile', // 图例方向 - align: 'left', // 图例标记和文本的对齐,默认自动 - top: 5, - right: 20, - itemWidth: 12, - itemHeight: 12, - padding: [0, 0, 0, 120], + // icon: 'circle', + orient: 'horizontal', // 图例方向 + // align: 'left', // 图例标记和文本的对齐,默认自动 + // top: 5, + // right: 20, + // itemWidth: 12, + // itemHeight: 12, + // padding: [0, 0, 0, 120], } }, }, @@ -151,7 +151,7 @@ */ gradient: { type: Boolean, - default: true, + default: false, }, /** * y轴最大值 @@ -172,7 +172,7 @@ */ smooth: { type: Boolean, - default: true, + default: false, }, }) @@ -192,9 +192,21 @@ ) // 构建option function buildOption() { - const option: lineOption = { + const option: any = { grid: props.grid, legend: props.legend, // 图例 + toolbox: { + show: true, + feature: { + dataZoom: { + yAxisIndex: 'none', + }, + dataView: { readOnly: false }, + magicType: { type: ['line', 'bar'] }, + restore: {}, + saveAsImage: {}, + }, + }, tooltip: { trigger: 'axis', textStyle: { @@ -213,7 +225,7 @@ xAxis: [ { type: props.xAxisType, - boundaryGap: true, + boundaryGap: false, axisLine: { lineStyle: { color: props.axisLineColor, // 轴线的颜色 @@ -223,20 +235,20 @@ color: props.fontColor, // X轴名称颜色 fontSize: 14, }, - splitLine: { - show: false, - lineStyle: { - color: ['#7a6b74'], - type: props.axisLineType, - }, - }, + // splitLine: { + // show: false, + // lineStyle: { + // color: ['#7a6b74'], + // type: props.axisLineType, + // }, + // }, }, ], yAxis: [ { name: props.unit, type: 'value', - boundaryGap: true, + // boundaryGap: true, axisLine: { show: false, lineStyle: { @@ -252,7 +264,7 @@ show: true, lineStyle: { color: ['#bfbfbf'], - type: 'dashed', + type: 'solid', }, }, }, @@ -285,15 +297,24 @@ // 遍历data, 拆分轴线名称,数据和颜色 for (const itemIndex in props.data) { const item = props.data[itemIndex] - const series: lineSeriesOption = { + const series: any = { name: item.name, // 线系列名 type: 'line', - symbol: 'none', // 去掉折线节点 + // symbol: 'none', // 去掉折线节点 smooth: props.smooth, // 曲线平滑设置 lineStyle: { width: 2, }, data: item.data, + markPoint: { + data: [ + { type: 'max', name: 'Max' }, + { type: 'min', name: 'Min' }, + ], + }, + markLine: { + data: [{ type: 'average', name: 'Avg' }], + }, } // 线段颜色 if (item.color || props.colors.length > 0) { @@ -341,7 +362,6 @@ chart.resize() } } - window.addEventListener('resize', () => { chart.resize() }) @@ -352,7 +372,11 @@ - diff --git a/src/components/ScanSampleDialog/scan-interface.ts b/src/components/ScanSampleDialog/scan-interface.ts deleted file mode 100644 index 1c3aa33..0000000 --- a/src/components/ScanSampleDialog/scan-interface.ts +++ /dev/null @@ -1,12 +0,0 @@ -export interface ISampleScan { - sampleId?: string // 样品id - sampleNo: string // 样品编号 - sampleName: string // 样品名称 - sampleModel: string // 样品型号 - manufacturingNo: string // 出厂编号 - customerNo: string // 委托方代码 - customerName: string // 委托方名称 - orderId: string // 委托书id - orderNo: string // 委托书编号 - labelBind: string // 标签绑定 -} diff --git a/src/components/drawer/approverDrawer.vue b/src/components/drawer/approverDrawer.vue deleted file mode 100644 index 6fdad69..0000000 --- a/src/components/drawer/approverDrawer.vue +++ /dev/null @@ -1,458 +0,0 @@ - - - - - - - - diff --git a/src/components/drawer/conditionDrawer.vue b/src/components/drawer/conditionDrawer.vue deleted file mode 100644 index 3746fe7..0000000 --- a/src/components/drawer/conditionDrawer.vue +++ /dev/null @@ -1,401 +0,0 @@ - - - - - - diff --git a/src/components/drawer/copyerDrawer.vue b/src/components/drawer/copyerDrawer.vue deleted file mode 100644 index e06bd1f..0000000 --- a/src/components/drawer/copyerDrawer.vue +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - - diff --git a/src/components/drawer/promoterDrawer.vue b/src/components/drawer/promoterDrawer.vue deleted file mode 100644 index bdf885c..0000000 --- a/src/components/drawer/promoterDrawer.vue +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - diff --git a/src/components/workFlow/addNode.vue b/src/components/workFlow/addNode.vue deleted file mode 100644 index b773386..0000000 --- a/src/components/workFlow/addNode.vue +++ /dev/null @@ -1,243 +0,0 @@ - - - - - - - diff --git a/src/components/workFlow/addNodeBan.vue b/src/components/workFlow/addNodeBan.vue deleted file mode 100644 index 95a601f..0000000 --- a/src/components/workFlow/addNodeBan.vue +++ /dev/null @@ -1,235 +0,0 @@ - - - - - - - diff --git a/departments150.json b/departments150.json deleted file mode 100644 index aa6cc37..0000000 --- a/departments150.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "code": "200", - "msg": "操作成功", - "data": { - "childDepartments": [], - "employees": [{ - "id": "53128112", - "employeeName": "测试1", - "isLeave": "0", - "open": "false" - },{ - "id": "53128113", - "employeeName": "测试2", - "isLeave": "0", - "open": "false" - }], - "titleDepartments": [{ - "departmentId": "150", - "departmentKey": "RLXZB_V2", - "departmentName": "人力行政部", - "departmentNames": "人力行政部", - "id": "150", - "parentId": "0" - }] - } -} \ No newline at end of file diff --git a/plop-templates/component/index.hbs b/plop-templates/component/index.hbs deleted file mode 100644 index 162c0d3..0000000 --- a/plop-templates/component/index.hbs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/plop-templates/component/prompt.js b/plop-templates/component/prompt.js deleted file mode 100644 index 2b42bd2..0000000 --- a/plop-templates/component/prompt.js +++ /dev/null @@ -1,65 +0,0 @@ -const fs = require('fs') - -function getFolder(path) { - const components = [] - const files = fs.readdirSync(path) - files.forEach((item) => { - const stat = fs.lstatSync(`${path}/${item}`) - if (stat.isDirectory() === true && item !== 'components') { - components.push(`${path}/${item}`) - components.push(...getFolder(`${path}/${item}`)) - } - }) - return components -} - -module.exports = { - description: '创建组件', - prompts: [ - { - type: 'confirm', - name: 'isGlobal', - message: '是否为全局组件', - default: false, - }, - { - type: 'list', - name: 'path', - message: '请选择组件创建目录', - choices: getFolder('src/views'), - when: (answers) => { - return !answers.isGlobal - }, - }, - { - type: 'input', - name: 'name', - message: '请输入组件名称', - validate: (v) => { - if (!v || v.trim === '') { - return '组件名称不能为空' - } - else { - return true - } - }, - }, - ], - actions: (data) => { - let path = '' - if (data.isGlobal) { - path = 'src/components/{{properCase name}}/index.vue' - } - else { - path = `${data.path}/components/{{properCase name}}/index.vue` - } - const actions = [ - { - type: 'add', - path, - templateFile: 'plop-templates/component/index.hbs', - }, - ] - return actions - }, -} diff --git a/plop-templates/page/index.hbs b/plop-templates/page/index.hbs deleted file mode 100644 index acabfe3..0000000 --- a/plop-templates/page/index.hbs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/plop-templates/page/prompt.js b/plop-templates/page/prompt.js deleted file mode 100644 index 26c2d38..0000000 --- a/plop-templates/page/prompt.js +++ /dev/null @@ -1,54 +0,0 @@ -const path = require('path') -const fs = require('fs') - -function getFolder(path) { - const components = [] - const files = fs.readdirSync(path) - files.forEach((item) => { - const stat = fs.lstatSync(`${path}/${item}`) - if (stat.isDirectory() === true && item !== 'components') { - components.push(`${path}/${item}`) - components.push(...getFolder(`${path}/${item}`)) - } - }) - return components -} - -module.exports = { - description: '创建页面', - prompts: [ - { - type: 'list', - name: 'path', - message: '请选择页面创建目录', - choices: getFolder('src/views'), - }, - { - type: 'input', - name: 'name', - message: '请输入文件名', - validate: (v) => { - if (!v || v.trim === '') { - return '文件名不能为空' - } - else { - return true - } - }, - }, - ], - actions: (data) => { - const relativePath = path.relative('src/views', data.path) - const actions = [ - { - type: 'add', - path: `${data.path}/{{camelCase name}}.vue`, - templateFile: 'plop-templates/page/index.hbs', - data: { - componentName: `${relativePath} ${data.name}`, - }, - }, - ] - return actions - }, -} diff --git a/plop-templates/store/index.hbs b/plop-templates/store/index.hbs deleted file mode 100644 index b3336c5..0000000 --- a/plop-templates/store/index.hbs +++ /dev/null @@ -1,11 +0,0 @@ -const use{{ properCase name }}Store = defineStore( - // 唯一ID - '{{ camelCase name }}', - { - state: () => ({}), - getters: {}, - actions: {}, - }, -) - -export default use{{ properCase name }}Store diff --git a/plop-templates/store/prompt.js b/plop-templates/store/prompt.js deleted file mode 100644 index 2cefa24..0000000 --- a/plop-templates/store/prompt.js +++ /dev/null @@ -1,28 +0,0 @@ -module.exports = { - description: '创建全局状态', - prompts: [ - { - type: 'input', - name: 'name', - message: '请输入模块名称', - validate: (v) => { - if (!v || v.trim === '') { - return '模块名称不能为空' - } - else { - return true - } - }, - }, - ], - actions: () => { - const actions = [ - { - type: 'add', - path: 'src/store/modules/{{camelCase name}}.ts', - templateFile: 'plop-templates/store/index.hbs', - }, - ] - return actions - }, -} diff --git a/src/api/api/index.ts b/src/api/api/index.ts index 325777a..4541b77 100644 --- a/src/api/api/index.ts +++ b/src/api/api/index.ts @@ -265,7 +265,7 @@ // 设备监测趋势分析 export function getDeviceDetailAnalysis(params: object) { return request({ - url: '/deviceCollectionLog/detailAnalysis', + url: '/deviceCollectionLog/detail-analysis', method: 'get', params, }) diff --git a/src/components.d.ts b/src/components.d.ts index 419ee11..a1b0897 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -7,13 +7,10 @@ declare module '@vue/runtime-core' { export interface GlobalComponents { - AddNode: typeof import('./components/workFlow/addNode.vue')['default'] - AddNodeBan: typeof import('./components/workFlow/addNodeBan.vue')['default'] AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default'] AppContainer: typeof import('./components/AppContainer/index.vue')['default'] ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default'] ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default'] - ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default'] Auth: typeof import('./components/Auth/index.vue')['default'] AuthAll: typeof import('./components/AuthAll/index.vue')['default'] BarChartHorizontal: typeof import('./components/Echart/BarChartHorizontal.vue')['default'] @@ -23,10 +20,6 @@ BatchActionBar: typeof import('./components/BatchActionBar/index.vue')['default'] BenchCol: typeof import('./components/benchCol/index.vue')['default'] ButtonBox: typeof import('./components/buttonBox/buttonBox.vue')['default'] - CertificationMonitor: typeof import('./components/Sample/certificationMonitor.vue')['default'] - CertificationRecords: typeof import('./components/Sample/certificationRecords.vue')['default'] - ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default'] - CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default'] @@ -44,19 +37,14 @@ InfoWindow2: typeof import('./components/map/infoWindow2.vue')['default'] LineChart: typeof import('./components/Echart/LineChart.vue')['default'] Map: typeof import('./components/map/index.vue')['default'] - MeasureRecords: typeof import('./components/Sample/measureRecords.vue')['default'] - NodeWrap: typeof import('./components/workFlow/nodeWrap.vue')['default'] - NodeWrapBan: typeof import('./components/workFlow/nodeWrapBan.vue')['default'] NormalTable: typeof import('./components/NormalTable/index.vue')['default'] PageHeader: typeof import('./components/PageHeader/index.vue')['default'] PageMain: typeof import('./components/PageMain/index.vue')['default'] PcasCascader: typeof import('./components/PcasCascader/index.vue')['default'] PieChart: typeof import('./components/Echart/PieChart.vue')['default'] - PromoterDrawer: typeof import('./components/drawer/promoterDrawer.vue')['default'] QrDialog: typeof import('./components/QrDialog/index.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] - ScanSampleDialog: typeof import('./components/ScanSampleDialog/index.vue')['default'] SearchArea: typeof import('./components/SearchArea/index.vue')['default'] SearchBar: typeof import('./components/SearchBar/index.vue')['default'] SearchItem: typeof import('./components/SearchArea/SearchItem.vue')['default'] diff --git a/src/components/Echart/LineChart.vue b/src/components/Echart/LineChart.vue index 841e0cb..fefb873 100644 --- a/src/components/Echart/LineChart.vue +++ b/src/components/Echart/LineChart.vue @@ -45,14 +45,14 @@ default: () => { return { show: true, - icon: 'circle', - orient: 'vertile', // 图例方向 - align: 'left', // 图例标记和文本的对齐,默认自动 - top: 5, - right: 20, - itemWidth: 12, - itemHeight: 12, - padding: [0, 0, 0, 120], + // icon: 'circle', + orient: 'horizontal', // 图例方向 + // align: 'left', // 图例标记和文本的对齐,默认自动 + // top: 5, + // right: 20, + // itemWidth: 12, + // itemHeight: 12, + // padding: [0, 0, 0, 120], } }, }, @@ -151,7 +151,7 @@ */ gradient: { type: Boolean, - default: true, + default: false, }, /** * y轴最大值 @@ -172,7 +172,7 @@ */ smooth: { type: Boolean, - default: true, + default: false, }, }) @@ -192,9 +192,21 @@ ) // 构建option function buildOption() { - const option: lineOption = { + const option: any = { grid: props.grid, legend: props.legend, // 图例 + toolbox: { + show: true, + feature: { + dataZoom: { + yAxisIndex: 'none', + }, + dataView: { readOnly: false }, + magicType: { type: ['line', 'bar'] }, + restore: {}, + saveAsImage: {}, + }, + }, tooltip: { trigger: 'axis', textStyle: { @@ -213,7 +225,7 @@ xAxis: [ { type: props.xAxisType, - boundaryGap: true, + boundaryGap: false, axisLine: { lineStyle: { color: props.axisLineColor, // 轴线的颜色 @@ -223,20 +235,20 @@ color: props.fontColor, // X轴名称颜色 fontSize: 14, }, - splitLine: { - show: false, - lineStyle: { - color: ['#7a6b74'], - type: props.axisLineType, - }, - }, + // splitLine: { + // show: false, + // lineStyle: { + // color: ['#7a6b74'], + // type: props.axisLineType, + // }, + // }, }, ], yAxis: [ { name: props.unit, type: 'value', - boundaryGap: true, + // boundaryGap: true, axisLine: { show: false, lineStyle: { @@ -252,7 +264,7 @@ show: true, lineStyle: { color: ['#bfbfbf'], - type: 'dashed', + type: 'solid', }, }, }, @@ -285,15 +297,24 @@ // 遍历data, 拆分轴线名称,数据和颜色 for (const itemIndex in props.data) { const item = props.data[itemIndex] - const series: lineSeriesOption = { + const series: any = { name: item.name, // 线系列名 type: 'line', - symbol: 'none', // 去掉折线节点 + // symbol: 'none', // 去掉折线节点 smooth: props.smooth, // 曲线平滑设置 lineStyle: { width: 2, }, data: item.data, + markPoint: { + data: [ + { type: 'max', name: 'Max' }, + { type: 'min', name: 'Min' }, + ], + }, + markLine: { + data: [{ type: 'average', name: 'Avg' }], + }, } // 线段颜色 if (item.color || props.colors.length > 0) { @@ -341,7 +362,6 @@ chart.resize() } } - window.addEventListener('resize', () => { chart.resize() }) @@ -352,7 +372,11 @@ - diff --git a/src/components/ScanSampleDialog/scan-interface.ts b/src/components/ScanSampleDialog/scan-interface.ts deleted file mode 100644 index 1c3aa33..0000000 --- a/src/components/ScanSampleDialog/scan-interface.ts +++ /dev/null @@ -1,12 +0,0 @@ -export interface ISampleScan { - sampleId?: string // 样品id - sampleNo: string // 样品编号 - sampleName: string // 样品名称 - sampleModel: string // 样品型号 - manufacturingNo: string // 出厂编号 - customerNo: string // 委托方代码 - customerName: string // 委托方名称 - orderId: string // 委托书id - orderNo: string // 委托书编号 - labelBind: string // 标签绑定 -} diff --git a/src/components/drawer/approverDrawer.vue b/src/components/drawer/approverDrawer.vue deleted file mode 100644 index 6fdad69..0000000 --- a/src/components/drawer/approverDrawer.vue +++ /dev/null @@ -1,458 +0,0 @@ - - - - - - - - diff --git a/src/components/drawer/conditionDrawer.vue b/src/components/drawer/conditionDrawer.vue deleted file mode 100644 index 3746fe7..0000000 --- a/src/components/drawer/conditionDrawer.vue +++ /dev/null @@ -1,401 +0,0 @@ - - - - - - diff --git a/src/components/drawer/copyerDrawer.vue b/src/components/drawer/copyerDrawer.vue deleted file mode 100644 index e06bd1f..0000000 --- a/src/components/drawer/copyerDrawer.vue +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - - diff --git a/src/components/drawer/promoterDrawer.vue b/src/components/drawer/promoterDrawer.vue deleted file mode 100644 index bdf885c..0000000 --- a/src/components/drawer/promoterDrawer.vue +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - diff --git a/src/components/workFlow/addNode.vue b/src/components/workFlow/addNode.vue deleted file mode 100644 index b773386..0000000 --- a/src/components/workFlow/addNode.vue +++ /dev/null @@ -1,243 +0,0 @@ - - - - - - - diff --git a/src/components/workFlow/addNodeBan.vue b/src/components/workFlow/addNodeBan.vue deleted file mode 100644 index 95a601f..0000000 --- a/src/components/workFlow/addNodeBan.vue +++ /dev/null @@ -1,235 +0,0 @@ - - - - - - - diff --git a/src/components/workFlow/nodeWrap.vue b/src/components/workFlow/nodeWrap.vue deleted file mode 100644 index 92b26e4..0000000 --- a/src/components/workFlow/nodeWrap.vue +++ /dev/null @@ -1,367 +0,0 @@ - - - - - diff --git a/departments150.json b/departments150.json deleted file mode 100644 index aa6cc37..0000000 --- a/departments150.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "code": "200", - "msg": "操作成功", - "data": { - "childDepartments": [], - "employees": [{ - "id": "53128112", - "employeeName": "测试1", - "isLeave": "0", - "open": "false" - },{ - "id": "53128113", - "employeeName": "测试2", - "isLeave": "0", - "open": "false" - }], - "titleDepartments": [{ - "departmentId": "150", - "departmentKey": "RLXZB_V2", - "departmentName": "人力行政部", - "departmentNames": "人力行政部", - "id": "150", - "parentId": "0" - }] - } -} \ No newline at end of file diff --git a/plop-templates/component/index.hbs b/plop-templates/component/index.hbs deleted file mode 100644 index 162c0d3..0000000 --- a/plop-templates/component/index.hbs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/plop-templates/component/prompt.js b/plop-templates/component/prompt.js deleted file mode 100644 index 2b42bd2..0000000 --- a/plop-templates/component/prompt.js +++ /dev/null @@ -1,65 +0,0 @@ -const fs = require('fs') - -function getFolder(path) { - const components = [] - const files = fs.readdirSync(path) - files.forEach((item) => { - const stat = fs.lstatSync(`${path}/${item}`) - if (stat.isDirectory() === true && item !== 'components') { - components.push(`${path}/${item}`) - components.push(...getFolder(`${path}/${item}`)) - } - }) - return components -} - -module.exports = { - description: '创建组件', - prompts: [ - { - type: 'confirm', - name: 'isGlobal', - message: '是否为全局组件', - default: false, - }, - { - type: 'list', - name: 'path', - message: '请选择组件创建目录', - choices: getFolder('src/views'), - when: (answers) => { - return !answers.isGlobal - }, - }, - { - type: 'input', - name: 'name', - message: '请输入组件名称', - validate: (v) => { - if (!v || v.trim === '') { - return '组件名称不能为空' - } - else { - return true - } - }, - }, - ], - actions: (data) => { - let path = '' - if (data.isGlobal) { - path = 'src/components/{{properCase name}}/index.vue' - } - else { - path = `${data.path}/components/{{properCase name}}/index.vue` - } - const actions = [ - { - type: 'add', - path, - templateFile: 'plop-templates/component/index.hbs', - }, - ] - return actions - }, -} diff --git a/plop-templates/page/index.hbs b/plop-templates/page/index.hbs deleted file mode 100644 index acabfe3..0000000 --- a/plop-templates/page/index.hbs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/plop-templates/page/prompt.js b/plop-templates/page/prompt.js deleted file mode 100644 index 26c2d38..0000000 --- a/plop-templates/page/prompt.js +++ /dev/null @@ -1,54 +0,0 @@ -const path = require('path') -const fs = require('fs') - -function getFolder(path) { - const components = [] - const files = fs.readdirSync(path) - files.forEach((item) => { - const stat = fs.lstatSync(`${path}/${item}`) - if (stat.isDirectory() === true && item !== 'components') { - components.push(`${path}/${item}`) - components.push(...getFolder(`${path}/${item}`)) - } - }) - return components -} - -module.exports = { - description: '创建页面', - prompts: [ - { - type: 'list', - name: 'path', - message: '请选择页面创建目录', - choices: getFolder('src/views'), - }, - { - type: 'input', - name: 'name', - message: '请输入文件名', - validate: (v) => { - if (!v || v.trim === '') { - return '文件名不能为空' - } - else { - return true - } - }, - }, - ], - actions: (data) => { - const relativePath = path.relative('src/views', data.path) - const actions = [ - { - type: 'add', - path: `${data.path}/{{camelCase name}}.vue`, - templateFile: 'plop-templates/page/index.hbs', - data: { - componentName: `${relativePath} ${data.name}`, - }, - }, - ] - return actions - }, -} diff --git a/plop-templates/store/index.hbs b/plop-templates/store/index.hbs deleted file mode 100644 index b3336c5..0000000 --- a/plop-templates/store/index.hbs +++ /dev/null @@ -1,11 +0,0 @@ -const use{{ properCase name }}Store = defineStore( - // 唯一ID - '{{ camelCase name }}', - { - state: () => ({}), - getters: {}, - actions: {}, - }, -) - -export default use{{ properCase name }}Store diff --git a/plop-templates/store/prompt.js b/plop-templates/store/prompt.js deleted file mode 100644 index 2cefa24..0000000 --- a/plop-templates/store/prompt.js +++ /dev/null @@ -1,28 +0,0 @@ -module.exports = { - description: '创建全局状态', - prompts: [ - { - type: 'input', - name: 'name', - message: '请输入模块名称', - validate: (v) => { - if (!v || v.trim === '') { - return '模块名称不能为空' - } - else { - return true - } - }, - }, - ], - actions: () => { - const actions = [ - { - type: 'add', - path: 'src/store/modules/{{camelCase name}}.ts', - templateFile: 'plop-templates/store/index.hbs', - }, - ] - return actions - }, -} diff --git a/src/api/api/index.ts b/src/api/api/index.ts index 325777a..4541b77 100644 --- a/src/api/api/index.ts +++ b/src/api/api/index.ts @@ -265,7 +265,7 @@ // 设备监测趋势分析 export function getDeviceDetailAnalysis(params: object) { return request({ - url: '/deviceCollectionLog/detailAnalysis', + url: '/deviceCollectionLog/detail-analysis', method: 'get', params, }) diff --git a/src/components.d.ts b/src/components.d.ts index 419ee11..a1b0897 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -7,13 +7,10 @@ declare module '@vue/runtime-core' { export interface GlobalComponents { - AddNode: typeof import('./components/workFlow/addNode.vue')['default'] - AddNodeBan: typeof import('./components/workFlow/addNodeBan.vue')['default'] AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default'] AppContainer: typeof import('./components/AppContainer/index.vue')['default'] ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default'] ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default'] - ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default'] Auth: typeof import('./components/Auth/index.vue')['default'] AuthAll: typeof import('./components/AuthAll/index.vue')['default'] BarChartHorizontal: typeof import('./components/Echart/BarChartHorizontal.vue')['default'] @@ -23,10 +20,6 @@ BatchActionBar: typeof import('./components/BatchActionBar/index.vue')['default'] BenchCol: typeof import('./components/benchCol/index.vue')['default'] ButtonBox: typeof import('./components/buttonBox/buttonBox.vue')['default'] - CertificationMonitor: typeof import('./components/Sample/certificationMonitor.vue')['default'] - CertificationRecords: typeof import('./components/Sample/certificationRecords.vue')['default'] - ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default'] - CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default'] @@ -44,19 +37,14 @@ InfoWindow2: typeof import('./components/map/infoWindow2.vue')['default'] LineChart: typeof import('./components/Echart/LineChart.vue')['default'] Map: typeof import('./components/map/index.vue')['default'] - MeasureRecords: typeof import('./components/Sample/measureRecords.vue')['default'] - NodeWrap: typeof import('./components/workFlow/nodeWrap.vue')['default'] - NodeWrapBan: typeof import('./components/workFlow/nodeWrapBan.vue')['default'] NormalTable: typeof import('./components/NormalTable/index.vue')['default'] PageHeader: typeof import('./components/PageHeader/index.vue')['default'] PageMain: typeof import('./components/PageMain/index.vue')['default'] PcasCascader: typeof import('./components/PcasCascader/index.vue')['default'] PieChart: typeof import('./components/Echart/PieChart.vue')['default'] - PromoterDrawer: typeof import('./components/drawer/promoterDrawer.vue')['default'] QrDialog: typeof import('./components/QrDialog/index.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] - ScanSampleDialog: typeof import('./components/ScanSampleDialog/index.vue')['default'] SearchArea: typeof import('./components/SearchArea/index.vue')['default'] SearchBar: typeof import('./components/SearchBar/index.vue')['default'] SearchItem: typeof import('./components/SearchArea/SearchItem.vue')['default'] diff --git a/src/components/Echart/LineChart.vue b/src/components/Echart/LineChart.vue index 841e0cb..fefb873 100644 --- a/src/components/Echart/LineChart.vue +++ b/src/components/Echart/LineChart.vue @@ -45,14 +45,14 @@ default: () => { return { show: true, - icon: 'circle', - orient: 'vertile', // 图例方向 - align: 'left', // 图例标记和文本的对齐,默认自动 - top: 5, - right: 20, - itemWidth: 12, - itemHeight: 12, - padding: [0, 0, 0, 120], + // icon: 'circle', + orient: 'horizontal', // 图例方向 + // align: 'left', // 图例标记和文本的对齐,默认自动 + // top: 5, + // right: 20, + // itemWidth: 12, + // itemHeight: 12, + // padding: [0, 0, 0, 120], } }, }, @@ -151,7 +151,7 @@ */ gradient: { type: Boolean, - default: true, + default: false, }, /** * y轴最大值 @@ -172,7 +172,7 @@ */ smooth: { type: Boolean, - default: true, + default: false, }, }) @@ -192,9 +192,21 @@ ) // 构建option function buildOption() { - const option: lineOption = { + const option: any = { grid: props.grid, legend: props.legend, // 图例 + toolbox: { + show: true, + feature: { + dataZoom: { + yAxisIndex: 'none', + }, + dataView: { readOnly: false }, + magicType: { type: ['line', 'bar'] }, + restore: {}, + saveAsImage: {}, + }, + }, tooltip: { trigger: 'axis', textStyle: { @@ -213,7 +225,7 @@ xAxis: [ { type: props.xAxisType, - boundaryGap: true, + boundaryGap: false, axisLine: { lineStyle: { color: props.axisLineColor, // 轴线的颜色 @@ -223,20 +235,20 @@ color: props.fontColor, // X轴名称颜色 fontSize: 14, }, - splitLine: { - show: false, - lineStyle: { - color: ['#7a6b74'], - type: props.axisLineType, - }, - }, + // splitLine: { + // show: false, + // lineStyle: { + // color: ['#7a6b74'], + // type: props.axisLineType, + // }, + // }, }, ], yAxis: [ { name: props.unit, type: 'value', - boundaryGap: true, + // boundaryGap: true, axisLine: { show: false, lineStyle: { @@ -252,7 +264,7 @@ show: true, lineStyle: { color: ['#bfbfbf'], - type: 'dashed', + type: 'solid', }, }, }, @@ -285,15 +297,24 @@ // 遍历data, 拆分轴线名称,数据和颜色 for (const itemIndex in props.data) { const item = props.data[itemIndex] - const series: lineSeriesOption = { + const series: any = { name: item.name, // 线系列名 type: 'line', - symbol: 'none', // 去掉折线节点 + // symbol: 'none', // 去掉折线节点 smooth: props.smooth, // 曲线平滑设置 lineStyle: { width: 2, }, data: item.data, + markPoint: { + data: [ + { type: 'max', name: 'Max' }, + { type: 'min', name: 'Min' }, + ], + }, + markLine: { + data: [{ type: 'average', name: 'Avg' }], + }, } // 线段颜色 if (item.color || props.colors.length > 0) { @@ -341,7 +362,6 @@ chart.resize() } } - window.addEventListener('resize', () => { chart.resize() }) @@ -352,7 +372,11 @@ - diff --git a/src/components/ScanSampleDialog/scan-interface.ts b/src/components/ScanSampleDialog/scan-interface.ts deleted file mode 100644 index 1c3aa33..0000000 --- a/src/components/ScanSampleDialog/scan-interface.ts +++ /dev/null @@ -1,12 +0,0 @@ -export interface ISampleScan { - sampleId?: string // 样品id - sampleNo: string // 样品编号 - sampleName: string // 样品名称 - sampleModel: string // 样品型号 - manufacturingNo: string // 出厂编号 - customerNo: string // 委托方代码 - customerName: string // 委托方名称 - orderId: string // 委托书id - orderNo: string // 委托书编号 - labelBind: string // 标签绑定 -} diff --git a/src/components/drawer/approverDrawer.vue b/src/components/drawer/approverDrawer.vue deleted file mode 100644 index 6fdad69..0000000 --- a/src/components/drawer/approverDrawer.vue +++ /dev/null @@ -1,458 +0,0 @@ - - - - - - - - diff --git a/src/components/drawer/conditionDrawer.vue b/src/components/drawer/conditionDrawer.vue deleted file mode 100644 index 3746fe7..0000000 --- a/src/components/drawer/conditionDrawer.vue +++ /dev/null @@ -1,401 +0,0 @@ - - - - - - diff --git a/src/components/drawer/copyerDrawer.vue b/src/components/drawer/copyerDrawer.vue deleted file mode 100644 index e06bd1f..0000000 --- a/src/components/drawer/copyerDrawer.vue +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - - diff --git a/src/components/drawer/promoterDrawer.vue b/src/components/drawer/promoterDrawer.vue deleted file mode 100644 index bdf885c..0000000 --- a/src/components/drawer/promoterDrawer.vue +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - diff --git a/src/components/workFlow/addNode.vue b/src/components/workFlow/addNode.vue deleted file mode 100644 index b773386..0000000 --- a/src/components/workFlow/addNode.vue +++ /dev/null @@ -1,243 +0,0 @@ - - - - - - - diff --git a/src/components/workFlow/addNodeBan.vue b/src/components/workFlow/addNodeBan.vue deleted file mode 100644 index 95a601f..0000000 --- a/src/components/workFlow/addNodeBan.vue +++ /dev/null @@ -1,235 +0,0 @@ - - - - - - - diff --git a/src/components/workFlow/nodeWrap.vue b/src/components/workFlow/nodeWrap.vue deleted file mode 100644 index 92b26e4..0000000 --- a/src/components/workFlow/nodeWrap.vue +++ /dev/null @@ -1,367 +0,0 @@ - - - - - diff --git a/src/components/workFlow/nodeWrapBan.vue b/src/components/workFlow/nodeWrapBan.vue deleted file mode 100644 index 4a3affb..0000000 --- a/src/components/workFlow/nodeWrapBan.vue +++ /dev/null @@ -1,156 +0,0 @@ - - - - - diff --git a/departments150.json b/departments150.json deleted file mode 100644 index aa6cc37..0000000 --- a/departments150.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "code": "200", - "msg": "操作成功", - "data": { - "childDepartments": [], - "employees": [{ - "id": "53128112", - "employeeName": "测试1", - "isLeave": "0", - "open": "false" - },{ - "id": "53128113", - "employeeName": "测试2", - "isLeave": "0", - "open": "false" - }], - "titleDepartments": [{ - "departmentId": "150", - "departmentKey": "RLXZB_V2", - "departmentName": "人力行政部", - "departmentNames": "人力行政部", - "id": "150", - "parentId": "0" - }] - } -} \ No newline at end of file diff --git a/plop-templates/component/index.hbs b/plop-templates/component/index.hbs deleted file mode 100644 index 162c0d3..0000000 --- a/plop-templates/component/index.hbs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/plop-templates/component/prompt.js b/plop-templates/component/prompt.js deleted file mode 100644 index 2b42bd2..0000000 --- a/plop-templates/component/prompt.js +++ /dev/null @@ -1,65 +0,0 @@ -const fs = require('fs') - -function getFolder(path) { - const components = [] - const files = fs.readdirSync(path) - files.forEach((item) => { - const stat = fs.lstatSync(`${path}/${item}`) - if (stat.isDirectory() === true && item !== 'components') { - components.push(`${path}/${item}`) - components.push(...getFolder(`${path}/${item}`)) - } - }) - return components -} - -module.exports = { - description: '创建组件', - prompts: [ - { - type: 'confirm', - name: 'isGlobal', - message: '是否为全局组件', - default: false, - }, - { - type: 'list', - name: 'path', - message: '请选择组件创建目录', - choices: getFolder('src/views'), - when: (answers) => { - return !answers.isGlobal - }, - }, - { - type: 'input', - name: 'name', - message: '请输入组件名称', - validate: (v) => { - if (!v || v.trim === '') { - return '组件名称不能为空' - } - else { - return true - } - }, - }, - ], - actions: (data) => { - let path = '' - if (data.isGlobal) { - path = 'src/components/{{properCase name}}/index.vue' - } - else { - path = `${data.path}/components/{{properCase name}}/index.vue` - } - const actions = [ - { - type: 'add', - path, - templateFile: 'plop-templates/component/index.hbs', - }, - ] - return actions - }, -} diff --git a/plop-templates/page/index.hbs b/plop-templates/page/index.hbs deleted file mode 100644 index acabfe3..0000000 --- a/plop-templates/page/index.hbs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/plop-templates/page/prompt.js b/plop-templates/page/prompt.js deleted file mode 100644 index 26c2d38..0000000 --- a/plop-templates/page/prompt.js +++ /dev/null @@ -1,54 +0,0 @@ -const path = require('path') -const fs = require('fs') - -function getFolder(path) { - const components = [] - const files = fs.readdirSync(path) - files.forEach((item) => { - const stat = fs.lstatSync(`${path}/${item}`) - if (stat.isDirectory() === true && item !== 'components') { - components.push(`${path}/${item}`) - components.push(...getFolder(`${path}/${item}`)) - } - }) - return components -} - -module.exports = { - description: '创建页面', - prompts: [ - { - type: 'list', - name: 'path', - message: '请选择页面创建目录', - choices: getFolder('src/views'), - }, - { - type: 'input', - name: 'name', - message: '请输入文件名', - validate: (v) => { - if (!v || v.trim === '') { - return '文件名不能为空' - } - else { - return true - } - }, - }, - ], - actions: (data) => { - const relativePath = path.relative('src/views', data.path) - const actions = [ - { - type: 'add', - path: `${data.path}/{{camelCase name}}.vue`, - templateFile: 'plop-templates/page/index.hbs', - data: { - componentName: `${relativePath} ${data.name}`, - }, - }, - ] - return actions - }, -} diff --git a/plop-templates/store/index.hbs b/plop-templates/store/index.hbs deleted file mode 100644 index b3336c5..0000000 --- a/plop-templates/store/index.hbs +++ /dev/null @@ -1,11 +0,0 @@ -const use{{ properCase name }}Store = defineStore( - // 唯一ID - '{{ camelCase name }}', - { - state: () => ({}), - getters: {}, - actions: {}, - }, -) - -export default use{{ properCase name }}Store diff --git a/plop-templates/store/prompt.js b/plop-templates/store/prompt.js deleted file mode 100644 index 2cefa24..0000000 --- a/plop-templates/store/prompt.js +++ /dev/null @@ -1,28 +0,0 @@ -module.exports = { - description: '创建全局状态', - prompts: [ - { - type: 'input', - name: 'name', - message: '请输入模块名称', - validate: (v) => { - if (!v || v.trim === '') { - return '模块名称不能为空' - } - else { - return true - } - }, - }, - ], - actions: () => { - const actions = [ - { - type: 'add', - path: 'src/store/modules/{{camelCase name}}.ts', - templateFile: 'plop-templates/store/index.hbs', - }, - ] - return actions - }, -} diff --git a/src/api/api/index.ts b/src/api/api/index.ts index 325777a..4541b77 100644 --- a/src/api/api/index.ts +++ b/src/api/api/index.ts @@ -265,7 +265,7 @@ // 设备监测趋势分析 export function getDeviceDetailAnalysis(params: object) { return request({ - url: '/deviceCollectionLog/detailAnalysis', + url: '/deviceCollectionLog/detail-analysis', method: 'get', params, }) diff --git a/src/components.d.ts b/src/components.d.ts index 419ee11..a1b0897 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -7,13 +7,10 @@ declare module '@vue/runtime-core' { export interface GlobalComponents { - AddNode: typeof import('./components/workFlow/addNode.vue')['default'] - AddNodeBan: typeof import('./components/workFlow/addNodeBan.vue')['default'] AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default'] AppContainer: typeof import('./components/AppContainer/index.vue')['default'] ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default'] ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default'] - ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default'] Auth: typeof import('./components/Auth/index.vue')['default'] AuthAll: typeof import('./components/AuthAll/index.vue')['default'] BarChartHorizontal: typeof import('./components/Echart/BarChartHorizontal.vue')['default'] @@ -23,10 +20,6 @@ BatchActionBar: typeof import('./components/BatchActionBar/index.vue')['default'] BenchCol: typeof import('./components/benchCol/index.vue')['default'] ButtonBox: typeof import('./components/buttonBox/buttonBox.vue')['default'] - CertificationMonitor: typeof import('./components/Sample/certificationMonitor.vue')['default'] - CertificationRecords: typeof import('./components/Sample/certificationRecords.vue')['default'] - ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default'] - CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default'] @@ -44,19 +37,14 @@ InfoWindow2: typeof import('./components/map/infoWindow2.vue')['default'] LineChart: typeof import('./components/Echart/LineChart.vue')['default'] Map: typeof import('./components/map/index.vue')['default'] - MeasureRecords: typeof import('./components/Sample/measureRecords.vue')['default'] - NodeWrap: typeof import('./components/workFlow/nodeWrap.vue')['default'] - NodeWrapBan: typeof import('./components/workFlow/nodeWrapBan.vue')['default'] NormalTable: typeof import('./components/NormalTable/index.vue')['default'] PageHeader: typeof import('./components/PageHeader/index.vue')['default'] PageMain: typeof import('./components/PageMain/index.vue')['default'] PcasCascader: typeof import('./components/PcasCascader/index.vue')['default'] PieChart: typeof import('./components/Echart/PieChart.vue')['default'] - PromoterDrawer: typeof import('./components/drawer/promoterDrawer.vue')['default'] QrDialog: typeof import('./components/QrDialog/index.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] - ScanSampleDialog: typeof import('./components/ScanSampleDialog/index.vue')['default'] SearchArea: typeof import('./components/SearchArea/index.vue')['default'] SearchBar: typeof import('./components/SearchBar/index.vue')['default'] SearchItem: typeof import('./components/SearchArea/SearchItem.vue')['default'] diff --git a/src/components/Echart/LineChart.vue b/src/components/Echart/LineChart.vue index 841e0cb..fefb873 100644 --- a/src/components/Echart/LineChart.vue +++ b/src/components/Echart/LineChart.vue @@ -45,14 +45,14 @@ default: () => { return { show: true, - icon: 'circle', - orient: 'vertile', // 图例方向 - align: 'left', // 图例标记和文本的对齐,默认自动 - top: 5, - right: 20, - itemWidth: 12, - itemHeight: 12, - padding: [0, 0, 0, 120], + // icon: 'circle', + orient: 'horizontal', // 图例方向 + // align: 'left', // 图例标记和文本的对齐,默认自动 + // top: 5, + // right: 20, + // itemWidth: 12, + // itemHeight: 12, + // padding: [0, 0, 0, 120], } }, }, @@ -151,7 +151,7 @@ */ gradient: { type: Boolean, - default: true, + default: false, }, /** * y轴最大值 @@ -172,7 +172,7 @@ */ smooth: { type: Boolean, - default: true, + default: false, }, }) @@ -192,9 +192,21 @@ ) // 构建option function buildOption() { - const option: lineOption = { + const option: any = { grid: props.grid, legend: props.legend, // 图例 + toolbox: { + show: true, + feature: { + dataZoom: { + yAxisIndex: 'none', + }, + dataView: { readOnly: false }, + magicType: { type: ['line', 'bar'] }, + restore: {}, + saveAsImage: {}, + }, + }, tooltip: { trigger: 'axis', textStyle: { @@ -213,7 +225,7 @@ xAxis: [ { type: props.xAxisType, - boundaryGap: true, + boundaryGap: false, axisLine: { lineStyle: { color: props.axisLineColor, // 轴线的颜色 @@ -223,20 +235,20 @@ color: props.fontColor, // X轴名称颜色 fontSize: 14, }, - splitLine: { - show: false, - lineStyle: { - color: ['#7a6b74'], - type: props.axisLineType, - }, - }, + // splitLine: { + // show: false, + // lineStyle: { + // color: ['#7a6b74'], + // type: props.axisLineType, + // }, + // }, }, ], yAxis: [ { name: props.unit, type: 'value', - boundaryGap: true, + // boundaryGap: true, axisLine: { show: false, lineStyle: { @@ -252,7 +264,7 @@ show: true, lineStyle: { color: ['#bfbfbf'], - type: 'dashed', + type: 'solid', }, }, }, @@ -285,15 +297,24 @@ // 遍历data, 拆分轴线名称,数据和颜色 for (const itemIndex in props.data) { const item = props.data[itemIndex] - const series: lineSeriesOption = { + const series: any = { name: item.name, // 线系列名 type: 'line', - symbol: 'none', // 去掉折线节点 + // symbol: 'none', // 去掉折线节点 smooth: props.smooth, // 曲线平滑设置 lineStyle: { width: 2, }, data: item.data, + markPoint: { + data: [ + { type: 'max', name: 'Max' }, + { type: 'min', name: 'Min' }, + ], + }, + markLine: { + data: [{ type: 'average', name: 'Avg' }], + }, } // 线段颜色 if (item.color || props.colors.length > 0) { @@ -341,7 +362,6 @@ chart.resize() } } - window.addEventListener('resize', () => { chart.resize() }) @@ -352,7 +372,11 @@ - diff --git a/src/components/ScanSampleDialog/scan-interface.ts b/src/components/ScanSampleDialog/scan-interface.ts deleted file mode 100644 index 1c3aa33..0000000 --- a/src/components/ScanSampleDialog/scan-interface.ts +++ /dev/null @@ -1,12 +0,0 @@ -export interface ISampleScan { - sampleId?: string // 样品id - sampleNo: string // 样品编号 - sampleName: string // 样品名称 - sampleModel: string // 样品型号 - manufacturingNo: string // 出厂编号 - customerNo: string // 委托方代码 - customerName: string // 委托方名称 - orderId: string // 委托书id - orderNo: string // 委托书编号 - labelBind: string // 标签绑定 -} diff --git a/src/components/drawer/approverDrawer.vue b/src/components/drawer/approverDrawer.vue deleted file mode 100644 index 6fdad69..0000000 --- a/src/components/drawer/approverDrawer.vue +++ /dev/null @@ -1,458 +0,0 @@ - - - - - - - - diff --git a/src/components/drawer/conditionDrawer.vue b/src/components/drawer/conditionDrawer.vue deleted file mode 100644 index 3746fe7..0000000 --- a/src/components/drawer/conditionDrawer.vue +++ /dev/null @@ -1,401 +0,0 @@ - - - - - - diff --git a/src/components/drawer/copyerDrawer.vue b/src/components/drawer/copyerDrawer.vue deleted file mode 100644 index e06bd1f..0000000 --- a/src/components/drawer/copyerDrawer.vue +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - - diff --git a/src/components/drawer/promoterDrawer.vue b/src/components/drawer/promoterDrawer.vue deleted file mode 100644 index bdf885c..0000000 --- a/src/components/drawer/promoterDrawer.vue +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - diff --git a/src/components/workFlow/addNode.vue b/src/components/workFlow/addNode.vue deleted file mode 100644 index b773386..0000000 --- a/src/components/workFlow/addNode.vue +++ /dev/null @@ -1,243 +0,0 @@ - - - - - - - diff --git a/src/components/workFlow/addNodeBan.vue b/src/components/workFlow/addNodeBan.vue deleted file mode 100644 index 95a601f..0000000 --- a/src/components/workFlow/addNodeBan.vue +++ /dev/null @@ -1,235 +0,0 @@ - - - - - - - diff --git a/src/components/workFlow/nodeWrap.vue b/src/components/workFlow/nodeWrap.vue deleted file mode 100644 index 92b26e4..0000000 --- a/src/components/workFlow/nodeWrap.vue +++ /dev/null @@ -1,367 +0,0 @@ - - - - - diff --git a/src/components/workFlow/nodeWrapBan.vue b/src/components/workFlow/nodeWrapBan.vue deleted file mode 100644 index 4a3affb..0000000 --- a/src/components/workFlow/nodeWrapBan.vue +++ /dev/null @@ -1,156 +0,0 @@ - - - - - diff --git a/src/css/workflow.css b/src/css/workflow.css deleted file mode 100644 index f922b27..0000000 --- a/src/css/workflow.css +++ /dev/null @@ -1,1712 +0,0 @@ -body { - background: #eee; - margin: 0; - font-family: "Chinese Quote", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 14px; - font-variant: tabular-nums; - line-height: 1.5; - color: rgb(0 0 0 / 65%); - background-color: #fff; -} - -@font-face { - font-family: "Chinese Quote"; - src: local("PingFang SC"), local("SimSun"); - unicode-range: u+2018, u+2019, u+201c, u+201d; -} - -body, -html { - width: 100%; - - /* height: 100% */ -} - -input::-ms-clear, -input::-ms-reveal { - display: none; -} - -*, -::after, -::before { - box-sizing: border-box; -} - -html { - font-family: sans-serif; - line-height: 1.15; - text-size-adjust: 100%; - -ms-overflow-style: scrollbar; - -webkit-tap-highlight-color: rgb(0 0 0 / 0%); -} - -@viewport { - width: device-width; -} - -article, -aside, -dialog, -figcaption, -figure, -footer, -header, -hgroup, -main, -nav, -section { - display: block; -} - -[tabindex="-1"]:focus { - outline: none !important; -} - -hr { - box-sizing: content-box; - height: 0; - overflow: visible; -} - -h1, -h2, -h3, -h4, -h5, -h6 { - margin-top: 0; - margin-bottom: 0.5em; - color: rgb(0 0 0 / 85%); - font-weight: 500; -} - -p { - margin-top: 0; - margin-bottom: 1em; -} - -abbr[data-original-title], -abbr[title] { - text-decoration: underline; - text-decoration: underline dotted; - cursor: help; - border-bottom: 0; -} - -address { - margin-bottom: 1em; - font-style: normal; - line-height: inherit; -} - -input[type="number"], -input[type="password"], -input[type="text"], -textarea { - appearance: none; -} - -dl, -ol, -ul { - margin-top: 0; - margin-bottom: 1em; -} - -ol ol, -ol ul, -ul ol, -ul ul { - margin-bottom: 0; -} - -dt { - font-weight: 500; -} - -dd { - margin-bottom: 0.5em; - margin-left: 0; -} - -blockquote { - margin: 0 0 1em; -} - -dfn { - font-style: italic; -} - -b, -strong { - font-weight: bolder; -} - -small { - font-size: 80%; -} - -sub, -sup { - position: relative; - font-size: 75%; - line-height: 0; - vertical-align: baseline; -} - -sub { - bottom: -0.25em; -} - -sup { - top: -0.5em; -} - -a { - color: #1890ff; - background-color: transparent; - text-decoration: none; - outline: none; - cursor: pointer; - transition: color 0.3s; - text-decoration-skip: objects; -} - -a:focus { - text-decoration: underline; - text-decoration-skip: auto; -} - -a:hover { - color: #40a9ff; -} - -a:active { - color: #096dd9; -} - -a:active, -a:hover { - outline: 0; - text-decoration: none; -} - -code, -kbd, -pre, -samp { - font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; - font-size: 1em; -} - -pre { - margin-top: 0; - margin-bottom: 1em; - overflow: auto; -} - -figure { - margin: 0 0 1em; -} - -img { - vertical-align: middle; - border-style: none; -} - -svg:not(:root) { - overflow: hidden; -} - -[role="button"], -a, -area, -button, -input:not([type="range"]), -label, -select, -summary, -textarea { - touch-action: manipulation; -} - -table { - border-collapse: collapse; -} - -caption { - padding-top: 0.75em; - padding-bottom: 0.3em; - color: rgb(0 0 0 / 45%); - text-align: left; - caption-side: bottom; -} - -th { - text-align: inherit; -} - -button, -input, -optgroup, -select, -textarea { - margin: 0; - font-family: inherit; - font-size: inherit; - line-height: inherit; - color: inherit; -} - -button, -input { - overflow: visible; -} - -button, -select { - text-transform: none; -} - -[type="reset"], -[type="submit"], -button, -html [type="button"] { - appearance: button; -} - -[type="button"]::-moz-focus-inner, -[type="reset"]::-moz-focus-inner, -[type="submit"]::-moz-focus-inner, -button::-moz-focus-inner { - padding: 0; - border-style: none; -} - -input[type="checkbox"], -input[type="radio"] { - box-sizing: border-box; - padding: 0; -} - -input[type="date"], -input[type="datetime-local"], -input[type="month"], -input[type="time"] { - appearance: listbox; -} - -textarea { - overflow: auto; - resize: vertical; -} - -fieldset { - min-width: 0; - padding: 0; - margin: 0; - border: 0; -} - -legend { - display: block; - width: 100%; - max-width: 100%; - padding: 0; - margin-bottom: 0.5em; - font-size: 1.5em; - line-height: inherit; - color: inherit; - white-space: normal; -} - -progress { - vertical-align: baseline; -} - -[type="number"]::-webkit-inner-spin-button, -[type="number"]::-webkit-outer-spin-button { - height: auto; -} - -[type="search"] { - outline-offset: -2px; - appearance: none; -} - -[type="search"]::-webkit-search-cancel-button, -[type="search"]::-webkit-search-decoration { - appearance: none; -} - -::-webkit-file-upload-button { - font: inherit; - appearance: button; -} - -output { - display: inline-block; -} - -summary { - display: list-item; -} - -template { - display: none; -} - -[hidden] { - display: none !important; -} - -mark { - padding: 0.2em; - background-color: #feffe6; -} - -::selection { - background: #1890ff; - color: #fff; -} - -.clearfix { - zoom: 1; -} - -.clearfix::after, -.clearfix::before { - content: ""; - display: table; -} - -.clearfix::after { - clear: both; -} - -@font-face { - font-family: anticon; - font-display: fallback; - src: url("https://at.alicdn.com/t/font_148784_v4ggb6wrjmkotj4i.eot"); - src: url("https://at.alicdn.com/t/font_148784_v4ggb6wrjmkotj4i.woff") format("woff"), url("https://at.alicdn.com/t/font_148784_v4ggb6wrjmkotj4i.ttf") format("truetype"), url("https://at.alicdn.com/t/font_148784_v4ggb6wrjmkotj4i.svg#iconfont") format("svg"); -} - -.anticon { - display: inline-block; - font-style: normal; - vertical-align: baseline; - text-align: center; - text-transform: none; - line-height: 1; - text-rendering: optimizelegibility; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -.anticon::before { - display: block; - font-family: anticon !important; -} - -.anticon-close::before { - content: "\E633"; -} - -.anticon-right::before { - content: "\E61F"; -} - -.anticon-exclamation-circle { - color: rgb(242 86 67); -} - -.anticon-exclamation-circle::before { - content: "\E62C"; -} - -.anticon-left::before { - content: "\E620"; -} - -.anticon-close-circle::before { - content: "\E62E"; -} - -.ant-btn { - line-height: 1.5; - display: inline-block; - font-weight: 400; - text-align: center; - touch-action: manipulation; - cursor: pointer; - background-image: none; - border: 1px solid transparent; - white-space: nowrap; - padding: 0 15px; - font-size: 14px; - border-radius: 4px; - height: 32px; - user-select: none; - transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1); - position: relative; - color: rgb(0 0 0 / 65%); - background-color: #fff; - border-color: #d9d9d9; -} - -.ant-btn > .anticon { - line-height: 1; -} - -.ant-btn, -.ant-btn:active, -.ant-btn:focus { - outline: 0; -} - -.ant-btn > a:only-child { - color: currentcolor; -} - -.ant-btn > a:only-child::after { - content: ""; - position: absolute; - top: 0; - left: 0; - bottom: 0; - right: 0; - background: transparent; -} - -.ant-btn:focus, -.ant-btn:hover { - color: #40a9ff; - background-color: #fff; - border-color: #40a9ff; -} - -.ant-btn:focus > a:only-child, -.ant-btn:hover > a:only-child { - color: currentcolor; -} - -.ant-btn:focus > a:only-child::after, -.ant-btn:hover > a:only-child::after { - content: ""; - position: absolute; - top: 0; - left: 0; - bottom: 0; - right: 0; - background: transparent; -} - -.ant-btn.active, -.ant-btn:active { - color: #096dd9; - background-color: #fff; - border-color: #096dd9; -} - -.ant-btn.active > a:only-child, -.ant-btn:active > a:only-child { - color: currentcolor; -} - -.ant-btn.active > a:only-child::after, -.ant-btn:active > a:only-child::after { - content: ""; - position: absolute; - top: 0; - left: 0; - bottom: 0; - right: 0; - background: transparent; -} - -.ant-btn.active, -.ant-btn:active, -.ant-btn:focus, -.ant-btn:hover { - background: #fff; - text-decoration: none; -} - -.ant-btn > i, -.ant-btn > span { - pointer-events: none; -} - -.ant-btn::before { - position: absolute; - top: -1px; - left: -1px; - bottom: -1px; - right: -1px; - background: #fff; - opacity: 0.35; - content: ""; - border-radius: inherit; - z-index: 1; - transition: opacity 0.2s; - pointer-events: none; - display: none; -} - -.ant-btn .anticon { - transition: margin-left 0.3s cubic-bezier(0.645, 0.045, 0.355, 1); -} - -.ant-btn:active > span, -.ant-btn:focus > span { - position: relative; -} - -.ant-btn > .anticon + span, -.ant-btn > span + .anticon { - margin-left: 8px; -} - -.fd-nav-container { - display: inline-block; - position: relative; -} - -.fd-nav-container .ghost-bar { - position: absolute; - width: 150px; - height: 100%; - left: 0; - background: #1583f2; - transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1); -} - -.fd-nav-container .ghost-bar::after { - content: ""; - position: absolute; - bottom: 0; - left: 50%; - margin-left: -5px; - width: 0; - height: 0; - border-style: solid; - border-width: 0 5px 6px; - border-color: transparent transparent #f6f6f6; -} - -.fd-nav-item { - position: relative; - cursor: pointer; - display: inline-block; - line-height: 60px; - width: 150px; - text-align: center; - white-space: nowrap; -} - -.fd-nav-item .order-num { - display: inline-block; - width: 20px; - height: 20px; - line-height: 20px; - border: 1px solid #fff; - border-radius: 50%; - margin-right: 6px; - transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1); -} - -.fd-nav-item.active .order-num { - color: #1583f2; - background: #fff; -} - -.ant-input { - font-family: "Chinese Quote", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; - font-variant: tabular-nums; - box-sizing: border-box; - margin: 0; - list-style: none; - position: relative; - display: inline-block; - padding: 4px 11px; - width: 100%; - height: 32px; - font-size: 14px; - line-height: 1.5; - color: rgb(0 0 0 / 65%); - background-color: #fff; - background-image: none; - border: 1px solid #d9d9d9; - border-radius: 4px; - transition: all 0.3s; -} - -.ant-input::placeholder { - color: #bfbfbf; - opacity: 1; -} - -/* .ant-input:input-placeholder { - color: #bfbfbf; -} */ - -/* .ant-input::input-placeholder { - color: #bfbfbf; -} */ - -.ant-input:focus, -.ant-input:hover { - border-color: #40a9ff; - border-right-width: 1px !important; -} - -.ant-input:focus { - outline: 0; - box-shadow: 0 0 0 2px rgb(24 144 255 / 20%); -} - -textarea.ant-input { - max-width: 100%; - height: auto; - vertical-align: bottom; - transition: all 0.3s, height 0s; - min-height: 32px; -} - -a, -abbr, -acronym, -address, -applet, -article, -aside, -audio, -b, -big, -blockquote, -body, -canvas, -caption, -center, -cite, -code, -dd, -del, -details, -dfn, -div, -dl, -dt, -em, -fieldset, -figcaption, -figure, -footer, -form, -h1, -h2, -h3, -h4, -h5, -h6, -header, -hgroup, -html, -i, -iframe, -img, -ins, -kbd, -label, -legend, -li, -mark, -menu, -nav, -object, -ol, -p, -pre, -q, -s, -samp, -section, -small, -span, -strike, -strong, -sub, -summary, -sup, -table, -tbody, -td, -tfoot, -th, -thead, -time, -tr, -tt, -u, -ul, -var, -video { - margin: 0; - padding: 0; - border: 0; - outline: 0; - font-size: 100%; - - /* font: inherit; */ - vertical-align: baseline; -} - -/* *, -::after, -::before { - box-sizing: border-box; -} - -html { - font-family: sans-serif; - text-size-adjust: 100%; -} - -body, -html { - font-size: 14px; -} - -body { - font-family: "Microsoft Yahei", "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; - line-height: 1.6; - background-color: #fff; - position: static !important; - -webkit-tap-highlight-color: rgb(0 0 0 / 0%); -} */ - -ol, -ul { - list-style-type: none; -} - -/* b, -strong { - font-weight: 700; -} - -img { - border: 0; -} */ - -button, -input, -select, -textarea { - font-family: inherit; - font-size: 100%; - margin: 0; -} - -/* textarea { - overflow: auto; - vertical-align: top; - appearance: none; -} - -button, -input { - line-height: normal; -} - -button, -select { - text-transform: none; -} */ - -button, -html input[type="button"], -input[type="reset"], -input[type="submit"] { - appearance: button; - cursor: pointer; -} - -input[type="search"] { - appearance: textfield; - box-sizing: content-box; -} - -input[type="search"]::-webkit-search-cancel-button, -input[type="search"]::-webkit-search-decoration { - appearance: none; -} - -button::-moz-focus-inner, -input::-moz-focus-inner { - border: 0; - padding: 0; -} - -/* table { - width: 100%; - border-spacing: 0; - border-collapse: collapse; -} */ - -table, -td, -th { - border: 0; -} - -td, -th { - padding: 0; - vertical-align: top; -} - -/* th { - font-weight: 700; - text-align: left; -} */ - -thead th { - white-space: nowrap; -} - -/* a { - text-decoration: none; - cursor: pointer; - color: #3296fa; -} - -a:active, -a:hover { - outline: 0; - color: #3296fa; -} - -small { - font-size: 80%; -} - -body, -html { - font-size: 12px !important; - color: #191f25 !important; - background: #f6f6f6 !important; -} */ - -.wrap { - display: -webkit-box; - display: flexbox; - display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - flex-direction: column; - height: 100%; -} - -@font-face { - font-family: IconFont; - src: url("//at.alicdn.com/t/font_135284_ph2thxxbzgf.eot"); - src: url("//at.alicdn.com/t/font_135284_ph2thxxbzgf.eot?#iefix") format("embedded-opentype"), url("//at.alicdn.com/t/font_135284_ph2thxxbzgf.woff") format("woff"), url("//at.alicdn.com/t/font_135284_ph2thxxbzgf.ttf") format("truetype"), url("//at.alicdn.com/t/font_135284_ph2thxxbzgf.svg#IconFont") format("svg"); -} - -.iconfont { - font-family: IconFont !important; - font-size: 16px; - font-style: normal; - -webkit-font-smoothing: antialiased; - -webkit-text-stroke-width: 0.2px; - -moz-osx-font-smoothing: grayscale; -} - -.fd-nav { - position: fixed; - top: 0; - left: 0; - right: 0; - z-index: 997; - width: 100%; - height: 60px; - font-size: 14px; - color: #fff; - background: #3296fa; - display: flex; - align-items: center; -} - -.fd-nav > * { - flex: 1; - width: 100%; -} - -.fd-nav .fd-nav-left { - display: -webkit-box; - display: flex; - align-items: center; -} - -.fd-nav .fd-nav-center { - flex: none; - width: 600px; - text-align: center; -} - -.fd-nav .fd-nav-right { - display: flex; - align-items: center; - justify-content: flex-end; - text-align: right; -} - -.fd-nav .fd-nav-back { - display: inline-block; - width: 60px; - height: 60px; - font-size: 22px; - border-right: 1px solid #1583f2; - text-align: center; - cursor: pointer; -} - -.fd-nav .fd-nav-back:hover { - background: #5af; -} - -.fd-nav .fd-nav-back:active { - background: #1583f2; -} - -.fd-nav .fd-nav-back .anticon { - line-height: 60px; -} - -.fd-nav .fd-nav-title { - width: 0; - flex: 1; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - padding: 0 15px; -} - -.fd-nav a { - color: #fff; - margin-left: 12px; -} - -.fd-nav .button-publish { - min-width: 80px; - margin-left: 4px; - margin-right: 15px; - color: #3296fa; - border-color: #fff; -} - -.fd-nav .button-publish.ant-btn:focus, -.fd-nav .button-publish.ant-btn:hover { - color: #3296fa; - border-color: #fff; - box-shadow: 0 10px 20px 0 rgb(0 0 0 / 30%); -} - -.fd-nav .button-publish.ant-btn:active { - color: #3296fa; - background: #d6eaff; - box-shadow: none; -} - -.fd-nav .button-preview { - min-width: 80px; - margin-left: 16px; - margin-right: 4px; - color: #fff; - border-color: #fff; - background: transparent; -} - -.fd-nav .button-preview.ant-btn:focus, -.fd-nav .button-preview.ant-btn:hover { - color: #fff; - border-color: #fff; - background: #59acfc; -} - -.fd-nav .button-preview.ant-btn:active { - color: #fff; - border-color: #fff; - background: #2186ef; -} - -.fd-nav-content { - /* position: fixed; - top: 60px; - left: 0; - right: 0; - bottom: 0; - z-index: 1; */ - overflow-x: hidden; - overflow-y: auto; - padding-bottom: 30px; -} - -.error-modal-desc { - font-size: 13px; - color: rgb(25 31 37 / 56%); - line-height: 22px; - margin-bottom: 14px; -} - -.error-modal-list { - height: 200px; - overflow-y: auto; - margin-right: -25px; - padding-right: 25px; -} - -.error-modal-item { - padding: 10px 20px; - line-height: 21px; - background: #f6f6f6; - display: flex; - justify-content: space-between; - align-items: center; - margin-bottom: 8px; - border-radius: 4px; -} - -.error-modal-item-label { - flex: none; - font-size: 15px; - color: rgb(25 31 37 / 56%); - padding-right: 10px; -} - -.error-modal-item-content { - text-align: right; - flex: 1; - font-size: 13px; - color: #191f25; -} - -#body.blur { - filter: blur(3px); -} - -.zoom { - display: flex; - - /* position: fixed; */ - position: relative; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - -webkit-box-pack: justify; - -ms-flex-pack: justify; - justify-content: space-between; - height: 40px; - width: 125px; - right: 40px; - margin-top: 30px; - z-index: 10; -} - -.zoom .zoom-in, -.zoom .zoom-out { - width: 30px; - height: 30px; - background: #fff; - color: #c1c1cd; - cursor: pointer; - background-size: 100%; - background-repeat: no-repeat; -} - -.zoom .zoom-out { - background-image: url("https://gw.alicdn.com/tfs/TB1s0qhBHGYBuNjy0FoXXciBFXa-90-90.png"); -} - -.zoom .zoom-out.disabled { - opacity: 0.5; -} - -.zoom .zoom-in { - background-image: url("https://gw.alicdn.com/tfs/TB1UIgJBTtYBeNjy1XdXXXXyVXa-90-90.png"); -} - -.zoom .zoom-in.disabled { - opacity: 0.5; -} - -.auto-judge:hover .editable-title, -.node-wrap-box:hover .editable-title { - border-bottom: 1px dashed #fff; -} - -.auto-judge:hover .editable-title.editing, -.node-wrap-box:hover .editable-title.editing { - text-decoration: none; - border: 1px solid #d9d9d9; -} - -.auto-judge:hover .editable-title { - border-color: #15bc83; -} - -.editable-title { - line-height: 15px; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - border-bottom: 1px dashed transparent; -} - -.editable-title::before { - content: ""; - position: absolute; - top: 0; - left: 0; - bottom: 0; - right: 40px; -} - -.editable-title:hover { - border-bottom: 1px dashed #fff; -} - -.editable-title-input { - flex: none; - height: 18px; - padding-left: 4px; - text-indent: 0; - font-size: 12px; - line-height: 18px; - z-index: 1; -} - -.editable-title-input:hover { - text-decoration: none; -} - -/* .ant-btn { - position: relative; -} */ - -.node-wrap-box { - display: inline-box; - display: inline-flexbox; - display: inline-flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - flex-direction: column; - position: relative; - width: 220px; - min-height: 72px; - -ms-flex-negative: 0; - flex-shrink: 0; - background: #fff; - border-radius: 4px; - cursor: pointer; -} - -.node-wrap-box::after { - pointer-events: none; - content: ""; - position: absolute; - top: 0; - bottom: 0; - left: 0; - right: 0; - z-index: 2; - border-radius: 4px; - border: 1px solid transparent; - transition: all 0.1s cubic-bezier(0.645, 0.045, 0.355, 1); - box-shadow: 0 2px 5px 0 rgb(0 0 0 / 10%); -} - -.node-wrap-box.active::after, -.node-wrap-box:active::after, -.node-wrap-box:hover::after { - border: 1px solid #3296fa; - box-shadow: 0 0 6px 0 rgb(50 150 250 / 30%); -} - -.node-wrap-box.active .close, -.node-wrap-box:active .close, -.node-wrap-box:hover .close { - display: block; -} - -.node-wrap-box.error::after { - border: 1px solid #f25643; - box-shadow: 0 2px 5px 0 rgb(0 0 0 / 10%); -} - -.node-wrap-box .title { - position: relative; - display: flex; - align-items: center; - padding-left: 16px; - padding-right: 30px; - width: 100%; - height: 24px; - line-height: 24px; - font-size: 12px; - color: #fff; - text-align: left; - background: #576a95; - border-radius: 4px 4px 0 0; -} - -.node-wrap-box .title .iconfont { - font-size: 12px; - margin-right: 5px; -} - -.node-wrap-box .placeholder { - color: #bfbfbf; -} - -.node-wrap-box .close { - display: none; - position: absolute; - right: 10px; - top: 50%; - transform: translateY(-50%); - width: 20px; - height: 20px; - font-size: 14px; - color: #fff; - border-radius: 50%; - text-align: center; - line-height: 20px; -} - -.node-wrap-box .content { - position: relative; - font-size: 14px; - padding: 16px; - padding-right: 30px; -} - -.node-wrap-box .content .text { - overflow: hidden; - text-overflow: ellipsis; - display: -webkit-box; - -webkit-line-clamp: 3; - -webkit-box-orient: vertical; -} - -.node-wrap-box .content .arrow { - position: absolute; - right: 10px; - top: 50%; - transform: translateY(-50%); - width: 20px; - height: 14px; - font-size: 14px; - color: #979797; -} - -.start-node.node-wrap-box .content .text { - display: block; - white-space: nowrap; -} - -.node-wrap-box::before { - content: ""; - position: absolute; - top: -12px; - left: 50%; - transform: translateX(-50%); - width: 0; - height: 4px; - border-style: solid; - border-width: 8px 6px 4px; - border-color: #cacaca transparent transparent; - background: #f5f5f7; -} - -.node-wrap-box.start-node::before { - content: none; -} - -.top-left-cover-line { - left: -1px; -} - -.top-left-cover-line, -.top-right-cover-line { - position: absolute; - height: 8px; - width: 50%; - background-color: #f5f5f7; - top: -4px; -} - -.top-right-cover-line { - right: -1px; -} - -.bottom-left-cover-line { - left: -1px; -} - -.bottom-left-cover-line, -.bottom-right-cover-line { - position: absolute; - height: 8px; - width: 50%; - background-color: #f5f5f7; - bottom: -4px; -} - -.bottom-right-cover-line { - right: -1px; -} - -.dingflow-design { - width: 100%; - background-color: #f5f5f7; - overflow: auto; - - /* position: absolute; - bottom: 0; - left: 0; - right: 0; - top: 0; */ -} - -.dingflow-design .box-scale { - transform: scale(1); - display: inline-block; - position: relative; - width: 100%; - padding: 54.5px 0; - -webkit-box-align: start; - -ms-flex-align: start; - align-items: flex-start; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - flex-wrap: wrap; - min-width: min-content; - - /* background-color: #f5f8ff; */ - transform-origin: 50% 0 0; -} - -.dingflow-design .node-wrap { - flex-direction: column; - -webkit-box-pack: start; - -ms-flex-pack: start; - justify-content: flex-start; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - - /* flex-wrap: wrap; */ - -webkit-box-flex: 1; - -ms-flex-positive: 1; - padding: 0 50px; - position: relative; -} - -.dingflow-design .branch-wrap, -.dingflow-design .node-wrap { - display: inline-flex; - width: 100%; -} - -.dingflow-design .branch-box-wrap { - display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - flex-direction: column; - - /* flex-wrap: wrap; */ - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - min-height: 270px; - width: 100%; - -ms-flex-negative: 0; - flex-shrink: 0; -} - -.dingflow-design .branch-box { - display: flex; - overflow: visible; - min-height: 180px; - height: auto; - border-bottom: 2px solid #ccc; - border-top: 2px solid #ccc; - position: relative; - margin-top: 15px; -} - -.dingflow-design .branch-box .col-box { - background: #f5f5f7; -} - -.dingflow-design .branch-box .col-box::before { - content: ""; - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - z-index: 0; - margin: auto; - width: 2px; - height: 100%; - background-color: #cacaca; -} - -.dingflow-design .add-branch { - border: none; - outline: none; - user-select: none; - justify-content: center; - font-size: 12px; - padding: 0 10px; - height: 30px; - line-height: 30px; - border-radius: 15px; - color: #3296fa; - background: #fff; - box-shadow: 0 2px 4px 0 rgb(0 0 0 / 10%); - position: absolute; - top: -16px; - left: 50%; - transform: translateX(-50%); - transform-origin: center center; - cursor: pointer; - z-index: 1; - display: inline-flex; - align-items: center; - transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1); -} - -.dingflow-design .add-branch:hover { - transform: translateX(-50%) scale(1.1); - box-shadow: 0 8px 16px 0 rgb(0 0 0 / 10%); -} - -.dingflow-design .add-branch:active { - transform: translateX(-50%); - box-shadow: none; -} - -.dingflow-design .col-box { - display: inline-flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - flex-direction: column; - -webkit-box-align: center; - align-items: center; - position: relative; -} - -.dingflow-design .condition-node { - min-height: 220px; -} - -.dingflow-design .condition-node, -.dingflow-design .condition-node-box { - display: inline-flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - flex-direction: column; - -webkit-box-flex: 1; -} - -.dingflow-design .condition-node-box { - padding-top: 30px; - padding-right: 50px; - padding-left: 50px; - -webkit-box-pack: center; - justify-content: center; - -webkit-box-align: center; - align-items: center; - flex-grow: 1; - position: relative; -} - -.dingflow-design .condition-node-box::before { - content: ""; - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - margin: auto; - width: 2px; - height: 100%; - background-color: #cacaca; -} - -.dingflow-design .auto-judge { - position: relative; - width: 220px; - min-height: 72px; - background: #fff; - border-radius: 4px; - padding: 14px 19px; - cursor: pointer; -} - -.dingflow-design .auto-judge::after { - pointer-events: none; - content: ""; - position: absolute; - top: 0; - bottom: 0; - left: 0; - right: 0; - z-index: 2; - border-radius: 4px; - border: 1px solid transparent; - transition: all 0.1s cubic-bezier(0.645, 0.045, 0.355, 1); - box-shadow: 0 2px 5px 0 rgb(0 0 0 / 10%); -} - -.dingflow-design .auto-judge.active::after, -.dingflow-design .auto-judge:active::after, -.dingflow-design .auto-judge:hover::after { - border: 1px solid #3296fa; - box-shadow: 0 0 6px 0 rgb(50 150 250 / 30%); -} - -.dingflow-design .auto-judge.active .close, -.dingflow-design .auto-judge:active .close, -.dingflow-design .auto-judge:hover .close { - display: block; -} - -.dingflow-design .auto-judge.error::after { - border: 1px solid #f25643; - box-shadow: 0 2px 5px 0 rgb(0 0 0 / 10%); -} - -.dingflow-design .auto-judge .title-wrapper { - position: relative; - font-size: 12px; - color: #15bc83; - text-align: left; - line-height: 16px; -} - -.dingflow-design .auto-judge .title-wrapper .editable-title { - display: inline-block; - max-width: 120px; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; -} - -.dingflow-design .auto-judge .title-wrapper .priority-title { - display: inline-block; - float: right; - margin-right: 10px; - color: rgb(25 31 37 / 56%); -} - -.dingflow-design .auto-judge .placeholder { - color: #bfbfbf; -} - -.dingflow-design .auto-judge .close { - display: none; - position: absolute; - right: -10px; - top: -10px; - width: 20px; - height: 20px; - font-size: 14px; - color: rgb(0 0 0 / 25%); - border-radius: 50%; - text-align: center; - line-height: 20px; - z-index: 2; -} - -.dingflow-design .auto-judge .content { - font-size: 14px; - color: #191f25; - text-align: left; - margin-top: 6px; - overflow: hidden; - text-overflow: ellipsis; - display: -webkit-box; - -webkit-line-clamp: 3; - -webkit-box-orient: vertical; -} - -.dingflow-design .auto-judge .sort-left, -.dingflow-design .auto-judge .sort-right { - position: absolute; - top: 0; - bottom: 0; - display: none; - z-index: 1; -} - -.dingflow-design .auto-judge .sort-left { - left: 0; - border-right: 1px solid #f6f6f6; -} - -.dingflow-design .auto-judge .sort-right { - right: 0; - border-left: 1px solid #f6f6f6; -} - -.dingflow-design .auto-judge:hover .sort-left, -.dingflow-design .auto-judge:hover .sort-right { - display: flex; - align-items: center; -} - -.dingflow-design .auto-judge .sort-left:hover, -.dingflow-design .auto-judge .sort-right:hover { - background: #efefef; -} - -.dingflow-design .end-node { - display: flex; - justify-content: center; - align-items: center; - border-radius: 50%; - font-size: 14px; - color: rgb(25 31 37 / 40%); - text-align: left; -} - -.dingflow-design .end-node .end-node-circle { - width: 10px; - height: 10px; - margin: auto; - border-radius: 50%; - background: #dbdcdc; -} - -.dingflow-design .end-node .end-node-text { - margin-top: 5px; - text-align: center; -} - -.approval-setting { - border-radius: 2px; - margin: 20px 0; - position: relative; - background: #fff; -} - -/* .ant-btn { - position: relative; -} */ diff --git a/departments150.json b/departments150.json deleted file mode 100644 index aa6cc37..0000000 --- a/departments150.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "code": "200", - "msg": "操作成功", - "data": { - "childDepartments": [], - "employees": [{ - "id": "53128112", - "employeeName": "测试1", - "isLeave": "0", - "open": "false" - },{ - "id": "53128113", - "employeeName": "测试2", - "isLeave": "0", - "open": "false" - }], - "titleDepartments": [{ - "departmentId": "150", - "departmentKey": "RLXZB_V2", - "departmentName": "人力行政部", - "departmentNames": "人力行政部", - "id": "150", - "parentId": "0" - }] - } -} \ No newline at end of file diff --git a/plop-templates/component/index.hbs b/plop-templates/component/index.hbs deleted file mode 100644 index 162c0d3..0000000 --- a/plop-templates/component/index.hbs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/plop-templates/component/prompt.js b/plop-templates/component/prompt.js deleted file mode 100644 index 2b42bd2..0000000 --- a/plop-templates/component/prompt.js +++ /dev/null @@ -1,65 +0,0 @@ -const fs = require('fs') - -function getFolder(path) { - const components = [] - const files = fs.readdirSync(path) - files.forEach((item) => { - const stat = fs.lstatSync(`${path}/${item}`) - if (stat.isDirectory() === true && item !== 'components') { - components.push(`${path}/${item}`) - components.push(...getFolder(`${path}/${item}`)) - } - }) - return components -} - -module.exports = { - description: '创建组件', - prompts: [ - { - type: 'confirm', - name: 'isGlobal', - message: '是否为全局组件', - default: false, - }, - { - type: 'list', - name: 'path', - message: '请选择组件创建目录', - choices: getFolder('src/views'), - when: (answers) => { - return !answers.isGlobal - }, - }, - { - type: 'input', - name: 'name', - message: '请输入组件名称', - validate: (v) => { - if (!v || v.trim === '') { - return '组件名称不能为空' - } - else { - return true - } - }, - }, - ], - actions: (data) => { - let path = '' - if (data.isGlobal) { - path = 'src/components/{{properCase name}}/index.vue' - } - else { - path = `${data.path}/components/{{properCase name}}/index.vue` - } - const actions = [ - { - type: 'add', - path, - templateFile: 'plop-templates/component/index.hbs', - }, - ] - return actions - }, -} diff --git a/plop-templates/page/index.hbs b/plop-templates/page/index.hbs deleted file mode 100644 index acabfe3..0000000 --- a/plop-templates/page/index.hbs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - diff --git a/plop-templates/page/prompt.js b/plop-templates/page/prompt.js deleted file mode 100644 index 26c2d38..0000000 --- a/plop-templates/page/prompt.js +++ /dev/null @@ -1,54 +0,0 @@ -const path = require('path') -const fs = require('fs') - -function getFolder(path) { - const components = [] - const files = fs.readdirSync(path) - files.forEach((item) => { - const stat = fs.lstatSync(`${path}/${item}`) - if (stat.isDirectory() === true && item !== 'components') { - components.push(`${path}/${item}`) - components.push(...getFolder(`${path}/${item}`)) - } - }) - return components -} - -module.exports = { - description: '创建页面', - prompts: [ - { - type: 'list', - name: 'path', - message: '请选择页面创建目录', - choices: getFolder('src/views'), - }, - { - type: 'input', - name: 'name', - message: '请输入文件名', - validate: (v) => { - if (!v || v.trim === '') { - return '文件名不能为空' - } - else { - return true - } - }, - }, - ], - actions: (data) => { - const relativePath = path.relative('src/views', data.path) - const actions = [ - { - type: 'add', - path: `${data.path}/{{camelCase name}}.vue`, - templateFile: 'plop-templates/page/index.hbs', - data: { - componentName: `${relativePath} ${data.name}`, - }, - }, - ] - return actions - }, -} diff --git a/plop-templates/store/index.hbs b/plop-templates/store/index.hbs deleted file mode 100644 index b3336c5..0000000 --- a/plop-templates/store/index.hbs +++ /dev/null @@ -1,11 +0,0 @@ -const use{{ properCase name }}Store = defineStore( - // 唯一ID - '{{ camelCase name }}', - { - state: () => ({}), - getters: {}, - actions: {}, - }, -) - -export default use{{ properCase name }}Store diff --git a/plop-templates/store/prompt.js b/plop-templates/store/prompt.js deleted file mode 100644 index 2cefa24..0000000 --- a/plop-templates/store/prompt.js +++ /dev/null @@ -1,28 +0,0 @@ -module.exports = { - description: '创建全局状态', - prompts: [ - { - type: 'input', - name: 'name', - message: '请输入模块名称', - validate: (v) => { - if (!v || v.trim === '') { - return '模块名称不能为空' - } - else { - return true - } - }, - }, - ], - actions: () => { - const actions = [ - { - type: 'add', - path: 'src/store/modules/{{camelCase name}}.ts', - templateFile: 'plop-templates/store/index.hbs', - }, - ] - return actions - }, -} diff --git a/src/api/api/index.ts b/src/api/api/index.ts index 325777a..4541b77 100644 --- a/src/api/api/index.ts +++ b/src/api/api/index.ts @@ -265,7 +265,7 @@ // 设备监测趋势分析 export function getDeviceDetailAnalysis(params: object) { return request({ - url: '/deviceCollectionLog/detailAnalysis', + url: '/deviceCollectionLog/detail-analysis', method: 'get', params, }) diff --git a/src/components.d.ts b/src/components.d.ts index 419ee11..a1b0897 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -7,13 +7,10 @@ declare module '@vue/runtime-core' { export interface GlobalComponents { - AddNode: typeof import('./components/workFlow/addNode.vue')['default'] - AddNodeBan: typeof import('./components/workFlow/addNodeBan.vue')['default'] AddressSelect: typeof import('./components/AddressSelect/AddressSelect.vue')['default'] AppContainer: typeof import('./components/AppContainer/index.vue')['default'] ApprovalDialog: typeof import('./components/Approval/ApprovalDialog.vue')['default'] ApprovalRecord: typeof import('./components/ApprovalRecord/ApprovalRecord.vue')['default'] - ApproverDrawer: typeof import('./components/drawer/approverDrawer.vue')['default'] Auth: typeof import('./components/Auth/index.vue')['default'] AuthAll: typeof import('./components/AuthAll/index.vue')['default'] BarChartHorizontal: typeof import('./components/Echart/BarChartHorizontal.vue')['default'] @@ -23,10 +20,6 @@ BatchActionBar: typeof import('./components/BatchActionBar/index.vue')['default'] BenchCol: typeof import('./components/benchCol/index.vue')['default'] ButtonBox: typeof import('./components/buttonBox/buttonBox.vue')['default'] - CertificationMonitor: typeof import('./components/Sample/certificationMonitor.vue')['default'] - CertificationRecords: typeof import('./components/Sample/certificationRecords.vue')['default'] - ConditionDrawer: typeof import('./components/drawer/conditionDrawer.vue')['default'] - CopyerDrawer: typeof import('./components/drawer/copyerDrawer.vue')['default'] Copyright: typeof import('./components/Copyright/index.vue')['default'] DeptSelect: typeof import('./components/DeptSelect/index.vue')['default'] DetailBlock: typeof import('./components/DetailPage/DetailBlock.vue')['default'] @@ -44,19 +37,14 @@ InfoWindow2: typeof import('./components/map/infoWindow2.vue')['default'] LineChart: typeof import('./components/Echart/LineChart.vue')['default'] Map: typeof import('./components/map/index.vue')['default'] - MeasureRecords: typeof import('./components/Sample/measureRecords.vue')['default'] - NodeWrap: typeof import('./components/workFlow/nodeWrap.vue')['default'] - NodeWrapBan: typeof import('./components/workFlow/nodeWrapBan.vue')['default'] NormalTable: typeof import('./components/NormalTable/index.vue')['default'] PageHeader: typeof import('./components/PageHeader/index.vue')['default'] PageMain: typeof import('./components/PageMain/index.vue')['default'] PcasCascader: typeof import('./components/PcasCascader/index.vue')['default'] PieChart: typeof import('./components/Echart/PieChart.vue')['default'] - PromoterDrawer: typeof import('./components/drawer/promoterDrawer.vue')['default'] QrDialog: typeof import('./components/QrDialog/index.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] - ScanSampleDialog: typeof import('./components/ScanSampleDialog/index.vue')['default'] SearchArea: typeof import('./components/SearchArea/index.vue')['default'] SearchBar: typeof import('./components/SearchBar/index.vue')['default'] SearchItem: typeof import('./components/SearchArea/SearchItem.vue')['default'] diff --git a/src/components/Echart/LineChart.vue b/src/components/Echart/LineChart.vue index 841e0cb..fefb873 100644 --- a/src/components/Echart/LineChart.vue +++ b/src/components/Echart/LineChart.vue @@ -45,14 +45,14 @@ default: () => { return { show: true, - icon: 'circle', - orient: 'vertile', // 图例方向 - align: 'left', // 图例标记和文本的对齐,默认自动 - top: 5, - right: 20, - itemWidth: 12, - itemHeight: 12, - padding: [0, 0, 0, 120], + // icon: 'circle', + orient: 'horizontal', // 图例方向 + // align: 'left', // 图例标记和文本的对齐,默认自动 + // top: 5, + // right: 20, + // itemWidth: 12, + // itemHeight: 12, + // padding: [0, 0, 0, 120], } }, }, @@ -151,7 +151,7 @@ */ gradient: { type: Boolean, - default: true, + default: false, }, /** * y轴最大值 @@ -172,7 +172,7 @@ */ smooth: { type: Boolean, - default: true, + default: false, }, }) @@ -192,9 +192,21 @@ ) // 构建option function buildOption() { - const option: lineOption = { + const option: any = { grid: props.grid, legend: props.legend, // 图例 + toolbox: { + show: true, + feature: { + dataZoom: { + yAxisIndex: 'none', + }, + dataView: { readOnly: false }, + magicType: { type: ['line', 'bar'] }, + restore: {}, + saveAsImage: {}, + }, + }, tooltip: { trigger: 'axis', textStyle: { @@ -213,7 +225,7 @@ xAxis: [ { type: props.xAxisType, - boundaryGap: true, + boundaryGap: false, axisLine: { lineStyle: { color: props.axisLineColor, // 轴线的颜色 @@ -223,20 +235,20 @@ color: props.fontColor, // X轴名称颜色 fontSize: 14, }, - splitLine: { - show: false, - lineStyle: { - color: ['#7a6b74'], - type: props.axisLineType, - }, - }, + // splitLine: { + // show: false, + // lineStyle: { + // color: ['#7a6b74'], + // type: props.axisLineType, + // }, + // }, }, ], yAxis: [ { name: props.unit, type: 'value', - boundaryGap: true, + // boundaryGap: true, axisLine: { show: false, lineStyle: { @@ -252,7 +264,7 @@ show: true, lineStyle: { color: ['#bfbfbf'], - type: 'dashed', + type: 'solid', }, }, }, @@ -285,15 +297,24 @@ // 遍历data, 拆分轴线名称,数据和颜色 for (const itemIndex in props.data) { const item = props.data[itemIndex] - const series: lineSeriesOption = { + const series: any = { name: item.name, // 线系列名 type: 'line', - symbol: 'none', // 去掉折线节点 + // symbol: 'none', // 去掉折线节点 smooth: props.smooth, // 曲线平滑设置 lineStyle: { width: 2, }, data: item.data, + markPoint: { + data: [ + { type: 'max', name: 'Max' }, + { type: 'min', name: 'Min' }, + ], + }, + markLine: { + data: [{ type: 'average', name: 'Avg' }], + }, } // 线段颜色 if (item.color || props.colors.length > 0) { @@ -341,7 +362,6 @@ chart.resize() } } - window.addEventListener('resize', () => { chart.resize() }) @@ -352,7 +372,11 @@ - diff --git a/src/components/ScanSampleDialog/scan-interface.ts b/src/components/ScanSampleDialog/scan-interface.ts deleted file mode 100644 index 1c3aa33..0000000 --- a/src/components/ScanSampleDialog/scan-interface.ts +++ /dev/null @@ -1,12 +0,0 @@ -export interface ISampleScan { - sampleId?: string // 样品id - sampleNo: string // 样品编号 - sampleName: string // 样品名称 - sampleModel: string // 样品型号 - manufacturingNo: string // 出厂编号 - customerNo: string // 委托方代码 - customerName: string // 委托方名称 - orderId: string // 委托书id - orderNo: string // 委托书编号 - labelBind: string // 标签绑定 -} diff --git a/src/components/drawer/approverDrawer.vue b/src/components/drawer/approverDrawer.vue deleted file mode 100644 index 6fdad69..0000000 --- a/src/components/drawer/approverDrawer.vue +++ /dev/null @@ -1,458 +0,0 @@ - - - - - - - - diff --git a/src/components/drawer/conditionDrawer.vue b/src/components/drawer/conditionDrawer.vue deleted file mode 100644 index 3746fe7..0000000 --- a/src/components/drawer/conditionDrawer.vue +++ /dev/null @@ -1,401 +0,0 @@ - - - - - - diff --git a/src/components/drawer/copyerDrawer.vue b/src/components/drawer/copyerDrawer.vue deleted file mode 100644 index e06bd1f..0000000 --- a/src/components/drawer/copyerDrawer.vue +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - - diff --git a/src/components/drawer/promoterDrawer.vue b/src/components/drawer/promoterDrawer.vue deleted file mode 100644 index bdf885c..0000000 --- a/src/components/drawer/promoterDrawer.vue +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - diff --git a/src/components/workFlow/addNode.vue b/src/components/workFlow/addNode.vue deleted file mode 100644 index b773386..0000000 --- a/src/components/workFlow/addNode.vue +++ /dev/null @@ -1,243 +0,0 @@ - - - - - - - diff --git a/src/components/workFlow/addNodeBan.vue b/src/components/workFlow/addNodeBan.vue deleted file mode 100644 index 95a601f..0000000 --- a/src/components/workFlow/addNodeBan.vue +++ /dev/null @@ -1,235 +0,0 @@ - - - - - - - diff --git a/src/components/workFlow/nodeWrap.vue b/src/components/workFlow/nodeWrap.vue deleted file mode 100644 index 92b26e4..0000000 --- a/src/components/workFlow/nodeWrap.vue +++ /dev/null @@ -1,367 +0,0 @@ - - - - - diff --git a/src/components/workFlow/nodeWrapBan.vue b/src/components/workFlow/nodeWrapBan.vue deleted file mode 100644 index 4a3affb..0000000 --- a/src/components/workFlow/nodeWrapBan.vue +++ /dev/null @@ -1,156 +0,0 @@ - - - - - diff --git a/src/css/workflow.css b/src/css/workflow.css deleted file mode 100644 index f922b27..0000000 --- a/src/css/workflow.css +++ /dev/null @@ -1,1712 +0,0 @@ -body { - background: #eee; - margin: 0; - font-family: "Chinese Quote", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 14px; - font-variant: tabular-nums; - line-height: 1.5; - color: rgb(0 0 0 / 65%); - background-color: #fff; -} - -@font-face { - font-family: "Chinese Quote"; - src: local("PingFang SC"), local("SimSun"); - unicode-range: u+2018, u+2019, u+201c, u+201d; -} - -body, -html { - width: 100%; - - /* height: 100% */ -} - -input::-ms-clear, -input::-ms-reveal { - display: none; -} - -*, -::after, -::before { - box-sizing: border-box; -} - -html { - font-family: sans-serif; - line-height: 1.15; - text-size-adjust: 100%; - -ms-overflow-style: scrollbar; - -webkit-tap-highlight-color: rgb(0 0 0 / 0%); -} - -@viewport { - width: device-width; -} - -article, -aside, -dialog, -figcaption, -figure, -footer, -header, -hgroup, -main, -nav, -section { - display: block; -} - -[tabindex="-1"]:focus { - outline: none !important; -} - -hr { - box-sizing: content-box; - height: 0; - overflow: visible; -} - -h1, -h2, -h3, -h4, -h5, -h6 { - margin-top: 0; - margin-bottom: 0.5em; - color: rgb(0 0 0 / 85%); - font-weight: 500; -} - -p { - margin-top: 0; - margin-bottom: 1em; -} - -abbr[data-original-title], -abbr[title] { - text-decoration: underline; - text-decoration: underline dotted; - cursor: help; - border-bottom: 0; -} - -address { - margin-bottom: 1em; - font-style: normal; - line-height: inherit; -} - -input[type="number"], -input[type="password"], -input[type="text"], -textarea { - appearance: none; -} - -dl, -ol, -ul { - margin-top: 0; - margin-bottom: 1em; -} - -ol ol, -ol ul, -ul ol, -ul ul { - margin-bottom: 0; -} - -dt { - font-weight: 500; -} - -dd { - margin-bottom: 0.5em; - margin-left: 0; -} - -blockquote { - margin: 0 0 1em; -} - -dfn { - font-style: italic; -} - -b, -strong { - font-weight: bolder; -} - -small { - font-size: 80%; -} - -sub, -sup { - position: relative; - font-size: 75%; - line-height: 0; - vertical-align: baseline; -} - -sub { - bottom: -0.25em; -} - -sup { - top: -0.5em; -} - -a { - color: #1890ff; - background-color: transparent; - text-decoration: none; - outline: none; - cursor: pointer; - transition: color 0.3s; - text-decoration-skip: objects; -} - -a:focus { - text-decoration: underline; - text-decoration-skip: auto; -} - -a:hover { - color: #40a9ff; -} - -a:active { - color: #096dd9; -} - -a:active, -a:hover { - outline: 0; - text-decoration: none; -} - -code, -kbd, -pre, -samp { - font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; - font-size: 1em; -} - -pre { - margin-top: 0; - margin-bottom: 1em; - overflow: auto; -} - -figure { - margin: 0 0 1em; -} - -img { - vertical-align: middle; - border-style: none; -} - -svg:not(:root) { - overflow: hidden; -} - -[role="button"], -a, -area, -button, -input:not([type="range"]), -label, -select, -summary, -textarea { - touch-action: manipulation; -} - -table { - border-collapse: collapse; -} - -caption { - padding-top: 0.75em; - padding-bottom: 0.3em; - color: rgb(0 0 0 / 45%); - text-align: left; - caption-side: bottom; -} - -th { - text-align: inherit; -} - -button, -input, -optgroup, -select, -textarea { - margin: 0; - font-family: inherit; - font-size: inherit; - line-height: inherit; - color: inherit; -} - -button, -input { - overflow: visible; -} - -button, -select { - text-transform: none; -} - -[type="reset"], -[type="submit"], -button, -html [type="button"] { - appearance: button; -} - -[type="button"]::-moz-focus-inner, -[type="reset"]::-moz-focus-inner, -[type="submit"]::-moz-focus-inner, -button::-moz-focus-inner { - padding: 0; - border-style: none; -} - -input[type="checkbox"], -input[type="radio"] { - box-sizing: border-box; - padding: 0; -} - -input[type="date"], -input[type="datetime-local"], -input[type="month"], -input[type="time"] { - appearance: listbox; -} - -textarea { - overflow: auto; - resize: vertical; -} - -fieldset { - min-width: 0; - padding: 0; - margin: 0; - border: 0; -} - -legend { - display: block; - width: 100%; - max-width: 100%; - padding: 0; - margin-bottom: 0.5em; - font-size: 1.5em; - line-height: inherit; - color: inherit; - white-space: normal; -} - -progress { - vertical-align: baseline; -} - -[type="number"]::-webkit-inner-spin-button, -[type="number"]::-webkit-outer-spin-button { - height: auto; -} - -[type="search"] { - outline-offset: -2px; - appearance: none; -} - -[type="search"]::-webkit-search-cancel-button, -[type="search"]::-webkit-search-decoration { - appearance: none; -} - -::-webkit-file-upload-button { - font: inherit; - appearance: button; -} - -output { - display: inline-block; -} - -summary { - display: list-item; -} - -template { - display: none; -} - -[hidden] { - display: none !important; -} - -mark { - padding: 0.2em; - background-color: #feffe6; -} - -::selection { - background: #1890ff; - color: #fff; -} - -.clearfix { - zoom: 1; -} - -.clearfix::after, -.clearfix::before { - content: ""; - display: table; -} - -.clearfix::after { - clear: both; -} - -@font-face { - font-family: anticon; - font-display: fallback; - src: url("https://at.alicdn.com/t/font_148784_v4ggb6wrjmkotj4i.eot"); - src: url("https://at.alicdn.com/t/font_148784_v4ggb6wrjmkotj4i.woff") format("woff"), url("https://at.alicdn.com/t/font_148784_v4ggb6wrjmkotj4i.ttf") format("truetype"), url("https://at.alicdn.com/t/font_148784_v4ggb6wrjmkotj4i.svg#iconfont") format("svg"); -} - -.anticon { - display: inline-block; - font-style: normal; - vertical-align: baseline; - text-align: center; - text-transform: none; - line-height: 1; - text-rendering: optimizelegibility; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -.anticon::before { - display: block; - font-family: anticon !important; -} - -.anticon-close::before { - content: "\E633"; -} - -.anticon-right::before { - content: "\E61F"; -} - -.anticon-exclamation-circle { - color: rgb(242 86 67); -} - -.anticon-exclamation-circle::before { - content: "\E62C"; -} - -.anticon-left::before { - content: "\E620"; -} - -.anticon-close-circle::before { - content: "\E62E"; -} - -.ant-btn { - line-height: 1.5; - display: inline-block; - font-weight: 400; - text-align: center; - touch-action: manipulation; - cursor: pointer; - background-image: none; - border: 1px solid transparent; - white-space: nowrap; - padding: 0 15px; - font-size: 14px; - border-radius: 4px; - height: 32px; - user-select: none; - transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1); - position: relative; - color: rgb(0 0 0 / 65%); - background-color: #fff; - border-color: #d9d9d9; -} - -.ant-btn > .anticon { - line-height: 1; -} - -.ant-btn, -.ant-btn:active, -.ant-btn:focus { - outline: 0; -} - -.ant-btn > a:only-child { - color: currentcolor; -} - -.ant-btn > a:only-child::after { - content: ""; - position: absolute; - top: 0; - left: 0; - bottom: 0; - right: 0; - background: transparent; -} - -.ant-btn:focus, -.ant-btn:hover { - color: #40a9ff; - background-color: #fff; - border-color: #40a9ff; -} - -.ant-btn:focus > a:only-child, -.ant-btn:hover > a:only-child { - color: currentcolor; -} - -.ant-btn:focus > a:only-child::after, -.ant-btn:hover > a:only-child::after { - content: ""; - position: absolute; - top: 0; - left: 0; - bottom: 0; - right: 0; - background: transparent; -} - -.ant-btn.active, -.ant-btn:active { - color: #096dd9; - background-color: #fff; - border-color: #096dd9; -} - -.ant-btn.active > a:only-child, -.ant-btn:active > a:only-child { - color: currentcolor; -} - -.ant-btn.active > a:only-child::after, -.ant-btn:active > a:only-child::after { - content: ""; - position: absolute; - top: 0; - left: 0; - bottom: 0; - right: 0; - background: transparent; -} - -.ant-btn.active, -.ant-btn:active, -.ant-btn:focus, -.ant-btn:hover { - background: #fff; - text-decoration: none; -} - -.ant-btn > i, -.ant-btn > span { - pointer-events: none; -} - -.ant-btn::before { - position: absolute; - top: -1px; - left: -1px; - bottom: -1px; - right: -1px; - background: #fff; - opacity: 0.35; - content: ""; - border-radius: inherit; - z-index: 1; - transition: opacity 0.2s; - pointer-events: none; - display: none; -} - -.ant-btn .anticon { - transition: margin-left 0.3s cubic-bezier(0.645, 0.045, 0.355, 1); -} - -.ant-btn:active > span, -.ant-btn:focus > span { - position: relative; -} - -.ant-btn > .anticon + span, -.ant-btn > span + .anticon { - margin-left: 8px; -} - -.fd-nav-container { - display: inline-block; - position: relative; -} - -.fd-nav-container .ghost-bar { - position: absolute; - width: 150px; - height: 100%; - left: 0; - background: #1583f2; - transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1); -} - -.fd-nav-container .ghost-bar::after { - content: ""; - position: absolute; - bottom: 0; - left: 50%; - margin-left: -5px; - width: 0; - height: 0; - border-style: solid; - border-width: 0 5px 6px; - border-color: transparent transparent #f6f6f6; -} - -.fd-nav-item { - position: relative; - cursor: pointer; - display: inline-block; - line-height: 60px; - width: 150px; - text-align: center; - white-space: nowrap; -} - -.fd-nav-item .order-num { - display: inline-block; - width: 20px; - height: 20px; - line-height: 20px; - border: 1px solid #fff; - border-radius: 50%; - margin-right: 6px; - transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1); -} - -.fd-nav-item.active .order-num { - color: #1583f2; - background: #fff; -} - -.ant-input { - font-family: "Chinese Quote", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; - font-variant: tabular-nums; - box-sizing: border-box; - margin: 0; - list-style: none; - position: relative; - display: inline-block; - padding: 4px 11px; - width: 100%; - height: 32px; - font-size: 14px; - line-height: 1.5; - color: rgb(0 0 0 / 65%); - background-color: #fff; - background-image: none; - border: 1px solid #d9d9d9; - border-radius: 4px; - transition: all 0.3s; -} - -.ant-input::placeholder { - color: #bfbfbf; - opacity: 1; -} - -/* .ant-input:input-placeholder { - color: #bfbfbf; -} */ - -/* .ant-input::input-placeholder { - color: #bfbfbf; -} */ - -.ant-input:focus, -.ant-input:hover { - border-color: #40a9ff; - border-right-width: 1px !important; -} - -.ant-input:focus { - outline: 0; - box-shadow: 0 0 0 2px rgb(24 144 255 / 20%); -} - -textarea.ant-input { - max-width: 100%; - height: auto; - vertical-align: bottom; - transition: all 0.3s, height 0s; - min-height: 32px; -} - -a, -abbr, -acronym, -address, -applet, -article, -aside, -audio, -b, -big, -blockquote, -body, -canvas, -caption, -center, -cite, -code, -dd, -del, -details, -dfn, -div, -dl, -dt, -em, -fieldset, -figcaption, -figure, -footer, -form, -h1, -h2, -h3, -h4, -h5, -h6, -header, -hgroup, -html, -i, -iframe, -img, -ins, -kbd, -label, -legend, -li, -mark, -menu, -nav, -object, -ol, -p, -pre, -q, -s, -samp, -section, -small, -span, -strike, -strong, -sub, -summary, -sup, -table, -tbody, -td, -tfoot, -th, -thead, -time, -tr, -tt, -u, -ul, -var, -video { - margin: 0; - padding: 0; - border: 0; - outline: 0; - font-size: 100%; - - /* font: inherit; */ - vertical-align: baseline; -} - -/* *, -::after, -::before { - box-sizing: border-box; -} - -html { - font-family: sans-serif; - text-size-adjust: 100%; -} - -body, -html { - font-size: 14px; -} - -body { - font-family: "Microsoft Yahei", "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; - line-height: 1.6; - background-color: #fff; - position: static !important; - -webkit-tap-highlight-color: rgb(0 0 0 / 0%); -} */ - -ol, -ul { - list-style-type: none; -} - -/* b, -strong { - font-weight: 700; -} - -img { - border: 0; -} */ - -button, -input, -select, -textarea { - font-family: inherit; - font-size: 100%; - margin: 0; -} - -/* textarea { - overflow: auto; - vertical-align: top; - appearance: none; -} - -button, -input { - line-height: normal; -} - -button, -select { - text-transform: none; -} */ - -button, -html input[type="button"], -input[type="reset"], -input[type="submit"] { - appearance: button; - cursor: pointer; -} - -input[type="search"] { - appearance: textfield; - box-sizing: content-box; -} - -input[type="search"]::-webkit-search-cancel-button, -input[type="search"]::-webkit-search-decoration { - appearance: none; -} - -button::-moz-focus-inner, -input::-moz-focus-inner { - border: 0; - padding: 0; -} - -/* table { - width: 100%; - border-spacing: 0; - border-collapse: collapse; -} */ - -table, -td, -th { - border: 0; -} - -td, -th { - padding: 0; - vertical-align: top; -} - -/* th { - font-weight: 700; - text-align: left; -} */ - -thead th { - white-space: nowrap; -} - -/* a { - text-decoration: none; - cursor: pointer; - color: #3296fa; -} - -a:active, -a:hover { - outline: 0; - color: #3296fa; -} - -small { - font-size: 80%; -} - -body, -html { - font-size: 12px !important; - color: #191f25 !important; - background: #f6f6f6 !important; -} */ - -.wrap { - display: -webkit-box; - display: flexbox; - display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - flex-direction: column; - height: 100%; -} - -@font-face { - font-family: IconFont; - src: url("//at.alicdn.com/t/font_135284_ph2thxxbzgf.eot"); - src: url("//at.alicdn.com/t/font_135284_ph2thxxbzgf.eot?#iefix") format("embedded-opentype"), url("//at.alicdn.com/t/font_135284_ph2thxxbzgf.woff") format("woff"), url("//at.alicdn.com/t/font_135284_ph2thxxbzgf.ttf") format("truetype"), url("//at.alicdn.com/t/font_135284_ph2thxxbzgf.svg#IconFont") format("svg"); -} - -.iconfont { - font-family: IconFont !important; - font-size: 16px; - font-style: normal; - -webkit-font-smoothing: antialiased; - -webkit-text-stroke-width: 0.2px; - -moz-osx-font-smoothing: grayscale; -} - -.fd-nav { - position: fixed; - top: 0; - left: 0; - right: 0; - z-index: 997; - width: 100%; - height: 60px; - font-size: 14px; - color: #fff; - background: #3296fa; - display: flex; - align-items: center; -} - -.fd-nav > * { - flex: 1; - width: 100%; -} - -.fd-nav .fd-nav-left { - display: -webkit-box; - display: flex; - align-items: center; -} - -.fd-nav .fd-nav-center { - flex: none; - width: 600px; - text-align: center; -} - -.fd-nav .fd-nav-right { - display: flex; - align-items: center; - justify-content: flex-end; - text-align: right; -} - -.fd-nav .fd-nav-back { - display: inline-block; - width: 60px; - height: 60px; - font-size: 22px; - border-right: 1px solid #1583f2; - text-align: center; - cursor: pointer; -} - -.fd-nav .fd-nav-back:hover { - background: #5af; -} - -.fd-nav .fd-nav-back:active { - background: #1583f2; -} - -.fd-nav .fd-nav-back .anticon { - line-height: 60px; -} - -.fd-nav .fd-nav-title { - width: 0; - flex: 1; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - padding: 0 15px; -} - -.fd-nav a { - color: #fff; - margin-left: 12px; -} - -.fd-nav .button-publish { - min-width: 80px; - margin-left: 4px; - margin-right: 15px; - color: #3296fa; - border-color: #fff; -} - -.fd-nav .button-publish.ant-btn:focus, -.fd-nav .button-publish.ant-btn:hover { - color: #3296fa; - border-color: #fff; - box-shadow: 0 10px 20px 0 rgb(0 0 0 / 30%); -} - -.fd-nav .button-publish.ant-btn:active { - color: #3296fa; - background: #d6eaff; - box-shadow: none; -} - -.fd-nav .button-preview { - min-width: 80px; - margin-left: 16px; - margin-right: 4px; - color: #fff; - border-color: #fff; - background: transparent; -} - -.fd-nav .button-preview.ant-btn:focus, -.fd-nav .button-preview.ant-btn:hover { - color: #fff; - border-color: #fff; - background: #59acfc; -} - -.fd-nav .button-preview.ant-btn:active { - color: #fff; - border-color: #fff; - background: #2186ef; -} - -.fd-nav-content { - /* position: fixed; - top: 60px; - left: 0; - right: 0; - bottom: 0; - z-index: 1; */ - overflow-x: hidden; - overflow-y: auto; - padding-bottom: 30px; -} - -.error-modal-desc { - font-size: 13px; - color: rgb(25 31 37 / 56%); - line-height: 22px; - margin-bottom: 14px; -} - -.error-modal-list { - height: 200px; - overflow-y: auto; - margin-right: -25px; - padding-right: 25px; -} - -.error-modal-item { - padding: 10px 20px; - line-height: 21px; - background: #f6f6f6; - display: flex; - justify-content: space-between; - align-items: center; - margin-bottom: 8px; - border-radius: 4px; -} - -.error-modal-item-label { - flex: none; - font-size: 15px; - color: rgb(25 31 37 / 56%); - padding-right: 10px; -} - -.error-modal-item-content { - text-align: right; - flex: 1; - font-size: 13px; - color: #191f25; -} - -#body.blur { - filter: blur(3px); -} - -.zoom { - display: flex; - - /* position: fixed; */ - position: relative; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - -webkit-box-pack: justify; - -ms-flex-pack: justify; - justify-content: space-between; - height: 40px; - width: 125px; - right: 40px; - margin-top: 30px; - z-index: 10; -} - -.zoom .zoom-in, -.zoom .zoom-out { - width: 30px; - height: 30px; - background: #fff; - color: #c1c1cd; - cursor: pointer; - background-size: 100%; - background-repeat: no-repeat; -} - -.zoom .zoom-out { - background-image: url("https://gw.alicdn.com/tfs/TB1s0qhBHGYBuNjy0FoXXciBFXa-90-90.png"); -} - -.zoom .zoom-out.disabled { - opacity: 0.5; -} - -.zoom .zoom-in { - background-image: url("https://gw.alicdn.com/tfs/TB1UIgJBTtYBeNjy1XdXXXXyVXa-90-90.png"); -} - -.zoom .zoom-in.disabled { - opacity: 0.5; -} - -.auto-judge:hover .editable-title, -.node-wrap-box:hover .editable-title { - border-bottom: 1px dashed #fff; -} - -.auto-judge:hover .editable-title.editing, -.node-wrap-box:hover .editable-title.editing { - text-decoration: none; - border: 1px solid #d9d9d9; -} - -.auto-judge:hover .editable-title { - border-color: #15bc83; -} - -.editable-title { - line-height: 15px; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - border-bottom: 1px dashed transparent; -} - -.editable-title::before { - content: ""; - position: absolute; - top: 0; - left: 0; - bottom: 0; - right: 40px; -} - -.editable-title:hover { - border-bottom: 1px dashed #fff; -} - -.editable-title-input { - flex: none; - height: 18px; - padding-left: 4px; - text-indent: 0; - font-size: 12px; - line-height: 18px; - z-index: 1; -} - -.editable-title-input:hover { - text-decoration: none; -} - -/* .ant-btn { - position: relative; -} */ - -.node-wrap-box { - display: inline-box; - display: inline-flexbox; - display: inline-flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - flex-direction: column; - position: relative; - width: 220px; - min-height: 72px; - -ms-flex-negative: 0; - flex-shrink: 0; - background: #fff; - border-radius: 4px; - cursor: pointer; -} - -.node-wrap-box::after { - pointer-events: none; - content: ""; - position: absolute; - top: 0; - bottom: 0; - left: 0; - right: 0; - z-index: 2; - border-radius: 4px; - border: 1px solid transparent; - transition: all 0.1s cubic-bezier(0.645, 0.045, 0.355, 1); - box-shadow: 0 2px 5px 0 rgb(0 0 0 / 10%); -} - -.node-wrap-box.active::after, -.node-wrap-box:active::after, -.node-wrap-box:hover::after { - border: 1px solid #3296fa; - box-shadow: 0 0 6px 0 rgb(50 150 250 / 30%); -} - -.node-wrap-box.active .close, -.node-wrap-box:active .close, -.node-wrap-box:hover .close { - display: block; -} - -.node-wrap-box.error::after { - border: 1px solid #f25643; - box-shadow: 0 2px 5px 0 rgb(0 0 0 / 10%); -} - -.node-wrap-box .title { - position: relative; - display: flex; - align-items: center; - padding-left: 16px; - padding-right: 30px; - width: 100%; - height: 24px; - line-height: 24px; - font-size: 12px; - color: #fff; - text-align: left; - background: #576a95; - border-radius: 4px 4px 0 0; -} - -.node-wrap-box .title .iconfont { - font-size: 12px; - margin-right: 5px; -} - -.node-wrap-box .placeholder { - color: #bfbfbf; -} - -.node-wrap-box .close { - display: none; - position: absolute; - right: 10px; - top: 50%; - transform: translateY(-50%); - width: 20px; - height: 20px; - font-size: 14px; - color: #fff; - border-radius: 50%; - text-align: center; - line-height: 20px; -} - -.node-wrap-box .content { - position: relative; - font-size: 14px; - padding: 16px; - padding-right: 30px; -} - -.node-wrap-box .content .text { - overflow: hidden; - text-overflow: ellipsis; - display: -webkit-box; - -webkit-line-clamp: 3; - -webkit-box-orient: vertical; -} - -.node-wrap-box .content .arrow { - position: absolute; - right: 10px; - top: 50%; - transform: translateY(-50%); - width: 20px; - height: 14px; - font-size: 14px; - color: #979797; -} - -.start-node.node-wrap-box .content .text { - display: block; - white-space: nowrap; -} - -.node-wrap-box::before { - content: ""; - position: absolute; - top: -12px; - left: 50%; - transform: translateX(-50%); - width: 0; - height: 4px; - border-style: solid; - border-width: 8px 6px 4px; - border-color: #cacaca transparent transparent; - background: #f5f5f7; -} - -.node-wrap-box.start-node::before { - content: none; -} - -.top-left-cover-line { - left: -1px; -} - -.top-left-cover-line, -.top-right-cover-line { - position: absolute; - height: 8px; - width: 50%; - background-color: #f5f5f7; - top: -4px; -} - -.top-right-cover-line { - right: -1px; -} - -.bottom-left-cover-line { - left: -1px; -} - -.bottom-left-cover-line, -.bottom-right-cover-line { - position: absolute; - height: 8px; - width: 50%; - background-color: #f5f5f7; - bottom: -4px; -} - -.bottom-right-cover-line { - right: -1px; -} - -.dingflow-design { - width: 100%; - background-color: #f5f5f7; - overflow: auto; - - /* position: absolute; - bottom: 0; - left: 0; - right: 0; - top: 0; */ -} - -.dingflow-design .box-scale { - transform: scale(1); - display: inline-block; - position: relative; - width: 100%; - padding: 54.5px 0; - -webkit-box-align: start; - -ms-flex-align: start; - align-items: flex-start; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - flex-wrap: wrap; - min-width: min-content; - - /* background-color: #f5f8ff; */ - transform-origin: 50% 0 0; -} - -.dingflow-design .node-wrap { - flex-direction: column; - -webkit-box-pack: start; - -ms-flex-pack: start; - justify-content: flex-start; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - - /* flex-wrap: wrap; */ - -webkit-box-flex: 1; - -ms-flex-positive: 1; - padding: 0 50px; - position: relative; -} - -.dingflow-design .branch-wrap, -.dingflow-design .node-wrap { - display: inline-flex; - width: 100%; -} - -.dingflow-design .branch-box-wrap { - display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - flex-direction: column; - - /* flex-wrap: wrap; */ - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - min-height: 270px; - width: 100%; - -ms-flex-negative: 0; - flex-shrink: 0; -} - -.dingflow-design .branch-box { - display: flex; - overflow: visible; - min-height: 180px; - height: auto; - border-bottom: 2px solid #ccc; - border-top: 2px solid #ccc; - position: relative; - margin-top: 15px; -} - -.dingflow-design .branch-box .col-box { - background: #f5f5f7; -} - -.dingflow-design .branch-box .col-box::before { - content: ""; - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - z-index: 0; - margin: auto; - width: 2px; - height: 100%; - background-color: #cacaca; -} - -.dingflow-design .add-branch { - border: none; - outline: none; - user-select: none; - justify-content: center; - font-size: 12px; - padding: 0 10px; - height: 30px; - line-height: 30px; - border-radius: 15px; - color: #3296fa; - background: #fff; - box-shadow: 0 2px 4px 0 rgb(0 0 0 / 10%); - position: absolute; - top: -16px; - left: 50%; - transform: translateX(-50%); - transform-origin: center center; - cursor: pointer; - z-index: 1; - display: inline-flex; - align-items: center; - transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1); -} - -.dingflow-design .add-branch:hover { - transform: translateX(-50%) scale(1.1); - box-shadow: 0 8px 16px 0 rgb(0 0 0 / 10%); -} - -.dingflow-design .add-branch:active { - transform: translateX(-50%); - box-shadow: none; -} - -.dingflow-design .col-box { - display: inline-flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - flex-direction: column; - -webkit-box-align: center; - align-items: center; - position: relative; -} - -.dingflow-design .condition-node { - min-height: 220px; -} - -.dingflow-design .condition-node, -.dingflow-design .condition-node-box { - display: inline-flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - flex-direction: column; - -webkit-box-flex: 1; -} - -.dingflow-design .condition-node-box { - padding-top: 30px; - padding-right: 50px; - padding-left: 50px; - -webkit-box-pack: center; - justify-content: center; - -webkit-box-align: center; - align-items: center; - flex-grow: 1; - position: relative; -} - -.dingflow-design .condition-node-box::before { - content: ""; - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - margin: auto; - width: 2px; - height: 100%; - background-color: #cacaca; -} - -.dingflow-design .auto-judge { - position: relative; - width: 220px; - min-height: 72px; - background: #fff; - border-radius: 4px; - padding: 14px 19px; - cursor: pointer; -} - -.dingflow-design .auto-judge::after { - pointer-events: none; - content: ""; - position: absolute; - top: 0; - bottom: 0; - left: 0; - right: 0; - z-index: 2; - border-radius: 4px; - border: 1px solid transparent; - transition: all 0.1s cubic-bezier(0.645, 0.045, 0.355, 1); - box-shadow: 0 2px 5px 0 rgb(0 0 0 / 10%); -} - -.dingflow-design .auto-judge.active::after, -.dingflow-design .auto-judge:active::after, -.dingflow-design .auto-judge:hover::after { - border: 1px solid #3296fa; - box-shadow: 0 0 6px 0 rgb(50 150 250 / 30%); -} - -.dingflow-design .auto-judge.active .close, -.dingflow-design .auto-judge:active .close, -.dingflow-design .auto-judge:hover .close { - display: block; -} - -.dingflow-design .auto-judge.error::after { - border: 1px solid #f25643; - box-shadow: 0 2px 5px 0 rgb(0 0 0 / 10%); -} - -.dingflow-design .auto-judge .title-wrapper { - position: relative; - font-size: 12px; - color: #15bc83; - text-align: left; - line-height: 16px; -} - -.dingflow-design .auto-judge .title-wrapper .editable-title { - display: inline-block; - max-width: 120px; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; -} - -.dingflow-design .auto-judge .title-wrapper .priority-title { - display: inline-block; - float: right; - margin-right: 10px; - color: rgb(25 31 37 / 56%); -} - -.dingflow-design .auto-judge .placeholder { - color: #bfbfbf; -} - -.dingflow-design .auto-judge .close { - display: none; - position: absolute; - right: -10px; - top: -10px; - width: 20px; - height: 20px; - font-size: 14px; - color: rgb(0 0 0 / 25%); - border-radius: 50%; - text-align: center; - line-height: 20px; - z-index: 2; -} - -.dingflow-design .auto-judge .content { - font-size: 14px; - color: #191f25; - text-align: left; - margin-top: 6px; - overflow: hidden; - text-overflow: ellipsis; - display: -webkit-box; - -webkit-line-clamp: 3; - -webkit-box-orient: vertical; -} - -.dingflow-design .auto-judge .sort-left, -.dingflow-design .auto-judge .sort-right { - position: absolute; - top: 0; - bottom: 0; - display: none; - z-index: 1; -} - -.dingflow-design .auto-judge .sort-left { - left: 0; - border-right: 1px solid #f6f6f6; -} - -.dingflow-design .auto-judge .sort-right { - right: 0; - border-left: 1px solid #f6f6f6; -} - -.dingflow-design .auto-judge:hover .sort-left, -.dingflow-design .auto-judge:hover .sort-right { - display: flex; - align-items: center; -} - -.dingflow-design .auto-judge .sort-left:hover, -.dingflow-design .auto-judge .sort-right:hover { - background: #efefef; -} - -.dingflow-design .end-node { - display: flex; - justify-content: center; - align-items: center; - border-radius: 50%; - font-size: 14px; - color: rgb(25 31 37 / 40%); - text-align: left; -} - -.dingflow-design .end-node .end-node-circle { - width: 10px; - height: 10px; - margin: auto; - border-radius: 50%; - background: #dbdcdc; -} - -.dingflow-design .end-node .end-node-text { - margin-top: 5px; - text-align: center; -} - -.approval-setting { - border-radius: 2px; - margin: 20px 0; - position: relative; - background: #fff; -} - -/* .ant-btn { - position: relative; -} */ diff --git a/src/views/data/device/detail.vue b/src/views/data/device/detail.vue index 0294709..459158d 100644 --- a/src/views/data/device/detail.vue +++ b/src/views/data/device/detail.vue @@ -7,6 +7,7 @@ import { getDeviceDetail, getDeviceDetailAnalysis } from '@/api/api/index' const $router = useRouter() const $route = useRoute() +const width = (document.body.clientWidth - 180 - 20 - 40 - 24) / 24 // 监测趋势时间段 const range = ref('year') const goBak = () => { @@ -22,24 +23,70 @@ deviceInfo.value = res.data }) } +// 节点监测趋势数据 +const xAxisData1 = ref([]) +const data1 = ref([]) +const loadingChart1 = ref(true) +// 节点碳排趋势数据 +const xAxisData2 = ref([]) +const data2 = ref([]) // 获取设备监测分析 const fetchDeviceAnalysis = () => { + loadingChart1.value = true getDeviceDetailAnalysis({ deviceId: $route.query.id, type: range.value, }).then((res) => { console.log(res.data, '设备监测分析') + const data = res.data + // 整理节点监测趋势数据 + if (data.monitorTrends?.rp.length) { + xAxisData1.value = data.monitorTrends?.rp?.map((item: any) => item.time) + data1.value = [ + { + name: '有功功率', + data: data.monitorTrends?.rp?.map((item: any) => item.value), + }, + { + name: '无功功率', + data: data.monitorTrends?.ap?.map((item: any) => item.value), + }, + ] + } + // 整理节点碳排趋势数据 + if (data.emissionsTrends?.data?.length) { + xAxisData1.value = data.emissionsTrends?.data?.map((item: any) => item.time) + data2.value = [ + { + name: '碳排趋势', + data: data.emissionsTrends?.data?.map((item: any) => item.value), + }, + ] + } + loadingChart1.value = false + }).catch(() => { + data1.value = [] + data1.value = [] + loadingChart1.value = false }) } +// 监听 监测趋势时间段 变化 重新获取数据 +watch(() => range.value, (newVal) => { + console.log(newVal, '选择时间段') + fetchDeviceAnalysis() +}, +{ + deep: true, +}) onMounted(() => { fetchDeviceInfo() - // fetchDeviceAnalysis() + fetchDeviceAnalysis() })