feat:暂存1正式出版
This commit is contained in:
parent
70d91689eb
commit
d002e3ff8c
@ -3,7 +3,7 @@ module.exports = {
|
|||||||
env: {
|
env: {
|
||||||
node: true
|
node: true
|
||||||
},
|
},
|
||||||
extends: ['plugin:vue/recommended', '@vue/standard'],
|
extends: ['plugin:vue/recommended'],
|
||||||
rules: {
|
rules: {
|
||||||
// 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
|
// 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
|
||||||
// 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
|
// 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
207
package-lock.json
generated
207
package-lock.json
generated
@ -3027,12 +3027,6 @@
|
|||||||
"resolved": "https://registry.npmmirror.com/@types/json-schema/-/json-schema-7.0.11.tgz",
|
"resolved": "https://registry.npmmirror.com/@types/json-schema/-/json-schema-7.0.11.tgz",
|
||||||
"integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ=="
|
"integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ=="
|
||||||
},
|
},
|
||||||
"@types/json5": {
|
|
||||||
"version": "0.0.29",
|
|
||||||
"resolved": "https://registry.npmmirror.com/@types/json5/-/json5-0.0.29.tgz",
|
|
||||||
"integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"@types/mime": {
|
"@types/mime": {
|
||||||
"version": "3.0.1",
|
"version": "3.0.1",
|
||||||
"resolved": "https://registry.npmmirror.com/@types/mime/-/mime-3.0.1.tgz",
|
"resolved": "https://registry.npmmirror.com/@types/mime/-/mime-3.0.1.tgz",
|
||||||
@ -4227,19 +4221,6 @@
|
|||||||
"eslint-config-prettier": "^6.0.0"
|
"eslint-config-prettier": "^6.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@vue/eslint-config-standard": {
|
|
||||||
"version": "4.0.0",
|
|
||||||
"resolved": "https://registry.npmmirror.com/@vue/eslint-config-standard/-/eslint-config-standard-4.0.0.tgz",
|
|
||||||
"integrity": "sha512-bQghq1cw1BuMRHNhr3tRpAJx1tpGy0QtajQX873kLtA9YVuOIoXR7nAWnTN09bBHnSUh2N288vMsqPi2fI4Hzg==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"eslint-config-standard": "^12.0.0",
|
|
||||||
"eslint-plugin-import": "^2.14.0",
|
|
||||||
"eslint-plugin-node": "^8.0.0",
|
|
||||||
"eslint-plugin-promise": "^4.0.1",
|
|
||||||
"eslint-plugin-standard": "^4.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@vue/preload-webpack-plugin": {
|
"@vue/preload-webpack-plugin": {
|
||||||
"version": "1.1.2",
|
"version": "1.1.2",
|
||||||
"resolved": "https://registry.npmmirror.com/@vue/preload-webpack-plugin/-/preload-webpack-plugin-1.1.2.tgz",
|
"resolved": "https://registry.npmmirror.com/@vue/preload-webpack-plugin/-/preload-webpack-plugin-1.1.2.tgz",
|
||||||
@ -10834,15 +10815,6 @@
|
|||||||
"buffer-indexof": "^1.0.0"
|
"buffer-indexof": "^1.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"doctrine": {
|
|
||||||
"version": "2.1.0",
|
|
||||||
"resolved": "https://registry.npmmirror.com/doctrine/-/doctrine-2.1.0.tgz",
|
|
||||||
"integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"esutils": "^2.0.2"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"dom-converter": {
|
"dom-converter": {
|
||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"resolved": "https://registry.npmmirror.com/dom-converter/-/dom-converter-0.2.0.tgz",
|
"resolved": "https://registry.npmmirror.com/dom-converter/-/dom-converter-0.2.0.tgz",
|
||||||
@ -11571,12 +11543,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"eslint-config-standard": {
|
|
||||||
"version": "12.0.0",
|
|
||||||
"resolved": "https://registry.npmmirror.com/eslint-config-standard/-/eslint-config-standard-12.0.0.tgz",
|
|
||||||
"integrity": "sha512-COUz8FnXhqFitYj4DTqHzidjIL/t4mumGZto5c7DrBpvWoie+Sn3P4sLEzUGeYhRElWuFEf8K1S1EfvD1vixCQ==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"eslint-html-reporter": {
|
"eslint-html-reporter": {
|
||||||
"version": "0.7.4",
|
"version": "0.7.4",
|
||||||
"resolved": "https://registry.dfy.definesys.cn/repository/apaas-npm-group/eslint-html-reporter/-/eslint-html-reporter-0.7.4.tgz",
|
"resolved": "https://registry.dfy.definesys.cn/repository/apaas-npm-group/eslint-html-reporter/-/eslint-html-reporter-0.7.4.tgz",
|
||||||
@ -11587,27 +11553,6 @@
|
|||||||
"handlebars": "^4.3.1"
|
"handlebars": "^4.3.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"eslint-import-resolver-node": {
|
|
||||||
"version": "0.3.6",
|
|
||||||
"resolved": "https://registry.npmmirror.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz",
|
|
||||||
"integrity": "sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"debug": "^3.2.7",
|
|
||||||
"resolve": "^1.20.0"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"debug": {
|
|
||||||
"version": "3.2.7",
|
|
||||||
"resolved": "https://registry.npmmirror.com/debug/-/debug-3.2.7.tgz",
|
|
||||||
"integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"ms": "^2.1.1"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"eslint-loader": {
|
"eslint-loader": {
|
||||||
"version": "2.2.1",
|
"version": "2.2.1",
|
||||||
"resolved": "https://registry.npmmirror.com/eslint-loader/-/eslint-loader-2.2.1.tgz",
|
"resolved": "https://registry.npmmirror.com/eslint-loader/-/eslint-loader-2.2.1.tgz",
|
||||||
@ -11649,111 +11594,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"eslint-module-utils": {
|
|
||||||
"version": "2.7.4",
|
|
||||||
"resolved": "https://registry.npmmirror.com/eslint-module-utils/-/eslint-module-utils-2.7.4.tgz",
|
|
||||||
"integrity": "sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"debug": "^3.2.7"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"debug": {
|
|
||||||
"version": "3.2.7",
|
|
||||||
"resolved": "https://registry.npmmirror.com/debug/-/debug-3.2.7.tgz",
|
|
||||||
"integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"ms": "^2.1.1"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"eslint-plugin-es": {
|
|
||||||
"version": "1.4.1",
|
|
||||||
"resolved": "https://registry.npmmirror.com/eslint-plugin-es/-/eslint-plugin-es-1.4.1.tgz",
|
|
||||||
"integrity": "sha512-5fa/gR2yR3NxQf+UXkeLeP8FBBl6tSgdrAz1+cF84v1FMM4twGwQoqTnn+QxFLcPOrF4pdKEJKDB/q9GoyJrCA==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"eslint-utils": "^1.4.2",
|
|
||||||
"regexpp": "^2.0.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"eslint-plugin-import": {
|
|
||||||
"version": "2.26.0",
|
|
||||||
"resolved": "https://registry.npmmirror.com/eslint-plugin-import/-/eslint-plugin-import-2.26.0.tgz",
|
|
||||||
"integrity": "sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"array-includes": "^3.1.4",
|
|
||||||
"array.prototype.flat": "^1.2.5",
|
|
||||||
"debug": "^2.6.9",
|
|
||||||
"doctrine": "^2.1.0",
|
|
||||||
"eslint-import-resolver-node": "^0.3.6",
|
|
||||||
"eslint-module-utils": "^2.7.3",
|
|
||||||
"has": "^1.0.3",
|
|
||||||
"is-core-module": "^2.8.1",
|
|
||||||
"is-glob": "^4.0.3",
|
|
||||||
"minimatch": "^3.1.2",
|
|
||||||
"object.values": "^1.1.5",
|
|
||||||
"resolve": "^1.22.0",
|
|
||||||
"tsconfig-paths": "^3.14.1"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"debug": {
|
|
||||||
"version": "2.6.9",
|
|
||||||
"resolved": "https://registry.npmmirror.com/debug/-/debug-2.6.9.tgz",
|
|
||||||
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"ms": "2.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"minimatch": {
|
|
||||||
"version": "3.1.2",
|
|
||||||
"resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-3.1.2.tgz",
|
|
||||||
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"brace-expansion": "^1.1.7"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"ms": {
|
|
||||||
"version": "2.0.0",
|
|
||||||
"resolved": "https://registry.npmmirror.com/ms/-/ms-2.0.0.tgz",
|
|
||||||
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
|
|
||||||
"dev": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"eslint-plugin-node": {
|
|
||||||
"version": "8.0.1",
|
|
||||||
"resolved": "https://registry.npmmirror.com/eslint-plugin-node/-/eslint-plugin-node-8.0.1.tgz",
|
|
||||||
"integrity": "sha512-ZjOjbjEi6jd82rIpFSgagv4CHWzG9xsQAVp1ZPlhRnnYxcTgENUVBvhYmkQ7GvT1QFijUSo69RaiOJKhMu6i8w==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"eslint-plugin-es": "^1.3.1",
|
|
||||||
"eslint-utils": "^1.3.1",
|
|
||||||
"ignore": "^5.0.2",
|
|
||||||
"minimatch": "^3.0.4",
|
|
||||||
"resolve": "^1.8.1",
|
|
||||||
"semver": "^5.5.0"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"ignore": {
|
|
||||||
"version": "5.2.1",
|
|
||||||
"resolved": "https://registry.npmmirror.com/ignore/-/ignore-5.2.1.tgz",
|
|
||||||
"integrity": "sha512-d2qQLzTJ9WxQftPAuEQpSPmKqzxePjzVbpAVv62AQ64NTL+wR4JkrVqR/LqFsFEUsHDAiId52mJteHDFuDkElA==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"semver": {
|
|
||||||
"version": "5.7.1",
|
|
||||||
"resolved": "https://registry.npmmirror.com/semver/-/semver-5.7.1.tgz",
|
|
||||||
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
|
|
||||||
"dev": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"eslint-plugin-prettier": {
|
"eslint-plugin-prettier": {
|
||||||
"version": "3.4.1",
|
"version": "3.4.1",
|
||||||
"resolved": "https://registry.npmmirror.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.4.1.tgz",
|
"resolved": "https://registry.npmmirror.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.4.1.tgz",
|
||||||
@ -11763,18 +11603,6 @@
|
|||||||
"prettier-linter-helpers": "^1.0.0"
|
"prettier-linter-helpers": "^1.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"eslint-plugin-promise": {
|
|
||||||
"version": "4.3.1",
|
|
||||||
"resolved": "https://registry.npmmirror.com/eslint-plugin-promise/-/eslint-plugin-promise-4.3.1.tgz",
|
|
||||||
"integrity": "sha512-bY2sGqyptzFBDLh/GMbAxfdJC+b0f23ME63FOE4+Jao0oZ3E1LEwFtWJX/1pGMJLiTtrSSern2CRM/g+dfc0eQ==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"eslint-plugin-standard": {
|
|
||||||
"version": "4.1.0",
|
|
||||||
"resolved": "https://registry.npmmirror.com/eslint-plugin-standard/-/eslint-plugin-standard-4.1.0.tgz",
|
|
||||||
"integrity": "sha512-ZL7+QRixjTR6/528YNGyDotyffm5OQst/sGxKDwGb9Uqs4In5Egi4+jbobhqJoyoCM6/7v/1A5fhQ7ScMtDjaQ==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"eslint-plugin-vue": {
|
"eslint-plugin-vue": {
|
||||||
"version": "6.2.2",
|
"version": "6.2.2",
|
||||||
"resolved": "https://registry.npmmirror.com/eslint-plugin-vue/-/eslint-plugin-vue-6.2.2.tgz",
|
"resolved": "https://registry.npmmirror.com/eslint-plugin-vue/-/eslint-plugin-vue-6.2.2.tgz",
|
||||||
@ -25693,41 +25521,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tsconfig-paths": {
|
|
||||||
"version": "3.14.1",
|
|
||||||
"resolved": "https://registry.npmmirror.com/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz",
|
|
||||||
"integrity": "sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"@types/json5": "^0.0.29",
|
|
||||||
"json5": "^1.0.1",
|
|
||||||
"minimist": "^1.2.6",
|
|
||||||
"strip-bom": "^3.0.0"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"json5": {
|
|
||||||
"version": "1.0.1",
|
|
||||||
"resolved": "https://registry.npmmirror.com/json5/-/json5-1.0.1.tgz",
|
|
||||||
"integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"minimist": "^1.2.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"minimist": {
|
|
||||||
"version": "1.2.7",
|
|
||||||
"resolved": "https://registry.npmmirror.com/minimist/-/minimist-1.2.7.tgz",
|
|
||||||
"integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"strip-bom": {
|
|
||||||
"version": "3.0.0",
|
|
||||||
"resolved": "https://registry.npmmirror.com/strip-bom/-/strip-bom-3.0.0.tgz",
|
|
||||||
"integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==",
|
|
||||||
"dev": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"tslib": {
|
"tslib": {
|
||||||
"version": "2.4.1",
|
"version": "2.4.1",
|
||||||
"resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.4.1.tgz",
|
"resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.4.1.tgz",
|
||||||
|
|||||||
@ -45,7 +45,6 @@
|
|||||||
"@vue/cli-plugin-vuex": "^4.3.0",
|
"@vue/cli-plugin-vuex": "^4.3.0",
|
||||||
"@vue/cli-service": "^4.3.0",
|
"@vue/cli-service": "^4.3.0",
|
||||||
"@vue/eslint-config-prettier": "^6.0.0",
|
"@vue/eslint-config-prettier": "^6.0.0",
|
||||||
"@vue/eslint-config-standard": "^4.0.0",
|
|
||||||
"@vue/test-utils": "1.0.0-beta.31",
|
"@vue/test-utils": "1.0.0-beta.31",
|
||||||
"babel-eslint": "^10.1.0",
|
"babel-eslint": "^10.1.0",
|
||||||
"babel-plugin-component": "^1.1.1",
|
"babel-plugin-component": "^1.1.1",
|
||||||
|
|||||||
@ -43,5 +43,17 @@ export default {
|
|||||||
GET_ENGINE_TABLE_DETAIL: {
|
GET_ENGINE_TABLE_DETAIL: {
|
||||||
url: '/custom/engineParamDetailPojo/selectParamListAndModel',
|
url: '/custom/engineParamDetailPojo/selectParamListAndModel',
|
||||||
method: 'get'
|
method: 'get'
|
||||||
|
},
|
||||||
|
CONTINUE_DATA_APPROVAL: {
|
||||||
|
url: '/custom/activiti/continueApproval',
|
||||||
|
method: 'get'
|
||||||
|
},
|
||||||
|
UPDATE_APPROVAL_DATA: {
|
||||||
|
url: '/custom/activiti/updateNode',
|
||||||
|
method: 'post'
|
||||||
|
},
|
||||||
|
REJECT_TODO_TASK: {
|
||||||
|
url: '/custom/todoTaskPojo/rejectTodo',
|
||||||
|
method: 'post'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -153,7 +153,7 @@ export default {
|
|||||||
|
|
||||||
GET_ENGINE_VERSIONS: {
|
GET_ENGINE_VERSIONS: {
|
||||||
url: '/custom/engineParamDetailPojo/selectVersionList',
|
url: '/custom/engineParamDetailPojo/selectVersionList',
|
||||||
method: 'post'
|
method: 'get'
|
||||||
},
|
},
|
||||||
|
|
||||||
TEXT_DEMO: {
|
TEXT_DEMO: {
|
||||||
@ -228,5 +228,18 @@ export default {
|
|||||||
EDIT_DATA_PROCESS_TITLE: {
|
EDIT_DATA_PROCESS_TITLE: {
|
||||||
url: '/custom/activiti/updateFlowTitle',
|
url: '/custom/activiti/updateFlowTitle',
|
||||||
method: 'get'
|
method: 'get'
|
||||||
|
},
|
||||||
|
// 获取图表常用
|
||||||
|
GET_CHART_COMMONLY_USED: {
|
||||||
|
url: '/custom/common/getChartCommonParameter',
|
||||||
|
method: 'get'
|
||||||
|
},
|
||||||
|
ADD_CHART_COMMONLY_USED: {
|
||||||
|
url: '/custom/common/insertChartCommon',
|
||||||
|
method: 'post'
|
||||||
|
},
|
||||||
|
EDIT_CHART_COMMONLY_USED: {
|
||||||
|
url: '/custom/common/updateChartCommon',
|
||||||
|
method: 'post'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -130,5 +130,9 @@ export default {
|
|||||||
CONTINUE_APPROVAL_PROCESS: {
|
CONTINUE_APPROVAL_PROCESS: {
|
||||||
url: '/custom/approval/continueApproval',
|
url: '/custom/approval/continueApproval',
|
||||||
method: 'get'
|
method: 'get'
|
||||||
|
},
|
||||||
|
GET_DEPT_OF_USER: {
|
||||||
|
url: '/custom/responsible/getResponsibleDepartment',
|
||||||
|
method: 'get'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,13 +8,13 @@
|
|||||||
:modalVisible.sync="visible"
|
:modalVisible.sync="visible"
|
||||||
:wrapper-class="'add-engine-model-modal'"
|
:wrapper-class="'add-engine-model-modal'"
|
||||||
title="添加机型"
|
title="添加机型"
|
||||||
:width="800"
|
:width="850"
|
||||||
>
|
>
|
||||||
<el-form
|
<el-form
|
||||||
ref="addForm"
|
ref="addForm"
|
||||||
:model="formData"
|
:model="formData"
|
||||||
:rules="formRules"
|
:rules="formRules"
|
||||||
label-width="100px"
|
label-width="140px"
|
||||||
class="add-engine-form"
|
class="add-engine-form"
|
||||||
>
|
>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
@ -33,6 +33,29 @@
|
|||||||
<el-input v-model="formData.platform" placeholder="请输入" maxlength="100" />
|
<el-input v-model="formData.platform" placeholder="请输入" maxlength="100" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- 竞品发动机专有字段:厂家全称和简称在第二行 -->
|
||||||
|
<div v-if="ycOrOth === '竞品'" class="form-row">
|
||||||
|
<el-form-item label="厂家名称(全称)" prop="manufacturerName">
|
||||||
|
<el-input v-model="formData.manufacturerName" placeholder="请输入" maxlength="100" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="厂家简称" prop="manufacturerAbbreviation">
|
||||||
|
<el-input v-model="formData.manufacturerAbbreviation" placeholder="请输入" maxlength="100" />
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
<div v-if="ycOrOth === '竞品'" class="form-row">
|
||||||
|
<el-form-item label="品牌" prop="brand">
|
||||||
|
<el-input v-model="formData.brand" placeholder="请输入" maxlength="100" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="生产日期" prop="productionDate">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="formData.productionDate"
|
||||||
|
type="date"
|
||||||
|
placeholder="请选择生产日期"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
style="width: 100%"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<el-form-item label="细分市场" prop="marketSegment">
|
<el-form-item label="细分市场" prop="marketSegment">
|
||||||
<el-input v-model="formData.marketSegment" placeholder="请输入" maxlength="100" />
|
<el-input v-model="formData.marketSegment" placeholder="请输入" maxlength="100" />
|
||||||
@ -112,7 +135,12 @@ export default {
|
|||||||
marketSegment: '',
|
marketSegment: '',
|
||||||
projectName: '',
|
projectName: '',
|
||||||
projectNumber: '',
|
projectNumber: '',
|
||||||
dispatchStatus: ''
|
dispatchStatus: '',
|
||||||
|
// 竞品发动机专有字段
|
||||||
|
manufacturerName: '',
|
||||||
|
manufacturerAbbreviation: '',
|
||||||
|
brand: '',
|
||||||
|
productionDate: ''
|
||||||
},
|
},
|
||||||
formRules: {
|
formRules: {
|
||||||
modelName: [{ required: true, message: '请输入产品型号', trigger: 'blur' }],
|
modelName: [{ required: true, message: '请输入产品型号', trigger: 'blur' }],
|
||||||
@ -164,7 +192,12 @@ export default {
|
|||||||
marketSegment: '',
|
marketSegment: '',
|
||||||
projectName: '',
|
projectName: '',
|
||||||
projectNumber: '',
|
projectNumber: '',
|
||||||
distributeStatus: '未分发'
|
distributeStatus: '未分发',
|
||||||
|
// 竞品发动机专有字段
|
||||||
|
manufacturerName: '',
|
||||||
|
manufacturerAbbreviation: '',
|
||||||
|
brand: '',
|
||||||
|
productionDate: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleSubmit() {
|
handleSubmit() {
|
||||||
|
|||||||
@ -251,8 +251,8 @@
|
|||||||
</div> -->
|
</div> -->
|
||||||
</el-radio>
|
</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
<!-- 当选择"发起审批"节点时,显示意见输入框 -->
|
<!-- 当选择"编制"节点时,显示意见输入框 -->
|
||||||
<div v-if="selectedReturnNode === '发起审批'" class="return-opinion-section">
|
<div v-if="selectedReturnNode === '编制'" class="return-opinion-section">
|
||||||
<div class="opinion-label">
|
<div class="opinion-label">
|
||||||
退回意见:
|
退回意见:
|
||||||
</div>
|
</div>
|
||||||
@ -340,7 +340,7 @@ export default {
|
|||||||
returnNodeDialogVisible: false,
|
returnNodeDialogVisible: false,
|
||||||
selectedReturnNode: '',
|
selectedReturnNode: '',
|
||||||
returnSubmitting: false,
|
returnSubmitting: false,
|
||||||
returnOpinion: '', // 退回意见(仅在选择发起审批节点时使用)
|
returnOpinion: '', // 退回意见(仅在选择编制节点时使用)
|
||||||
resending: false, // 直送提交loading状态
|
resending: false, // 直送提交loading状态
|
||||||
isEditingProcessTitle: false, // 是否正在编辑流程主题
|
isEditingProcessTitle: false, // 是否正在编辑流程主题
|
||||||
editingProcessTitle: '' // 正在编辑的流程主题值
|
editingProcessTitle: '' // 正在编辑的流程主题值
|
||||||
@ -781,14 +781,14 @@ export default {
|
|||||||
this.$request(request)
|
this.$request(request)
|
||||||
.asyncThen((resp) => {
|
.asyncThen((resp) => {
|
||||||
console.log(resp)
|
console.log(resp)
|
||||||
// 在列表最前面添加"发起审批"节点作为默认选项
|
// 在列表最前面添加"编制"节点作为默认选项
|
||||||
const nodes = Array.isArray(resp.data) ? resp.data : []
|
const nodes = Array.isArray(resp.data) ? resp.data : []
|
||||||
this.returnableNodes = ['发起审批', ...nodes]
|
this.returnableNodes = ['编制', ...nodes]
|
||||||
})
|
})
|
||||||
.asyncErrorCatch((err) => {
|
.asyncErrorCatch((err) => {
|
||||||
console.error('获取退回节点失败:', err)
|
console.error('获取退回节点失败:', err)
|
||||||
// 即使获取失败,也添加"发起审批"节点
|
// 即使获取失败,也添加"编制"节点
|
||||||
this.returnableNodes = ['发起审批']
|
this.returnableNodes = ['编制']
|
||||||
})
|
})
|
||||||
this.selectedReturnNode = ''
|
this.selectedReturnNode = ''
|
||||||
this.returnOpinion = ''
|
this.returnOpinion = ''
|
||||||
@ -802,8 +802,8 @@ export default {
|
|||||||
},
|
},
|
||||||
// 处理退回节点选择变化
|
// 处理退回节点选择变化
|
||||||
handleReturnNodeChange() {
|
handleReturnNodeChange() {
|
||||||
// 如果不是"发起审批"节点,清空意见
|
// 如果不是"编制"节点,清空意见
|
||||||
if (this.selectedReturnNode !== '发起审批') {
|
if (this.selectedReturnNode !== '编制') {
|
||||||
this.returnOpinion = ''
|
this.returnOpinion = ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -821,8 +821,8 @@ export default {
|
|||||||
|
|
||||||
this.returnSubmitting = true
|
this.returnSubmitting = true
|
||||||
|
|
||||||
// 如果选择的是"发起审批"节点,调用拒绝接口
|
// 如果选择的是"编制"节点,调用拒绝接口
|
||||||
if (this.selectedReturnNode === '发起审批') {
|
if (this.selectedReturnNode === '编制') {
|
||||||
const submitData = {
|
const submitData = {
|
||||||
flowId: this.detail.flowId,
|
flowId: this.detail.flowId,
|
||||||
userId: getUserId(),
|
userId: getUserId(),
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -18,7 +18,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="fromTodo" class="header-right">
|
<div v-if="fromTodo && !hideOperations" class="header-right">
|
||||||
<el-button size="small" @click="handleReturn">
|
<el-button size="small" @click="handleReturn">
|
||||||
退回
|
退回
|
||||||
</el-button>
|
</el-button>
|
||||||
@ -86,6 +86,76 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
<section class="block-section">
|
||||||
|
<div class="section-title">
|
||||||
|
详细信息
|
||||||
|
</div>
|
||||||
|
<div class="info-grid">
|
||||||
|
<div class="info-row">
|
||||||
|
<div class="info-item">
|
||||||
|
<span class="label">产品型号</span>
|
||||||
|
<span class="value">{{ modelDetail.modelName || '--' }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="info-item">
|
||||||
|
<span class="label">状态代号</span>
|
||||||
|
<span class="value">{{ modelDetail.productNumber || '--' }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="info-row">
|
||||||
|
<div class="info-item">
|
||||||
|
<span class="label">板块</span>
|
||||||
|
<span class="value">{{ modelDetail.plate || '--' }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="info-item">
|
||||||
|
<span class="label">平台</span>
|
||||||
|
<span class="value">{{ modelDetail.platform || '--' }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="info-row">
|
||||||
|
<div class="info-item">
|
||||||
|
<span class="label">系列</span>
|
||||||
|
<span class="value">{{ modelDetail.series || '--' }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="info-item">
|
||||||
|
<span class="label">细分市场</span>
|
||||||
|
<span class="value">{{ modelDetail.marketSegment || '--' }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="info-row">
|
||||||
|
<div class="info-item">
|
||||||
|
<span class="label">项目名称</span>
|
||||||
|
<span class="value">{{ modelDetail.projectName || '--' }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="info-item">
|
||||||
|
<span class="label">项目编号</span>
|
||||||
|
<span class="value">{{ modelDetail.projectNumber || '--' }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- 竞品发动机专有字段 -->
|
||||||
|
<template v-if="engineType === '竞品'">
|
||||||
|
<div class="info-row">
|
||||||
|
<div class="info-item">
|
||||||
|
<span class="label">厂家名称(全称)</span>
|
||||||
|
<span class="value">{{ modelDetail.manufacturerName || '--' }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="info-item">
|
||||||
|
<span class="label">厂家简称</span>
|
||||||
|
<span class="value">{{ modelDetail.manufacturerAbbreviation || '--' }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="info-row">
|
||||||
|
<div class="info-item">
|
||||||
|
<span class="label">品牌</span>
|
||||||
|
<span class="value">{{ modelDetail.brand || '--' }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="info-item">
|
||||||
|
<span class="label">生产日期</span>
|
||||||
|
<span class="value">{{ modelDetail.productionDate || '--' }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
<section class="block-section">
|
<section class="block-section">
|
||||||
<div class="section-title">
|
<div class="section-title">
|
||||||
审批内容
|
审批内容
|
||||||
@ -232,8 +302,8 @@
|
|||||||
<el-radio v-for="node in returnableNodes" :key="node" :label="node">
|
<el-radio v-for="node in returnableNodes" :key="node" :label="node">
|
||||||
</el-radio>
|
</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
<!-- 当选择"发起审批"节点时,显示意见输入框 -->
|
<!-- 当选择"编制"节点时,显示意见输入框 -->
|
||||||
<div v-if="selectedReturnNode === '发起审批'" class="return-opinion-section">
|
<div v-if="selectedReturnNode === '编制'" class="return-opinion-section">
|
||||||
<div class="opinion-label">
|
<div class="opinion-label">
|
||||||
退回意见:
|
退回意见:
|
||||||
</div>
|
</div>
|
||||||
@ -290,6 +360,11 @@ export default {
|
|||||||
validator: function(value) {
|
validator: function(value) {
|
||||||
return ['玉柴', '竞品'].indexOf(value) !== -1
|
return ['玉柴', '竞品'].indexOf(value) !== -1
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
// 是否隐藏操作按钮(从我的发起/我的经办进入时隐藏)
|
||||||
|
hideOperations: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -311,6 +386,21 @@ export default {
|
|||||||
activitiRecordDTOS: [], // 审批流程数据
|
activitiRecordDTOS: [], // 审批流程数据
|
||||||
flowNodes: [], // 审批流程节点数据
|
flowNodes: [], // 审批流程节点数据
|
||||||
progressDetailData: {}, // 审批流程详情数据
|
progressDetailData: {}, // 审批流程详情数据
|
||||||
|
modelDetail: {
|
||||||
|
modelName: '',
|
||||||
|
productNumber: '',
|
||||||
|
plate: '',
|
||||||
|
platform: '',
|
||||||
|
series: '',
|
||||||
|
marketSegment: '',
|
||||||
|
projectName: '',
|
||||||
|
projectNumber: '',
|
||||||
|
// 竞品发动机专有字段
|
||||||
|
manufacturerName: '',
|
||||||
|
manufacturerAbbreviation: '',
|
||||||
|
brand: '',
|
||||||
|
productionDate: ''
|
||||||
|
}, // 机型详细信息
|
||||||
approvalDialogVisible: false,
|
approvalDialogVisible: false,
|
||||||
approvalActionType: '', // 'reject' 或 'submit'
|
approvalActionType: '', // 'reject' 或 'submit'
|
||||||
approvalDialogTitle: '审批',
|
approvalDialogTitle: '审批',
|
||||||
@ -326,7 +416,7 @@ export default {
|
|||||||
returnableNodes: [],
|
returnableNodes: [],
|
||||||
selectedReturnNode: '',
|
selectedReturnNode: '',
|
||||||
returnSubmitting: false,
|
returnSubmitting: false,
|
||||||
returnOpinion: '', // 退回意见(仅在选择发起审批节点时使用)
|
returnOpinion: '', // 退回意见(仅在选择编制节点时使用)
|
||||||
isEditingProcessTitle: false, // 是否正在编辑流程主题
|
isEditingProcessTitle: false, // 是否正在编辑流程主题
|
||||||
editingProcessTitle: '' // 正在编辑的流程主题值
|
editingProcessTitle: '' // 正在编辑的流程主题值
|
||||||
}
|
}
|
||||||
@ -585,6 +675,41 @@ export default {
|
|||||||
currentNode: resp.data.approvalStatus === '已拒绝' ? '编制' : (resp.data.currentNode || ''),
|
currentNode: resp.data.approvalStatus === '已拒绝' ? '编制' : (resp.data.currentNode || ''),
|
||||||
processor: resp.data.approvalStatus === '已拒绝' ? resp.data.createBy : (resp.data.processor || '')
|
processor: resp.data.approvalStatus === '已拒绝' ? resp.data.createBy : (resp.data.processor || '')
|
||||||
}
|
}
|
||||||
|
// 保存机型详细信息
|
||||||
|
if (resp.data.model) {
|
||||||
|
this.modelDetail = {
|
||||||
|
modelName: resp.data.model.modelName || '',
|
||||||
|
productNumber: resp.data.model.productNumber || '',
|
||||||
|
plate: resp.data.model.plate || '',
|
||||||
|
platform: resp.data.model.platform || '',
|
||||||
|
series: resp.data.model.series || '',
|
||||||
|
marketSegment: resp.data.model.marketSegment || '',
|
||||||
|
projectName: resp.data.model.projectName || '',
|
||||||
|
projectNumber: resp.data.model.projectNumber || '',
|
||||||
|
// 竞品发动机专有字段
|
||||||
|
manufacturerName: resp.data.model.manufacturerName || '',
|
||||||
|
manufacturerAbbreviation: resp.data.model.manufacturerAbbreviation || '',
|
||||||
|
brand: resp.data.model.brand || '',
|
||||||
|
productionDate: resp.data.model.productionDate || ''
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 如果 model 不存在,重置为空
|
||||||
|
this.modelDetail = {
|
||||||
|
modelName: '',
|
||||||
|
productNumber: '',
|
||||||
|
plate: '',
|
||||||
|
platform: '',
|
||||||
|
series: '',
|
||||||
|
marketSegment: '',
|
||||||
|
projectName: '',
|
||||||
|
projectNumber: '',
|
||||||
|
// 竞品发动机专有字段
|
||||||
|
manufacturerName: '',
|
||||||
|
manufacturerAbbreviation: '',
|
||||||
|
brand: '',
|
||||||
|
productionDate: ''
|
||||||
|
}
|
||||||
|
}
|
||||||
// 如果返回的是分页格式 { list: [], total: 0 }
|
// 如果返回的是分页格式 { list: [], total: 0 }
|
||||||
if (resp.data.list && Array.isArray(resp.data.list)) {
|
if (resp.data.list && Array.isArray(resp.data.list)) {
|
||||||
allData = resp.data.list
|
allData = resp.data.list
|
||||||
@ -854,14 +979,14 @@ export default {
|
|||||||
this.$request(request)
|
this.$request(request)
|
||||||
.asyncThen((resp) => {
|
.asyncThen((resp) => {
|
||||||
console.log(resp)
|
console.log(resp)
|
||||||
// 在列表最前面添加"发起审批"节点作为默认选项
|
// 在列表最前面添加"编制"节点作为默认选项
|
||||||
const nodes = Array.isArray(resp.data) ? resp.data : []
|
const nodes = Array.isArray(resp.data) ? resp.data : []
|
||||||
this.returnableNodes = ['发起审批', ...nodes]
|
this.returnableNodes = ['编制', ...nodes]
|
||||||
})
|
})
|
||||||
.asyncErrorCatch((err) => {
|
.asyncErrorCatch((err) => {
|
||||||
console.error('获取退回节点失败:', err)
|
console.error('获取退回节点失败:', err)
|
||||||
// 即使获取失败,也添加"发起审批"节点
|
// 即使获取失败,也添加"编制"节点
|
||||||
this.returnableNodes = ['发起审批']
|
this.returnableNodes = ['编制']
|
||||||
})
|
})
|
||||||
this.selectedReturnNode = ''
|
this.selectedReturnNode = ''
|
||||||
this.returnOpinion = ''
|
this.returnOpinion = ''
|
||||||
@ -875,8 +1000,8 @@ export default {
|
|||||||
},
|
},
|
||||||
// 处理退回节点选择变化
|
// 处理退回节点选择变化
|
||||||
handleReturnNodeChange() {
|
handleReturnNodeChange() {
|
||||||
// 如果不是"发起审批"节点,清空意见
|
// 如果不是"编制"节点,清空意见
|
||||||
if (this.selectedReturnNode !== '发起审批') {
|
if (this.selectedReturnNode !== '编制') {
|
||||||
this.returnOpinion = ''
|
this.returnOpinion = ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -894,8 +1019,8 @@ export default {
|
|||||||
|
|
||||||
this.returnSubmitting = true
|
this.returnSubmitting = true
|
||||||
|
|
||||||
// 如果选择的是"发起审批"节点,调用拒绝接口
|
// 如果选择的是"编制"节点,调用拒绝接口
|
||||||
if (this.selectedReturnNode === '发起审批') {
|
if (this.selectedReturnNode === '编制') {
|
||||||
const submitData = {
|
const submitData = {
|
||||||
approvalId: this.detail.id,
|
approvalId: this.detail.id,
|
||||||
operator: 'REJECT',
|
operator: 'REJECT',
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -176,7 +176,7 @@
|
|||||||
>
|
>
|
||||||
<el-table-column type="selection" width="55" />
|
<el-table-column type="selection" width="55" />
|
||||||
<el-table-column prop="modelName" label="产品型号" min-width="150" />
|
<el-table-column prop="modelName" label="产品型号" min-width="150" />
|
||||||
<el-table-column prop="parameterVersion" label="版本" min-width="70"
|
<el-table-column prop="parameterVersion" label="机型版本" min-width="70"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>V{{ scope.row.parameterVersion }}</span>
|
<span>V{{ scope.row.parameterVersion }}</span>
|
||||||
@ -190,7 +190,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button @click="handleAddModelDialogClose">取消</el-button>
|
<el-button @click="handleAddModelDialogClose">取消</el-button>
|
||||||
<el-button type="primary" :loading="loadingModelDetail" @click="handleConfirmAddModel">
|
<el-button type="primary" @click="handleConfirmAddModel">
|
||||||
确定
|
确定
|
||||||
</el-button>
|
</el-button>
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@ -379,17 +379,10 @@ export default {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
// 检查是否有 permissionPath 为 "参数模板管理" 且 parameterPer 是编辑的权限
|
// 检查是否有 permissionPath 为 "参数模板管理" 且 parameterPer 是编辑的权限
|
||||||
// parameterPer 可能是数字 2 或字符串 "编辑" 或 "2"
|
|
||||||
return permissionData.some((perm) => {
|
return permissionData.some((perm) => {
|
||||||
const permissionPath = perm.permissionPath || ''
|
const permissionPath = perm.permissionPath || ''
|
||||||
const parameterPer = perm.parameterPer
|
const parameterPer = perm.parameterPer || ''
|
||||||
return (
|
return permissionPath === '参数模板管理' && parameterPer === '编辑'
|
||||||
permissionPath === '参数模板管理' &&
|
|
||||||
(parameterPer === 2 ||
|
|
||||||
parameterPer === '2' ||
|
|
||||||
parameterPer === '编辑' ||
|
|
||||||
parameterPer === 2)
|
|
||||||
)
|
|
||||||
})
|
})
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error('检查参数模板管理编辑权限失败:', err)
|
console.error('检查参数模板管理编辑权限失败:', err)
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
<div class="header-item">
|
<div class="header-item">
|
||||||
<span class="label">{{ isApprovalMode ? '发起审批' : '模板名称' }}:</span>
|
<span class="label">{{ isApprovalMode ? '发起审批' : '模板名称' }}:</span>
|
||||||
<span v-if="!isApprovalMode" class="value">{{
|
<span v-if="!isApprovalMode" class="value top-value">{{
|
||||||
isApprovalMode ? '系统参数模板' : displayTemplateName || '系统参数'
|
isApprovalMode ? '系统参数模板' : displayTemplateName || '系统参数'
|
||||||
}}</span>
|
}}</span>
|
||||||
</div>
|
</div>
|
||||||
@ -88,6 +88,13 @@
|
|||||||
>
|
>
|
||||||
批量删除
|
批量删除
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
:disabled="selectedRows.length === 0"
|
||||||
|
class="right-button"
|
||||||
|
@click="handleBatchModifyDepartment"
|
||||||
|
>
|
||||||
|
批量修改部门
|
||||||
|
</el-button>
|
||||||
<el-button class="right-button-primary" type="primary" @click="handleAddParam">
|
<el-button class="right-button-primary" type="primary" @click="handleAddParam">
|
||||||
新增参数
|
新增参数
|
||||||
</el-button>
|
</el-button>
|
||||||
@ -258,6 +265,19 @@
|
|||||||
:class="{ 'has-footer': isApprovalMode }"
|
:class="{ 'has-footer': isApprovalMode }"
|
||||||
>
|
>
|
||||||
<div class="approval-content">
|
<div class="approval-content">
|
||||||
|
<!-- 流程主题 -->
|
||||||
|
<div class="approval-process-title">
|
||||||
|
<div class="description-label">
|
||||||
|
流程主题 <span class="required-mark">*</span>
|
||||||
|
</div>
|
||||||
|
<el-input
|
||||||
|
v-model="approvalFormData.processTitle"
|
||||||
|
maxlength="100"
|
||||||
|
show-word-limit
|
||||||
|
placeholder="请输入流程主题"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- 参数表格 -->
|
<!-- 参数表格 -->
|
||||||
<div class="approval-table-section">
|
<div class="approval-table-section">
|
||||||
<el-table
|
<el-table
|
||||||
@ -299,8 +319,6 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 流程主题 -->
|
|
||||||
|
|
||||||
<!-- 说明 -->
|
<!-- 说明 -->
|
||||||
<div class="approval-description">
|
<div class="approval-description">
|
||||||
<div class="description-label">
|
<div class="description-label">
|
||||||
@ -319,48 +337,6 @@
|
|||||||
<div class="workflow-title">
|
<div class="workflow-title">
|
||||||
审批环节
|
审批环节
|
||||||
</div>
|
</div>
|
||||||
<div>
|
|
||||||
<div class="approval-process-title">
|
|
||||||
<div class="description-label">
|
|
||||||
流程主题 <span class="required-mark">*</span>
|
|
||||||
<div v-if="isResendModeFilled && !isProcessTitleEditing" class="step-actions">
|
|
||||||
<el-button
|
|
||||||
type="text"
|
|
||||||
size="small"
|
|
||||||
class="edit-step-btn"
|
|
||||||
@click="handleEditProcessTitle"
|
|
||||||
>
|
|
||||||
修改
|
|
||||||
</el-button>
|
|
||||||
</div>
|
|
||||||
<div v-else-if="isResendModeFilled && isProcessTitleEditing" class="step-actions">
|
|
||||||
<el-button
|
|
||||||
type="text"
|
|
||||||
size="small"
|
|
||||||
class="save-step-btn"
|
|
||||||
@click="handleSaveProcessTitle"
|
|
||||||
>
|
|
||||||
保存
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
|
||||||
type="text"
|
|
||||||
size="small"
|
|
||||||
class="cancel-step-btn"
|
|
||||||
@click="handleCancelEditProcessTitle"
|
|
||||||
>
|
|
||||||
返回
|
|
||||||
</el-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<el-input
|
|
||||||
v-model="approvalFormData.processTitle"
|
|
||||||
maxlength="100"
|
|
||||||
show-word-limit
|
|
||||||
placeholder="请输入流程主题"
|
|
||||||
:disabled="isResendModeFilled && !isProcessTitleEditing"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="workflow-table">
|
<div class="workflow-table">
|
||||||
<table class="workflow-table-content">
|
<table class="workflow-table-content">
|
||||||
<thead>
|
<thead>
|
||||||
@ -394,7 +370,6 @@
|
|||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
:remote-method="(query) => handleRemoteSearch(query, index)"
|
:remote-method="(query) => handleRemoteSearch(query, index)"
|
||||||
:loading="step.loading"
|
:loading="step.loading"
|
||||||
:disabled="isResendModeFilled && !isProcessTitleEditing"
|
|
||||||
class="handler-select"
|
class="handler-select"
|
||||||
@change="(value) => handleHandlerChange(index, value)"
|
@change="(value) => handleHandlerChange(index, value)"
|
||||||
>
|
>
|
||||||
@ -426,7 +401,7 @@
|
|||||||
<!-- <el-button @click="handleReset">
|
<!-- <el-button @click="handleReset">
|
||||||
重置
|
重置
|
||||||
</el-button> -->
|
</el-button> -->
|
||||||
<el-button type="primary" :loading="submitting" @click="handleSubmit">
|
<el-button type="primary" @click="handleSubmit">
|
||||||
保存
|
保存
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
@ -438,7 +413,12 @@
|
|||||||
<el-button @click="handleApprovalCancel">
|
<el-button @click="handleApprovalCancel">
|
||||||
取消
|
取消
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="primary" :loading="approvalSubmitting" @click="handleApprovalFormSubmit">
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
:loading="approvalSubmitting"
|
||||||
|
:disabled="!approvalFormData.processTitle || !approvalFormData.processTitle.trim()"
|
||||||
|
@click="handleApprovalFormSubmit"
|
||||||
|
>
|
||||||
确定
|
确定
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
@ -543,7 +523,7 @@
|
|||||||
|
|
||||||
<!-- 部门选择弹窗 -->
|
<!-- 部门选择弹窗 -->
|
||||||
<el-dialog
|
<el-dialog
|
||||||
title="选择填写部门"
|
:title="batchModifyDepartmentMode ? '批量修改部门' : '选择填写部门'"
|
||||||
:visible.sync="departmentDialogVisible"
|
:visible.sync="departmentDialogVisible"
|
||||||
width="500px"
|
width="500px"
|
||||||
append-to-body
|
append-to-body
|
||||||
@ -566,6 +546,7 @@
|
|||||||
node-key="id"
|
node-key="id"
|
||||||
:filter-node-method="filterDepartmentNode"
|
:filter-node-method="filterDepartmentNode"
|
||||||
highlight-current
|
highlight-current
|
||||||
|
:current-node-key="currentDepartmentNodeKey"
|
||||||
:expand-on-click-node="false"
|
:expand-on-click-node="false"
|
||||||
@node-click="handleDepartmentTreeNodeClick"
|
@node-click="handleDepartmentTreeNodeClick"
|
||||||
/>
|
/>
|
||||||
@ -573,7 +554,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button @click="handleDepartmentDialogClose">取消</el-button>
|
<el-button @click="handleDepartmentDialogClose">取消</el-button>
|
||||||
<el-button type="primary" @click="handleConfirmDepartmentSelect">确定</el-button>
|
<el-button type="primary" @click="handleConfirmDepartment">确定</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
@ -697,6 +678,8 @@ export default {
|
|||||||
departmentTreeData: [], // 部门树数据(用于 el-tree)
|
departmentTreeData: [], // 部门树数据(用于 el-tree)
|
||||||
selectedDepartmentNode: null, // 选中的部门节点
|
selectedDepartmentNode: null, // 选中的部门节点
|
||||||
departmentSearchText: '', // 部门搜索文本
|
departmentSearchText: '', // 部门搜索文本
|
||||||
|
batchModifyDepartmentMode: false, // 是否为批量修改部门模式
|
||||||
|
currentDepartmentNodeKey: null, // 当前选中的部门节点 key(用于反显)
|
||||||
paramSubmitting: false,
|
paramSubmitting: false,
|
||||||
submitting: false, // 提交按钮loading状态
|
submitting: false, // 提交按钮loading状态
|
||||||
importing: false,
|
importing: false,
|
||||||
@ -1192,9 +1175,27 @@ export default {
|
|||||||
// 如果有搜索文本,展开所有节点
|
// 如果有搜索文本,展开所有节点
|
||||||
if (val && val.trim() !== '') {
|
if (val && val.trim() !== '') {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
// 获取所有节点的 key 并展开
|
||||||
const allKeys = this.getAllDepartmentNodeKeys(this.departmentTreeData)
|
const allKeys = this.getAllDepartmentNodeKeys(this.departmentTreeData)
|
||||||
this.$refs.departmentTree.setExpandedKeys(allKeys)
|
if (this.$refs.departmentTree && allKeys.length > 0) {
|
||||||
|
// 使用 setExpandedKeys 方法展开所有节点
|
||||||
|
try {
|
||||||
|
this.$refs.departmentTree.setExpandedKeys(allKeys)
|
||||||
|
} catch (err) {
|
||||||
|
// 如果 setExpandedKeys 不存在,使用递归方式展开
|
||||||
|
this.expandAllNodesRecursive(this.departmentTreeData)
|
||||||
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
// 清空搜索时,收起所有节点
|
||||||
|
if (this.$refs.departmentTree) {
|
||||||
|
try {
|
||||||
|
this.$refs.departmentTree.setExpandedKeys([])
|
||||||
|
} catch (err) {
|
||||||
|
// 忽略错误
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -1316,7 +1317,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
// this.loadUserSelfRole()
|
this.loadUserSelfRole()
|
||||||
// 优先使用 props,如果没有则使用路由参数
|
// 优先使用 props,如果没有则使用路由参数
|
||||||
if (this.templateId) {
|
if (this.templateId) {
|
||||||
this.internalTemplateId = this.templateId
|
this.internalTemplateId = this.templateId
|
||||||
@ -1500,12 +1501,39 @@ export default {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 检查是否有全局编辑权限(permissionPath 是"参数模板管理"且 parameterPer 是"编辑")
|
||||||
|
hasGlobalEditPermission() {
|
||||||
|
try {
|
||||||
|
const permissionDataStr = localStorage.getItem('user_self_role')
|
||||||
|
if (!permissionDataStr) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
const permissionData = JSON.parse(permissionDataStr)
|
||||||
|
if (!Array.isArray(permissionData)) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
// 检查是否有 permissionPath 为 "参数模板管理" 且 parameterPer 为 "编辑" 的权限
|
||||||
|
return permissionData.some((perm) => {
|
||||||
|
const permissionPath = perm.permissionPath || ''
|
||||||
|
const parameterPer = perm.parameterPer || ''
|
||||||
|
// 检查 permissionPath 是否等于 "参数模板管理"(不包含模板名称)
|
||||||
|
return permissionPath === '参数模板管理' && parameterPer === '编辑'
|
||||||
|
})
|
||||||
|
} catch (err) {
|
||||||
|
console.error('检查全局编辑权限失败:', err)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
},
|
||||||
// 检查是否有参数模板管理的权限(根据 permissionPath: "参数模板管理/模板名称")
|
// 检查是否有参数模板管理的权限(根据 permissionPath: "参数模板管理/模板名称")
|
||||||
hasTemplateManagementPermission() {
|
hasTemplateManagementPermission() {
|
||||||
// 如果是管理员,拥有全部权限
|
// 如果是管理员,拥有全部权限
|
||||||
if (this.isAdmin()) {
|
if (this.isAdmin()) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
// 如果有全局编辑权限,拥有全部权限
|
||||||
|
if (this.hasGlobalEditPermission()) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
const templateName = this.displayTemplateName
|
const templateName = this.displayTemplateName
|
||||||
if (!templateName) {
|
if (!templateName) {
|
||||||
return false
|
return false
|
||||||
@ -1536,6 +1564,10 @@ export default {
|
|||||||
if (this.isAdmin()) {
|
if (this.isAdmin()) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
// 如果有全局编辑权限,拥有全部权限
|
||||||
|
if (this.hasGlobalEditPermission()) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
if (!subsystem || !partsName) {
|
if (!subsystem || !partsName) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
@ -1605,6 +1637,10 @@ export default {
|
|||||||
if (this.isAdmin()) {
|
if (this.isAdmin()) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
// 如果有全局编辑权限,拥有全部权限,可以直接编辑/删除
|
||||||
|
if (this.hasGlobalEditPermission()) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
// 如果该行的 createdBy 等于当前用户ID,可以编辑/删除
|
// 如果该行的 createdBy 等于当前用户ID,可以编辑/删除
|
||||||
if (row.createdBy === getUserId()) {
|
if (row.createdBy === getUserId()) {
|
||||||
return true
|
return true
|
||||||
@ -1619,15 +1655,16 @@ export default {
|
|||||||
},
|
},
|
||||||
loadDepartmentList() {
|
loadDepartmentList() {
|
||||||
const request = {
|
const request = {
|
||||||
...api.QUERY_ORG_TREE,
|
...api.GET_DEPT_OF_USER,
|
||||||
disableSuccessMsg: true
|
disableSuccessMsg: true
|
||||||
}
|
}
|
||||||
this.$request(request)
|
this.$request(request)
|
||||||
.asyncThen((resp) => {
|
.asyncThen((resp) => {
|
||||||
// 处理返回的数据,确保格式为 { id, name, children }
|
// 处理返回的数据,确保格式为 { id, name, children }
|
||||||
|
console.log('resp2222', resp)
|
||||||
let result = []
|
let result = []
|
||||||
if (resp && resp.data) {
|
if (resp && resp.data) {
|
||||||
result = resp.data.result || resp.data.data || resp.data || []
|
result = resp.data || []
|
||||||
}
|
}
|
||||||
// 格式化数据为级联选择器需要的格式
|
// 格式化数据为级联选择器需要的格式
|
||||||
this.departmentList = this.formatDepartmentTreeData(result)
|
this.departmentList = this.formatDepartmentTreeData(result)
|
||||||
@ -1666,13 +1703,30 @@ export default {
|
|||||||
},
|
},
|
||||||
// 打开部门选择弹窗
|
// 打开部门选择弹窗
|
||||||
handleOpenDepartmentDialog() {
|
handleOpenDepartmentDialog() {
|
||||||
|
this.batchModifyDepartmentMode = false
|
||||||
this.departmentDialogVisible = true
|
this.departmentDialogVisible = true
|
||||||
this.departmentSearchText = '' // 重置搜索文本
|
this.departmentSearchText = '' // 重置搜索文本
|
||||||
|
this.selectedDepartmentNode = null // 重置选中的节点
|
||||||
// 如果已有选中的部门,在树中高亮显示
|
// 如果已有选中的部门,在树中高亮显示
|
||||||
if (this.paramFormData.departmentId && this.$refs.departmentTree) {
|
if (this.paramFormData.departmentId) {
|
||||||
|
this.currentDepartmentNodeKey = this.paramFormData.departmentId
|
||||||
|
// 查找对应的节点数据
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.departmentTree.setCurrentKey(this.paramFormData.departmentId)
|
const node = this.findDepartmentNodeById(this.departmentTreeData, this.paramFormData.departmentId)
|
||||||
|
if (node) {
|
||||||
|
this.selectedDepartmentNode = node
|
||||||
|
}
|
||||||
|
// 设置当前选中的节点
|
||||||
|
if (this.$refs.departmentTree) {
|
||||||
|
try {
|
||||||
|
this.$refs.departmentTree.setCurrentKey(this.paramFormData.departmentId)
|
||||||
|
} catch (err) {
|
||||||
|
console.warn('设置当前节点失败:', err)
|
||||||
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
this.currentDepartmentNodeKey = null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 关闭部门选择弹窗
|
// 关闭部门选择弹窗
|
||||||
@ -1680,6 +1734,8 @@ export default {
|
|||||||
this.departmentDialogVisible = false
|
this.departmentDialogVisible = false
|
||||||
this.selectedDepartmentNode = null
|
this.selectedDepartmentNode = null
|
||||||
this.departmentSearchText = '' // 清空搜索文本
|
this.departmentSearchText = '' // 清空搜索文本
|
||||||
|
this.batchModifyDepartmentMode = false // 重置批量修改模式
|
||||||
|
this.currentDepartmentNodeKey = null // 清空当前选中的节点 key
|
||||||
},
|
},
|
||||||
// 过滤部门树节点
|
// 过滤部门树节点
|
||||||
filterDepartmentNode(value, data) {
|
filterDepartmentNode(value, data) {
|
||||||
@ -1702,12 +1758,74 @@ export default {
|
|||||||
})
|
})
|
||||||
return keys
|
return keys
|
||||||
},
|
},
|
||||||
|
// 递归展开所有节点(备用方法)
|
||||||
|
expandAllNodesRecursive(nodes) {
|
||||||
|
if (!Array.isArray(nodes) || !this.$refs.departmentTree) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
nodes.forEach(node => {
|
||||||
|
if (node.id) {
|
||||||
|
try {
|
||||||
|
this.$refs.departmentTree.store.setExpanded(node.id, true)
|
||||||
|
} catch (err) {
|
||||||
|
// 忽略错误
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (node.children && Array.isArray(node.children) && node.children.length > 0) {
|
||||||
|
this.expandAllNodesRecursive(node.children)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 根据 ID 查找部门节点
|
||||||
|
findDepartmentNodeById(nodes, targetId) {
|
||||||
|
if (!Array.isArray(nodes) || !targetId) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
for (const node of nodes) {
|
||||||
|
if (node.id === targetId) {
|
||||||
|
return node
|
||||||
|
}
|
||||||
|
if (node.children && Array.isArray(node.children) && node.children.length > 0) {
|
||||||
|
const found = this.findDepartmentNodeById(node.children, targetId)
|
||||||
|
if (found) {
|
||||||
|
return found
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null
|
||||||
|
},
|
||||||
// 处理树节点点击
|
// 处理树节点点击
|
||||||
handleDepartmentTreeNodeClick(data) {
|
handleDepartmentTreeNodeClick(data) {
|
||||||
|
console.log('节点被点击:', data)
|
||||||
this.selectedDepartmentNode = data
|
this.selectedDepartmentNode = data
|
||||||
|
this.currentDepartmentNodeKey = data.id || null
|
||||||
|
},
|
||||||
|
// 统一处理确定按钮点击
|
||||||
|
handleConfirmDepartment() {
|
||||||
|
console.log('handleConfirmDepartment 被调用, batchModifyDepartmentMode:', this.batchModifyDepartmentMode)
|
||||||
|
if (this.batchModifyDepartmentMode) {
|
||||||
|
this.handleConfirmBatchModifyDepartment()
|
||||||
|
} else {
|
||||||
|
this.handleConfirmDepartmentSelect()
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// 确认选择部门
|
// 确认选择部门
|
||||||
handleConfirmDepartmentSelect() {
|
handleConfirmDepartmentSelect() {
|
||||||
|
console.log('handleConfirmDepartmentSelect')
|
||||||
|
// 如果没有选中的节点,尝试从 el-tree 获取当前选中的节点
|
||||||
|
if (!this.selectedDepartmentNode && this.$refs.departmentTree) {
|
||||||
|
try {
|
||||||
|
const currentKey = this.$refs.departmentTree.getCurrentKey()
|
||||||
|
if (currentKey) {
|
||||||
|
const node = this.findDepartmentNodeById(this.departmentTreeData, currentKey)
|
||||||
|
if (node) {
|
||||||
|
this.selectedDepartmentNode = node
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.warn('获取当前选中节点失败:', err)
|
||||||
|
}
|
||||||
|
}
|
||||||
if (!this.selectedDepartmentNode) {
|
if (!this.selectedDepartmentNode) {
|
||||||
this.$message.warning('请选择一个部门')
|
this.$message.warning('请选择一个部门')
|
||||||
return
|
return
|
||||||
@ -2105,9 +2223,10 @@ export default {
|
|||||||
|
|
||||||
// 切换到发起审批模式
|
// 切换到发起审批模式
|
||||||
this.isApprovalMode = true
|
this.isApprovalMode = true
|
||||||
// 重置表单数据
|
// 重置表单数据,设置流程主题默认值
|
||||||
|
const templateName = this.displayTemplateName || '模板'
|
||||||
this.approvalFormData = {
|
this.approvalFormData = {
|
||||||
processTitle: '',
|
processTitle: `${templateName}审批流程`,
|
||||||
description: ''
|
description: ''
|
||||||
}
|
}
|
||||||
// 重置审批环节
|
// 重置审批环节
|
||||||
@ -2269,10 +2388,18 @@ export default {
|
|||||||
if (dataObj.progressTitle || dataObj.processTitle) {
|
if (dataObj.progressTitle || dataObj.processTitle) {
|
||||||
this.approvalFormData.processTitle = dataObj.progressTitle || dataObj.processTitle || ''
|
this.approvalFormData.processTitle = dataObj.progressTitle || dataObj.processTitle || ''
|
||||||
console.log('填充流程主题:', this.approvalFormData.processTitle)
|
console.log('填充流程主题:', this.approvalFormData.processTitle)
|
||||||
|
} else {
|
||||||
|
// 如果接口没有返回流程主题,使用默认值
|
||||||
|
const templateName = this.displayTemplateName || '模板'
|
||||||
|
this.approvalFormData.processTitle = `${templateName}审批流程`
|
||||||
}
|
}
|
||||||
if (dataObj.explanation || dataObj.description) {
|
if (dataObj.explanation || dataObj.description) {
|
||||||
this.approvalFormData.description = dataObj.explanation || dataObj.description || ''
|
this.approvalFormData.description = dataObj.explanation || dataObj.description || ''
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// 如果接口没有返回数据,使用默认值
|
||||||
|
const templateName = this.displayTemplateName || '模板'
|
||||||
|
this.approvalFormData.processTitle = `${templateName}审批流程`
|
||||||
}
|
}
|
||||||
|
|
||||||
// 遍历节点列表,根据 nodeName 匹配到对应的审批环节并填充人员信息
|
// 遍历节点列表,根据 nodeName 匹配到对应的审批环节并填充人员信息
|
||||||
@ -2501,6 +2628,144 @@ export default {
|
|||||||
// 退出编辑状态
|
// 退出编辑状态
|
||||||
step.isEditing = false
|
step.isEditing = false
|
||||||
},
|
},
|
||||||
|
// 继续审批流程
|
||||||
|
continueApprovalProcess() {
|
||||||
|
// 从 resendFlowId 中获取 flowId
|
||||||
|
const flowId = this.resendFlowId
|
||||||
|
if (!flowId) {
|
||||||
|
this.$message.error('缺少流程ID,无法继续审批')
|
||||||
|
this.approvalSubmitting = false
|
||||||
|
return Promise.reject(new Error('缺少流程ID'))
|
||||||
|
}
|
||||||
|
|
||||||
|
const request = {
|
||||||
|
...api.CONTINUE_APPROVAL_PROCESS,
|
||||||
|
params: {
|
||||||
|
flowId: flowId,
|
||||||
|
userId: getUserId()
|
||||||
|
},
|
||||||
|
disableSuccessMsg: true
|
||||||
|
}
|
||||||
|
|
||||||
|
this.approvalSubmitting = true
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
this.$request(request)
|
||||||
|
.asyncThen((resp) => {
|
||||||
|
console.log('审批提交成功')
|
||||||
|
this.$message({
|
||||||
|
type: 'success',
|
||||||
|
message: '审批提交成功'
|
||||||
|
})
|
||||||
|
this.isApprovalMode = false
|
||||||
|
this.isResendModeFilled = false
|
||||||
|
this.resendFlowId = null
|
||||||
|
this.approvalSubmitting = false
|
||||||
|
// 清空保存的审批模式前的数据(因为审批已提交,不需要还原)
|
||||||
|
this.originalTableDataForApproval = []
|
||||||
|
this.originalPaginationForApproval = null
|
||||||
|
this.handleBack()
|
||||||
|
resolve(resp)
|
||||||
|
})
|
||||||
|
.asyncErrorCatch((err) => {
|
||||||
|
console.error('审批提交失败:', err)
|
||||||
|
this.$message({
|
||||||
|
type: 'error',
|
||||||
|
message: err?.message || '审批提交失败,请重试'
|
||||||
|
})
|
||||||
|
this.approvalSubmitting = false
|
||||||
|
reject(err)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 检查审批流程是否有变化
|
||||||
|
checkApprovalDataChanged() {
|
||||||
|
// 检查流程主题是否有变化
|
||||||
|
const currentTitle = (this.approvalFormData.processTitle || '').trim()
|
||||||
|
const originalTitle = (this.originalProcessTitle || '').trim()
|
||||||
|
if (currentTitle !== originalTitle) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// 检查审批环节是否有变化
|
||||||
|
for (let i = 0; i < this.approvalWorkflowSteps.length; i++) {
|
||||||
|
const step = this.approvalWorkflowSteps[i]
|
||||||
|
const originalHandlers = (step.originalData && step.originalData.handlers) || []
|
||||||
|
const currentHandlers = (step.handlers || []).slice().sort()
|
||||||
|
const originalHandlersSorted = originalHandlers.slice().sort()
|
||||||
|
|
||||||
|
// 比较数组是否相同
|
||||||
|
if (currentHandlers.length !== originalHandlersSorted.length) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
for (let j = 0; j < currentHandlers.length; j++) {
|
||||||
|
if (currentHandlers[j] !== originalHandlersSorted[j]) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
},
|
||||||
|
// 保存审批流程变更(返回 Promise)
|
||||||
|
saveApprovalChanges() {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
const newTitle = (this.approvalFormData.processTitle || '').trim()
|
||||||
|
if (!newTitle) {
|
||||||
|
reject(new Error('流程主题不能为空'))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取 flowId:优先从 detail 中获取,如果没有则从 resendFlowId 中获取
|
||||||
|
let flowId = null
|
||||||
|
if (this.detail && this.detail.flowId) {
|
||||||
|
flowId = this.detail.flowId
|
||||||
|
} else if (this.resendFlowId) {
|
||||||
|
flowId = this.resendFlowId
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!flowId) {
|
||||||
|
reject(new Error('缺少流程ID,无法保存'))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 构建 nodeList:从审批环节中提取(和发起审批一样)
|
||||||
|
const nodeList = this.approvalWorkflowSteps.map((step, index) => ({
|
||||||
|
nodeName: step.name,
|
||||||
|
assignees: step.handlers,
|
||||||
|
nodeOrder: index + 1
|
||||||
|
}))
|
||||||
|
|
||||||
|
// 调用编辑审批流程接口,传参:nodeList, flowId, title, userId
|
||||||
|
const request = {
|
||||||
|
...api.EDIT_APPROVAL_PROCESS,
|
||||||
|
params: {
|
||||||
|
nodeList: nodeList,
|
||||||
|
flowId: flowId,
|
||||||
|
title: newTitle,
|
||||||
|
userId: getUserId()
|
||||||
|
},
|
||||||
|
disableSuccessMsg: true
|
||||||
|
}
|
||||||
|
|
||||||
|
this.$request(request)
|
||||||
|
.asyncThen(() => {
|
||||||
|
// 更新原始数据备份
|
||||||
|
this.originalProcessTitle = newTitle
|
||||||
|
// 更新所有环节的原始数据备份
|
||||||
|
this.approvalWorkflowSteps.forEach((step) => {
|
||||||
|
step.originalData = {
|
||||||
|
handlers: JSON.parse(JSON.stringify(step.handlers || [])),
|
||||||
|
options: JSON.parse(JSON.stringify(step.options || []))
|
||||||
|
}
|
||||||
|
})
|
||||||
|
resolve()
|
||||||
|
})
|
||||||
|
.asyncErrorCatch((err) => {
|
||||||
|
console.error('保存失败:', err)
|
||||||
|
reject(err)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
// 编辑流程主题(统一控制所有环节的编辑状态)
|
// 编辑流程主题(统一控制所有环节的编辑状态)
|
||||||
handleEditProcessTitle() {
|
handleEditProcessTitle() {
|
||||||
// 备份当前流程主题
|
// 备份当前流程主题
|
||||||
@ -2606,52 +2871,39 @@ export default {
|
|||||||
this.isProcessTitleEditing = false
|
this.isProcessTitleEditing = false
|
||||||
},
|
},
|
||||||
handleApprovalFormSubmit() {
|
handleApprovalFormSubmit() {
|
||||||
|
const processTitle = (this.approvalFormData.processTitle || '').trim()
|
||||||
|
if (!processTitle) {
|
||||||
|
this.$message.warning('请填写流程主题')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
// 统一使用去除首尾空格的值
|
||||||
|
this.approvalFormData.processTitle = processTitle
|
||||||
// 判断是否是重新发起状态
|
// 判断是否是重新发起状态
|
||||||
if (this.isResendModeFilled) {
|
if (this.isResendModeFilled) {
|
||||||
// 重新发起状态:调用 CONTINUE_APPROVAL_PROCESS 接口
|
// 重新发起状态:先检查是否有变化
|
||||||
// 从 resendFlowId 中获取 flowId
|
const hasChanged = this.checkApprovalDataChanged()
|
||||||
const flowId = this.resendFlowId
|
console.log('hasChanged', hasChanged);
|
||||||
if (!flowId) {
|
|
||||||
this.$message.error('缺少流程ID,无法继续审批')
|
if (hasChanged) {
|
||||||
return
|
// 有变化,先保存变更
|
||||||
}
|
this.approvalSubmitting = true
|
||||||
|
this.saveApprovalChanges()
|
||||||
const request = {
|
.then(() => {
|
||||||
...api.CONTINUE_APPROVAL_PROCESS,
|
// 保存成功后,继续审批流程
|
||||||
params: {
|
return this.continueApprovalProcess()
|
||||||
flowId: flowId,
|
|
||||||
userId: getUserId()
|
|
||||||
},
|
|
||||||
disableSuccessMsg: true
|
|
||||||
}
|
|
||||||
|
|
||||||
this.approvalSubmitting = true
|
|
||||||
this.$request(request)
|
|
||||||
.asyncThen((resp) => {
|
|
||||||
console.log('审批提交成功')
|
|
||||||
this.$message({
|
|
||||||
type: 'success',
|
|
||||||
message: '审批提交成功'
|
|
||||||
})
|
})
|
||||||
this.isApprovalMode = false
|
.catch((err) => {
|
||||||
this.isResendModeFilled = false
|
console.error('保存变更失败:', err)
|
||||||
this.resendFlowId = null
|
this.$message({
|
||||||
this.approvalSubmitting = false
|
type: 'error',
|
||||||
// 清空保存的审批模式前的数据(因为审批已提交,不需要还原)
|
message: err?.message || '保存变更失败,请重试'
|
||||||
this.originalTableDataForApproval = []
|
})
|
||||||
this.originalPaginationForApproval = null
|
this.approvalSubmitting = false
|
||||||
this.handleBack()
|
|
||||||
})
|
|
||||||
.asyncErrorCatch((err) => {
|
|
||||||
console.error('审批提交失败:', err)
|
|
||||||
this.$message({
|
|
||||||
type: 'error',
|
|
||||||
message: err?.message || '审批提交失败,请重试'
|
|
||||||
})
|
})
|
||||||
})
|
} else {
|
||||||
.finally(() => {
|
// 没有变化,直接继续审批流程
|
||||||
this.approvalSubmitting = false
|
this.continueApprovalProcess()
|
||||||
})
|
}
|
||||||
} else {
|
} else {
|
||||||
// 正常发起审批:调用 START_APPROVAL 接口
|
// 正常发起审批:调用 START_APPROVAL 接口
|
||||||
// 获取模板ID
|
// 获取模板ID
|
||||||
@ -2661,10 +2913,6 @@ export default {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
const processTitle = (this.approvalFormData.processTitle || '').trim()
|
const processTitle = (this.approvalFormData.processTitle || '').trim()
|
||||||
if (!processTitle) {
|
|
||||||
this.$message.warning('请填写流程主题')
|
|
||||||
return
|
|
||||||
}
|
|
||||||
// 构建 nodeList:从审批环节中提取(按照 engineDetail.vue 的方式)
|
// 构建 nodeList:从审批环节中提取(按照 engineDetail.vue 的方式)
|
||||||
const nodeList = this.approvalWorkflowSteps.map((step, index) => ({
|
const nodeList = this.approvalWorkflowSteps.map((step, index) => ({
|
||||||
nodeName: step.name,
|
nodeName: step.name,
|
||||||
@ -3149,6 +3397,104 @@ export default {
|
|||||||
// 取消删除
|
// 取消删除
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 批量修改部门
|
||||||
|
handleBatchModifyDepartment() {
|
||||||
|
if (!this.selectedRows || this.selectedRows.length === 0) {
|
||||||
|
this.$message.warning('请先选择要修改部门的参数')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
// 过滤掉已标记为删除的行
|
||||||
|
const validSelectedRows = this.selectedRows.filter((row) => row.operation !== 'delete')
|
||||||
|
if (validSelectedRows.length === 0) {
|
||||||
|
this.$message.warning('选中的参数中已包含已删除的项,请重新选择')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
// 打开部门选择弹窗(批量修改模式)
|
||||||
|
this.batchModifyDepartmentMode = true
|
||||||
|
this.departmentDialogVisible = true
|
||||||
|
this.departmentSearchText = '' // 重置搜索文本
|
||||||
|
this.selectedDepartmentNode = null // 重置选中的部门节点
|
||||||
|
this.currentDepartmentNodeKey = null // 重置当前选中的节点 key
|
||||||
|
// 清空树节点的选中状态
|
||||||
|
this.$nextTick(() => {
|
||||||
|
if (this.$refs.departmentTree) {
|
||||||
|
try {
|
||||||
|
// 清空当前选中的节点
|
||||||
|
this.$refs.departmentTree.setCurrentKey(null)
|
||||||
|
} catch (err) {
|
||||||
|
console.warn('清空树节点选中状态失败:', err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 确认批量修改部门
|
||||||
|
handleConfirmBatchModifyDepartment() {
|
||||||
|
console.log('selectedDepartmentNode', this.selectedDepartmentNode)
|
||||||
|
|
||||||
|
// 如果没有选中的节点,尝试从 el-tree 获取当前选中的节点
|
||||||
|
if (!this.selectedDepartmentNode && this.$refs.departmentTree) {
|
||||||
|
try {
|
||||||
|
const currentKey = this.$refs.departmentTree.getCurrentKey()
|
||||||
|
if (currentKey) {
|
||||||
|
const node = this.findDepartmentNodeById(this.departmentTreeData, currentKey)
|
||||||
|
if (node) {
|
||||||
|
this.selectedDepartmentNode = node
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.warn('获取当前选中节点失败:', err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!this.selectedDepartmentNode) {
|
||||||
|
this.$message.warning('请选择一个部门')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
// 过滤掉已标记为删除的行
|
||||||
|
const validSelectedRows = this.selectedRows.filter((row) => row.operation !== 'delete')
|
||||||
|
if (validSelectedRows.length === 0) {
|
||||||
|
this.$message.warning('选中的参数中已包含已删除的项,请重新选择')
|
||||||
|
this.handleDepartmentDialogClose()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
// 获取部门路径名称
|
||||||
|
const departmentPath = this.getDepartmentPathName(this.selectedDepartmentNode.id)
|
||||||
|
const departmentName = departmentPath || this.selectedDepartmentNode.name
|
||||||
|
const departmentId = this.selectedDepartmentNode.id
|
||||||
|
// 批量更新选中行的部门信息
|
||||||
|
let updateCount = 0
|
||||||
|
validSelectedRows.forEach((row) => {
|
||||||
|
const index = this.tableData.findIndex(
|
||||||
|
(item) =>
|
||||||
|
(item.rowId && row.rowId && item.rowId === row.rowId) ||
|
||||||
|
(item.id && row.id && item.id === row.id) ||
|
||||||
|
(row._localId && item._localId && item._localId === row._localId) ||
|
||||||
|
item === row
|
||||||
|
)
|
||||||
|
if (index !== -1) {
|
||||||
|
const targetRow = this.tableData[index]
|
||||||
|
// 如果该行已经是删除状态,跳过
|
||||||
|
if (targetRow.operation === 'delete') {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
// 更新部门信息
|
||||||
|
const updatedRow = {
|
||||||
|
...targetRow,
|
||||||
|
department: departmentName,
|
||||||
|
departmentId: departmentId,
|
||||||
|
operation: targetRow.operation || 'update' // 如果是新增的数据,保持 insert,否则设置为 update
|
||||||
|
}
|
||||||
|
this.$set(this.tableData, index, updatedRow)
|
||||||
|
updateCount++
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// 关闭弹窗
|
||||||
|
this.handleDepartmentDialogClose()
|
||||||
|
if (updateCount > 0) {
|
||||||
|
this.$message.success(`已批量修改 ${updateCount} 个参数的部门`)
|
||||||
|
} else {
|
||||||
|
this.$message.warning('没有可修改的参数')
|
||||||
|
}
|
||||||
|
},
|
||||||
getRowClassName({ row }) {
|
getRowClassName({ row }) {
|
||||||
// 为标记为删除的行添加红色背景样式
|
// 为标记为删除的行添加红色背景样式
|
||||||
if (
|
if (
|
||||||
@ -3835,6 +4181,10 @@ export default {
|
|||||||
color: #303133;
|
color: #303133;
|
||||||
font-size: 16px !important;
|
font-size: 16px !important;
|
||||||
font-weight: 500 !important;
|
font-weight: 500 !important;
|
||||||
|
max-width: 180px !important;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3931,9 +4281,7 @@ export default {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
padding: 20px;
|
padding: 10px !important;
|
||||||
padding-bottom: 10px;
|
|
||||||
padding-top: 10px;
|
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
|
||||||
&.has-footer {
|
&.has-footer {
|
||||||
@ -4119,7 +4467,7 @@ export default {
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
margin-bottom: 16px;
|
margin-bottom: 20px;
|
||||||
|
|
||||||
.description-label {
|
.description-label {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
@ -4127,9 +4475,6 @@ export default {
|
|||||||
font-weight: bolder;
|
font-weight: bolder;
|
||||||
margin-bottom: 8px !important;
|
margin-bottom: 8px !important;
|
||||||
color: #303133;
|
color: #303133;
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
|
|
||||||
.step-actions {
|
.step-actions {
|
||||||
|
|||||||
@ -43,13 +43,14 @@
|
|||||||
v-for="(colConfig, index) in tableConfig.colConfigs"
|
v-for="(colConfig, index) in tableConfig.colConfigs"
|
||||||
v-slot:[colConfig.customSlot]="{ row, rowIndex }"
|
v-slot:[colConfig.customSlot]="{ row, rowIndex }"
|
||||||
>
|
>
|
||||||
<div v-if="colConfig.customSlot === 'options'" :key="'op' + index + '' + rowIndex">
|
<div v-if="colConfig.customSlot === 'processTitle'" :key="'pt' + index + '' + rowIndex">
|
||||||
<a
|
<a
|
||||||
href="javascript:void(0)"
|
href="javascript:void(0)"
|
||||||
class="el-link el-link--primary"
|
class="el-link el-link--primary"
|
||||||
@click.stop="handleRowView(row)"
|
@click.stop="handleRowView(row)"
|
||||||
>查看</a
|
|
||||||
>
|
>
|
||||||
|
{{ row.processTitle || '--' }}
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -72,6 +73,7 @@
|
|||||||
:dispatch-type="dispatchType"
|
:dispatch-type="dispatchType"
|
||||||
:responsible-person-id="responsiblePersonId"
|
:responsible-person-id="responsiblePersonId"
|
||||||
:filled-by="filledBy"
|
:filled-by="filledBy"
|
||||||
|
:hide-operations="true"
|
||||||
class="engine-detail-wrapper"
|
class="engine-detail-wrapper"
|
||||||
@back="handleBackFromDetail"
|
@back="handleBackFromDetail"
|
||||||
/>
|
/>
|
||||||
@ -82,6 +84,7 @@
|
|||||||
:detail="currentEngineDetail"
|
:detail="currentEngineDetail"
|
||||||
:visible="showEngineCheck"
|
:visible="showEngineCheck"
|
||||||
:engine-type="engineType"
|
:engine-type="engineType"
|
||||||
|
:hide-operations="true"
|
||||||
class="engine-check-wrapper"
|
class="engine-check-wrapper"
|
||||||
@close="handleBackFromCheck"
|
@close="handleBackFromCheck"
|
||||||
/>
|
/>
|
||||||
@ -148,7 +151,13 @@ export default {
|
|||||||
rowDraggable: false,
|
rowDraggable: false,
|
||||||
colConfigs: [
|
colConfigs: [
|
||||||
// { prop: 'documentNo', label: '单据编号', showOverflowTooltip: true, minWidth: '140' },
|
// { prop: 'documentNo', label: '单据编号', showOverflowTooltip: true, minWidth: '140' },
|
||||||
{ prop: 'processTitle', label: '流程主题', showOverflowTooltip: true, minWidth: '160' },
|
{
|
||||||
|
prop: 'processTitle',
|
||||||
|
label: '流程主题',
|
||||||
|
showOverflowTooltip: true,
|
||||||
|
minWidth: '200',
|
||||||
|
customSlot: 'processTitle'
|
||||||
|
},
|
||||||
{ prop: 'currentNode', label: '当前环节', showOverflowTooltip: true, minWidth: '140' },
|
{ prop: 'currentNode', label: '当前环节', showOverflowTooltip: true, minWidth: '140' },
|
||||||
// { prop: 'statusCode', label: '状态代号', showOverflowTooltip: true, minWidth: '120' },
|
// { prop: 'statusCode', label: '状态代号', showOverflowTooltip: true, minWidth: '120' },
|
||||||
// { prop: 'modelName', label: '产品型号', showOverflowTooltip: true, minWidth: '120' },
|
// { prop: 'modelName', label: '产品型号', showOverflowTooltip: true, minWidth: '120' },
|
||||||
@ -166,14 +175,6 @@ export default {
|
|||||||
minWidth: '160',
|
minWidth: '160',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
formatter: this.formatDateTime
|
formatter: this.formatDateTime
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'options',
|
|
||||||
label: '操作',
|
|
||||||
customSlot: 'options',
|
|
||||||
align: 'center',
|
|
||||||
width: '100',
|
|
||||||
fixed: 'right'
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
seqType: '',
|
seqType: '',
|
||||||
|
|||||||
@ -43,22 +43,23 @@
|
|||||||
v-for="(colConfig, index) in tableConfig.colConfigs"
|
v-for="(colConfig, index) in tableConfig.colConfigs"
|
||||||
v-slot:[colConfig.customSlot]="{ row, rowIndex }"
|
v-slot:[colConfig.customSlot]="{ row, rowIndex }"
|
||||||
>
|
>
|
||||||
<div v-if="colConfig.customSlot === 'options'" :key="'op' + index + '' + rowIndex">
|
<div v-if="colConfig.customSlot === 'processTitle'" :key="'pt' + index + '' + rowIndex">
|
||||||
<a
|
<a
|
||||||
href="javascript:void(0)"
|
href="javascript:void(0)"
|
||||||
class="el-link el-link--primary"
|
class="el-link el-link--primary"
|
||||||
@click.stop="handleRowView(row)"
|
@click.stop="handleRowView(row)"
|
||||||
>
|
>
|
||||||
查看
|
{{ row.processTitle || '--' }}
|
||||||
</a>
|
</a>
|
||||||
<span v-if="row.enableReturn == 1" style="width: 6px; display: inline-block"></span>
|
</div>
|
||||||
|
<div v-if="colConfig.customSlot === 'options'" :key="'op' + index + '' + rowIndex">
|
||||||
<a
|
<a
|
||||||
v-if="row.enableReturn == 1"
|
|
||||||
href="javascript:void(0)"
|
href="javascript:void(0)"
|
||||||
class="el-link el-link--primary"
|
class="el-link el-link--primary"
|
||||||
@click.stop="handleRowWithdraw(row)"
|
@click.stop="handleRowWithdraw(row)"
|
||||||
>撤回</a
|
|
||||||
>
|
>
|
||||||
|
撤回
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -82,6 +83,7 @@
|
|||||||
:responsible-person-id="responsiblePersonId"
|
:responsible-person-id="responsiblePersonId"
|
||||||
:filled-by="filledBy"
|
:filled-by="filledBy"
|
||||||
:last-updated-by="lastUpdatedBy"
|
:last-updated-by="lastUpdatedBy"
|
||||||
|
:hide-operations="true"
|
||||||
class="engine-detail-wrapper"
|
class="engine-detail-wrapper"
|
||||||
@back="handleBackFromDetail"
|
@back="handleBackFromDetail"
|
||||||
/>
|
/>
|
||||||
@ -92,6 +94,7 @@
|
|||||||
:detail="currentEngineDetail"
|
:detail="currentEngineDetail"
|
||||||
:visible="showEngineCheck"
|
:visible="showEngineCheck"
|
||||||
:engine-type="engineType"
|
:engine-type="engineType"
|
||||||
|
:hide-operations="true"
|
||||||
class="engine-check-wrapper"
|
class="engine-check-wrapper"
|
||||||
@close="handleBackFromCheck"
|
@close="handleBackFromCheck"
|
||||||
/>
|
/>
|
||||||
@ -124,7 +127,6 @@ import ApprovalProgressDetail from './approvalProgressDetail.vue'
|
|||||||
import ReportDetail from './reportDetail.vue'
|
import ReportDetail from './reportDetail.vue'
|
||||||
import { getUserId } from '@/utils'
|
import { getUserId } from '@/utils'
|
||||||
import api from '@/api/demo'
|
import api from '@/api/demo'
|
||||||
import { flow } from 'lodash-es'
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TodoPage',
|
name: 'TodoPage',
|
||||||
components: {
|
components: {
|
||||||
@ -159,7 +161,13 @@ export default {
|
|||||||
rowDraggable: false,
|
rowDraggable: false,
|
||||||
colConfigs: [
|
colConfigs: [
|
||||||
// { prop: 'documentNo', label: '单据编号', showOverflowTooltip: true, minWidth: '140' },
|
// { prop: 'documentNo', label: '单据编号', showOverflowTooltip: true, minWidth: '140' },
|
||||||
{ prop: 'processTitle', label: '流程主题', showOverflowTooltip: true, minWidth: '160' },
|
{
|
||||||
|
prop: 'processTitle',
|
||||||
|
label: '流程主题',
|
||||||
|
showOverflowTooltip: true,
|
||||||
|
minWidth: '200',
|
||||||
|
customSlot: 'processTitle'
|
||||||
|
},
|
||||||
{ prop: 'currentNode', label: '当前环节', showOverflowTooltip: true, minWidth: '100' },
|
{ prop: 'currentNode', label: '当前环节', showOverflowTooltip: true, minWidth: '100' },
|
||||||
// { prop: 'statusCode', label: '状态代号', showOverflowTooltip: true, minWidth: '120' },
|
// { prop: 'statusCode', label: '状态代号', showOverflowTooltip: true, minWidth: '120' },
|
||||||
// { prop: 'modelName', label: '产品型号', showOverflowTooltip: true, minWidth: '120' },
|
// { prop: 'modelName', label: '产品型号', showOverflowTooltip: true, minWidth: '120' },
|
||||||
@ -183,7 +191,7 @@ export default {
|
|||||||
label: '操作',
|
label: '操作',
|
||||||
customSlot: 'options',
|
customSlot: 'options',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: '140',
|
width: '100',
|
||||||
fixed: 'right'
|
fixed: 'right'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@ -49,9 +49,9 @@
|
|||||||
<div class="search-field">
|
<div class="search-field">
|
||||||
<span class="field-label">当前状态</span>
|
<span class="field-label">当前状态</span>
|
||||||
<el-select v-model="searchPanelValue.statusDescription" placeholder="请选择" clearable>
|
<el-select v-model="searchPanelValue.statusDescription" placeholder="请选择" clearable>
|
||||||
<el-option label="审批中" value="审批中" />
|
<el-option label="审核中" value="审核中" />
|
||||||
<el-option label="已通过" value="已通过" />
|
<el-option label="已通过" value="已通过" />
|
||||||
<el-option label="已退回" value="已退回" />
|
<el-option label="已拒绝" value="已拒绝" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
<div class="search-actions">
|
<div class="search-actions">
|
||||||
|
|||||||
@ -392,16 +392,10 @@ export default {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
// 检查是否有 permissionPath 为 "竞品发动机数据" 且 parameterPer 是编辑的权限
|
// 检查是否有 permissionPath 为 "竞品发动机数据" 且 parameterPer 是编辑的权限
|
||||||
// parameterPer 可能是数字 2 或字符串 "编辑" 或 "2"
|
|
||||||
return permissionData.some((perm) => {
|
return permissionData.some((perm) => {
|
||||||
const permissionPath = perm.permissionPath || ''
|
const permissionPath = perm.permissionPath || ''
|
||||||
const parameterPer = perm.parameterPer
|
const parameterPer = perm.parameterPer || ''
|
||||||
return (
|
return permissionPath === '竞品发动机数据' && parameterPer === '编辑'
|
||||||
permissionPath === '竞品发动机数据' &&
|
|
||||||
(parameterPer === 2 ||
|
|
||||||
parameterPer === '2' ||
|
|
||||||
parameterPer === '编辑')
|
|
||||||
)
|
|
||||||
})
|
})
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error('检查竞品发动机数据编辑权限失败:', err)
|
console.error('检查竞品发动机数据编辑权限失败:', err)
|
||||||
@ -490,6 +484,7 @@ export default {
|
|||||||
this.currentEngineDetail = null
|
this.currentEngineDetail = null
|
||||||
this.isDispatchMode = false
|
this.isDispatchMode = false
|
||||||
this.dispatchType = 'todo'
|
this.dispatchType = 'todo'
|
||||||
|
this.loadData()
|
||||||
},
|
},
|
||||||
currentChange(currentPage) {
|
currentChange(currentPage) {
|
||||||
this.pagination.currentPage = currentPage
|
this.pagination.currentPage = currentPage
|
||||||
|
|||||||
@ -265,6 +265,11 @@
|
|||||||
label-width="150px"
|
label-width="150px"
|
||||||
>
|
>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="22">
|
||||||
|
<el-form-item label="流程主题" prop="processTitle">
|
||||||
|
<el-input v-model="createFormData.processTitle" placeholder="请输入" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="标题名称" prop="title">
|
<el-form-item label="标题名称" prop="title">
|
||||||
<el-input v-model="createFormData.title" placeholder="请输入" />
|
<el-input v-model="createFormData.title" placeholder="请输入" />
|
||||||
@ -357,7 +362,7 @@
|
|||||||
选择文件
|
选择文件
|
||||||
</el-button>
|
</el-button>
|
||||||
<div slot="tip" class="el-upload__tip">
|
<div slot="tip" class="el-upload__tip">
|
||||||
支持扩展名: .doc .pdf .xls .xlsx .ppt .pptx,仅支持上传一个文件
|
支持扩展名: .doc .docx .pdf .xls .xlsx .ppt .pptx,仅支持上传一个文件
|
||||||
</div>
|
</div>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -369,15 +374,6 @@
|
|||||||
placeholder="请输入"
|
placeholder="请输入"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 流程主题 -->
|
|
||||||
<el-form-item label="流程主题" prop="processTitle">
|
|
||||||
<el-input
|
|
||||||
v-model="createFormData.processTitle"
|
|
||||||
maxlength="100"
|
|
||||||
show-word-limit
|
|
||||||
placeholder="请输入流程主题"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<!-- 审批环节 -->
|
<!-- 审批环节 -->
|
||||||
<el-form-item label="审批环节" prop="approvalWorkflowSteps">
|
<el-form-item label="审批环节" prop="approvalWorkflowSteps">
|
||||||
<div class="approval-workflow">
|
<div class="approval-workflow">
|
||||||
@ -615,6 +611,7 @@ export default {
|
|||||||
dialogMode: 'create', // 'create' 表示新增,'edit' 表示修改,'restart' 表示重新发起
|
dialogMode: 'create', // 'create' 表示新增,'edit' 表示修改,'restart' 表示重新发起
|
||||||
currentRestartRow: null, // 当前要重新发起的行数据
|
currentRestartRow: null, // 当前要重新发起的行数据
|
||||||
currentEditRow: null, // 当前要修改的行数据
|
currentEditRow: null, // 当前要修改的行数据
|
||||||
|
originalProcessTitle: '', // 保存编辑前的原始流程主题
|
||||||
launchDialogVisible: false, // 发起弹窗显示状态
|
launchDialogVisible: false, // 发起弹窗显示状态
|
||||||
currentLaunchRow: null, // 当前要发起的行数据
|
currentLaunchRow: null, // 当前要发起的行数据
|
||||||
launchProcessTitle: '',
|
launchProcessTitle: '',
|
||||||
@ -732,12 +729,12 @@ export default {
|
|||||||
return {
|
return {
|
||||||
rowDraggable: false,
|
rowDraggable: false,
|
||||||
colConfigs: [
|
colConfigs: [
|
||||||
{ prop: 'title', label: '标题', showOverflowTooltip: true, minWidth: '140' },
|
{ prop: 'title', label: '标题', showOverflowTooltip: true, minWidth: '120' },
|
||||||
{
|
{
|
||||||
prop: 'manufacturerName',
|
prop: 'manufacturerName',
|
||||||
label: '厂家名称',
|
label: '厂家名称',
|
||||||
showOverflowTooltip: true,
|
showOverflowTooltip: true,
|
||||||
minWidth: '160'
|
minWidth: '140'
|
||||||
},
|
},
|
||||||
{ prop: 'productNumber', label: '产品型号', showOverflowTooltip: true, minWidth: '160' },
|
{ prop: 'productNumber', label: '产品型号', showOverflowTooltip: true, minWidth: '160' },
|
||||||
{ prop: 'module', label: '领域/模块', showOverflowTooltip: true, minWidth: '120' },
|
{ prop: 'module', label: '领域/模块', showOverflowTooltip: true, minWidth: '120' },
|
||||||
@ -760,7 +757,7 @@ export default {
|
|||||||
label: '操作',
|
label: '操作',
|
||||||
customSlot: 'options',
|
customSlot: 'options',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: '160',
|
width: '200',
|
||||||
fixed: 'right'
|
fixed: 'right'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -812,15 +809,11 @@ export default {
|
|||||||
if (!Array.isArray(permissionData)) {
|
if (!Array.isArray(permissionData)) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
// 检查是否有 permissionPath 为 "报告" 且 parameterPer 是编辑的权限
|
// 检查是否有 permissionPath 为 "对标报告" 且 parameterPer 是编辑的权限
|
||||||
// parameterPer 可能是数字 2 或字符串 "编辑" 或 "2"
|
|
||||||
return permissionData.some((perm) => {
|
return permissionData.some((perm) => {
|
||||||
const permissionPath = perm.permissionPath || ''
|
const permissionPath = perm.permissionPath || ''
|
||||||
const parameterPer = perm.parameterPer
|
const parameterPer = perm.parameterPer || ''
|
||||||
return (
|
return permissionPath === '对标报告' && parameterPer === '编辑'
|
||||||
permissionPath === '对标报告' &&
|
|
||||||
(parameterPer === 2 || parameterPer === '2' || parameterPer === '编辑')
|
|
||||||
)
|
|
||||||
})
|
})
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error('检查报告编辑权限失败:', err)
|
console.error('检查报告编辑权限失败:', err)
|
||||||
@ -911,6 +904,8 @@ export default {
|
|||||||
this.dialogMode = 'edit'
|
this.dialogMode = 'edit'
|
||||||
this.currentEditRow = row
|
this.currentEditRow = row
|
||||||
this.currentRestartRow = null
|
this.currentRestartRow = null
|
||||||
|
// 保存原始流程主题
|
||||||
|
this.originalProcessTitle = row.processTitle || ''
|
||||||
// 填充当前行的数据到表单
|
// 填充当前行的数据到表单
|
||||||
this.createFormData = {
|
this.createFormData = {
|
||||||
title: row.title || '',
|
title: row.title || '',
|
||||||
@ -1422,10 +1417,34 @@ export default {
|
|||||||
this.currentEditRow &&
|
this.currentEditRow &&
|
||||||
this.currentEditRow.returnNum === 0
|
this.currentEditRow.returnNum === 0
|
||||||
) {
|
) {
|
||||||
// 修改:调用 EDIT_REPORT 接口
|
// 修改:先检查流程主题是否被修改,如果修改了则先调用 EDIT_APPROVAL_PROCESS_TITLE 接口
|
||||||
const reportId = this.currentEditRow.reportId || this.currentEditRow.id
|
const reportId = this.currentEditRow.reportId || this.currentEditRow.id
|
||||||
// 构建审批环节数据
|
const currentProcessTitle = (this.createFormData.processTitle || '').trim()
|
||||||
|
const originalProcessTitle = (this.originalProcessTitle || '').trim()
|
||||||
|
|
||||||
|
// 如果流程主题被修改,先调用 EDIT_APPROVAL_PROCESS_TITLE 接口
|
||||||
|
if (currentProcessTitle !== originalProcessTitle && this.currentEditRow.flowId) {
|
||||||
|
const updateTitleRequest = {
|
||||||
|
...api.EDIT_APPROVAL_PROCESS_TITLE,
|
||||||
|
params: {
|
||||||
|
flowId: this.currentEditRow.flowId,
|
||||||
|
title: currentProcessTitle
|
||||||
|
},
|
||||||
|
disableSuccessMsg: true
|
||||||
|
}
|
||||||
|
// 先调用更新流程主题接口,成功后再调用编辑报告接口
|
||||||
|
await this.$request(updateTitleRequest)
|
||||||
|
.asyncThen(() => {
|
||||||
|
console.log('流程主题更新成功')
|
||||||
|
})
|
||||||
|
.asyncErrorCatch((err) => {
|
||||||
|
console.error('更新流程主题失败:', err)
|
||||||
|
this.$message.error('更新流程主题失败,请重试')
|
||||||
|
throw err
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 构建审批环节数据,然后调用 EDIT_REPORT 接口
|
||||||
request = {
|
request = {
|
||||||
...api.EDIT_REPORT,
|
...api.EDIT_REPORT,
|
||||||
params: {
|
params: {
|
||||||
|
|||||||
@ -29,7 +29,7 @@
|
|||||||
<el-button @click="handleLaunch">
|
<el-button @click="handleLaunch">
|
||||||
发起
|
发起
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="primary" @click="handleEdit">
|
<el-button v-if="hasOperationPermission()" type="primary" @click="handleEdit">
|
||||||
修改
|
修改
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
@ -44,7 +44,7 @@
|
|||||||
<el-button @click="handleResendApproval">
|
<el-button @click="handleResendApproval">
|
||||||
发起
|
发起
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="primary" @click="handleEdit">
|
<el-button v-if="hasOperationPermission()" type="primary" @click="handleEdit">
|
||||||
修改
|
修改
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
@ -327,74 +327,12 @@
|
|||||||
</template>
|
</template>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<!-- 审批流程 -->
|
|
||||||
<section v-if="reportDetail.status && reportDetail.status !== 'DRAFT' && detail.flowId && !isEditMode" class="block-section">
|
|
||||||
<div class="section-title">
|
|
||||||
审批流程
|
|
||||||
</div>
|
|
||||||
<div v-if="timelineNodes && timelineNodes.length > 0" class="approval-timeline">
|
|
||||||
<el-timeline>
|
|
||||||
<el-timeline-item
|
|
||||||
v-for="(node, index) in timelineNodes"
|
|
||||||
:key="index"
|
|
||||||
:color="getTimelineColor(node.result || node.status, index, timelineNodes.length)"
|
|
||||||
>
|
|
||||||
<div class="timeline-item-content">
|
|
||||||
<div class="node-title">
|
|
||||||
{{ node.title }}
|
|
||||||
</div>
|
|
||||||
<div class="node-content">
|
|
||||||
<div class="node-info">
|
|
||||||
<div class="node-user">
|
|
||||||
{{ node.userName || '--' }}
|
|
||||||
<span class="node-time">
|
|
||||||
{{ formatTime(node.operateTime) }}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="node-status" :class="getStatusClass(node.result || node.status)">
|
|
||||||
{{ setStatusText(node.result || node.status) }}
|
|
||||||
</div>
|
|
||||||
<div v-if="node.opinion" class="node-opinion">
|
|
||||||
审批意见:{{ node.opinion }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</el-timeline-item>
|
|
||||||
</el-timeline>
|
|
||||||
</div>
|
|
||||||
<div v-else class="empty-progress">
|
|
||||||
<span class="empty-text">暂无审批流程数据</span>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<!-- 审批环节(草稿状态下显示) -->
|
<!-- 审批环节(草稿状态下显示) -->
|
||||||
<section v-if="reportDetail.status === 'DRAFT' || reportDetail.status === 'REJECTED'" class="block-section">
|
<section v-if="reportDetail.status === 'DRAFT' || reportDetail.status === 'REJECTED'" class="block-section">
|
||||||
<div class="section-title">
|
<div class="section-title">
|
||||||
审批环节
|
审批环节
|
||||||
</div>
|
</div>
|
||||||
<div class="approval-workflow">
|
<div class="approval-workflow">
|
||||||
<!-- 流程主题 -->
|
|
||||||
<div class="approval-process-title">
|
|
||||||
<div class="description-label">
|
|
||||||
流程主题 <span class="required-mark">*</span>
|
|
||||||
</div>
|
|
||||||
<!-- 只读模式:显示流程主题 -->
|
|
||||||
<template v-if="!isEditMode">
|
|
||||||
<div class="process-title-display">
|
|
||||||
{{ reportDetail.processTitle || showTopDetail.processTitle || editFormData.processTitle || '--' }}
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<!-- 编辑模式:可编辑的输入框 -->
|
|
||||||
<el-input
|
|
||||||
v-else
|
|
||||||
v-model="editFormData.processTitle"
|
|
||||||
maxlength="100"
|
|
||||||
show-word-limit
|
|
||||||
placeholder="请输入流程主题"
|
|
||||||
@change="handleProcessTitleChange"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div class="workflow-table">
|
<div class="workflow-table">
|
||||||
<table class="workflow-table-content">
|
<table class="workflow-table-content">
|
||||||
<thead>
|
<thead>
|
||||||
@ -459,6 +397,47 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<!-- 审批流程 -->
|
||||||
|
<section v-if="reportDetail.status && reportDetail.status !== 'DRAFT' && detail.flowId && !isEditMode" class="block-section">
|
||||||
|
<div class="section-title">
|
||||||
|
审批流程
|
||||||
|
</div>
|
||||||
|
<div v-if="timelineNodes && timelineNodes.length > 0" class="approval-timeline">
|
||||||
|
<el-timeline>
|
||||||
|
<el-timeline-item
|
||||||
|
v-for="(node, index) in timelineNodes"
|
||||||
|
:key="index"
|
||||||
|
:color="getTimelineColor(node.result || node.status, index, timelineNodes.length)"
|
||||||
|
>
|
||||||
|
<div class="timeline-item-content">
|
||||||
|
<div class="node-title">
|
||||||
|
{{ node.title }}
|
||||||
|
</div>
|
||||||
|
<div class="node-content">
|
||||||
|
<div class="node-info">
|
||||||
|
<div class="node-user">
|
||||||
|
{{ node.userName || '--' }}
|
||||||
|
<span class="node-time">
|
||||||
|
{{ formatTime(node.operateTime) }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="node-status" :class="getStatusClass(node.result || node.status)">
|
||||||
|
{{ setStatusText(node.result || node.status) }}
|
||||||
|
</div>
|
||||||
|
<div v-if="node.opinion" class="node-opinion">
|
||||||
|
审批意见:{{ node.opinion }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-timeline-item>
|
||||||
|
</el-timeline>
|
||||||
|
</div>
|
||||||
|
<div v-else class="empty-progress">
|
||||||
|
<span class="empty-text">暂无审批流程数据</span>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -517,8 +496,8 @@
|
|||||||
>
|
>
|
||||||
</el-radio>
|
</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
<!-- 当选择"发起审批"节点时,显示意见输入框 -->
|
<!-- 当选择"编制"节点时,显示意见输入框 -->
|
||||||
<div v-if="selectedReturnNode === '发起审批'" class="return-opinion-section">
|
<div v-if="selectedReturnNode === '编制'" class="return-opinion-section">
|
||||||
<div class="opinion-label">
|
<div class="opinion-label">
|
||||||
退回意见:
|
退回意见:
|
||||||
</div>
|
</div>
|
||||||
@ -599,7 +578,7 @@ export default {
|
|||||||
returnableNodes: [],
|
returnableNodes: [],
|
||||||
selectedReturnNode: '',
|
selectedReturnNode: '',
|
||||||
returnSubmitting: false,
|
returnSubmitting: false,
|
||||||
returnOpinion: '', // 退回意见(仅在选择发起审批节点时使用)
|
returnOpinion: '', // 退回意见(仅在选择编制节点时使用)
|
||||||
isEditMode: false, // 编辑模式
|
isEditMode: false, // 编辑模式
|
||||||
editFormData: {
|
editFormData: {
|
||||||
title: '',
|
title: '',
|
||||||
@ -803,8 +782,87 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
// this.getReportDetailProcess()
|
// this.getReportDetailProcess()
|
||||||
|
// 加载用户权限
|
||||||
|
this.loadUserSelfRole()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 加载用户自身角色权限
|
||||||
|
loadUserSelfRole() {
|
||||||
|
const request = {
|
||||||
|
...api.GET_USER_SELF_ROLE,
|
||||||
|
params: {
|
||||||
|
userOrDepID: getUserId()
|
||||||
|
},
|
||||||
|
disableSuccessMsg: true
|
||||||
|
}
|
||||||
|
this.$request(request)
|
||||||
|
.asyncThen((resp) => {
|
||||||
|
if (resp && resp.data) {
|
||||||
|
// 将权限数据存储到 localStorage
|
||||||
|
try {
|
||||||
|
localStorage.setItem('user_self_role', JSON.stringify(resp.data))
|
||||||
|
} catch (err) {
|
||||||
|
console.error('存储权限数据到 localStorage 失败:', err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.asyncErrorCatch((err) => {
|
||||||
|
console.error('获取用户自身角色失败:', err)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 检查是否是管理员(isAdmin === 1)
|
||||||
|
isAdmin() {
|
||||||
|
try {
|
||||||
|
const permissionDataStr = localStorage.getItem('user_self_role')
|
||||||
|
if (!permissionDataStr) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
const permissionData = JSON.parse(permissionDataStr)
|
||||||
|
if (!Array.isArray(permissionData)) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
// 检查是否有 isAdmin === 1 的记录
|
||||||
|
return permissionData.some((perm) => perm.isAdmin === 1 || perm.isAdmin === '1')
|
||||||
|
} catch (err) {
|
||||||
|
console.error('检查管理员权限失败:', err)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 检查是否有全局编辑权限(permissionPath 是"对标报告"且 parameterPer 是"编辑")
|
||||||
|
hasGlobalEditPermission() {
|
||||||
|
try {
|
||||||
|
const permissionDataStr = localStorage.getItem('user_self_role')
|
||||||
|
if (!permissionDataStr) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
const permissionData = JSON.parse(permissionDataStr)
|
||||||
|
if (!Array.isArray(permissionData)) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
// 检查是否有 permissionPath 为 "对标报告" 且 parameterPer 为 "编辑" 的权限
|
||||||
|
return permissionData.some((perm) => {
|
||||||
|
const permissionPath = perm.permissionPath || ''
|
||||||
|
const parameterPer = perm.parameterPer || ''
|
||||||
|
// 检查 permissionPath 是否等于 "对标报告"(不包含其他路径)
|
||||||
|
return permissionPath === '对标报告' && parameterPer === '编辑'
|
||||||
|
})
|
||||||
|
} catch (err) {
|
||||||
|
console.error('检查全局编辑权限失败:', err)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 检查是否有操作权限(管理员或全局编辑权限)
|
||||||
|
hasOperationPermission() {
|
||||||
|
// 如果是管理员,拥有全部权限
|
||||||
|
if (this.isAdmin()) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
// 如果有全局编辑权限,拥有全部权限
|
||||||
|
if (this.hasGlobalEditPermission()) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
},
|
||||||
setStatusText(result) {
|
setStatusText(result) {
|
||||||
const statusMap = {
|
const statusMap = {
|
||||||
'PASS': '通过',
|
'PASS': '通过',
|
||||||
@ -1019,14 +1077,14 @@ export default {
|
|||||||
this.$request(request)
|
this.$request(request)
|
||||||
.asyncThen((resp) => {
|
.asyncThen((resp) => {
|
||||||
console.log(resp)
|
console.log(resp)
|
||||||
// 在列表最前面添加"发起审批"节点作为默认选项
|
// 在列表最前面添加"编制"节点作为默认选项
|
||||||
const nodes = Array.isArray(resp.data) ? resp.data : []
|
const nodes = Array.isArray(resp.data) ? resp.data : []
|
||||||
this.returnableNodes = ['发起审批', ...nodes]
|
this.returnableNodes = ['编制', ...nodes]
|
||||||
})
|
})
|
||||||
.asyncErrorCatch((err) => {
|
.asyncErrorCatch((err) => {
|
||||||
console.error('获取退回节点失败:', err)
|
console.error('获取退回节点失败:', err)
|
||||||
// 即使获取失败,也添加"发起审批"节点
|
// 即使获取失败,也添加"编制"节点
|
||||||
this.returnableNodes = ['发起审批']
|
this.returnableNodes = ['编制']
|
||||||
})
|
})
|
||||||
this.selectedReturnNode = ''
|
this.selectedReturnNode = ''
|
||||||
this.returnOpinion = ''
|
this.returnOpinion = ''
|
||||||
@ -1040,8 +1098,8 @@ export default {
|
|||||||
},
|
},
|
||||||
// 处理退回节点选择变化
|
// 处理退回节点选择变化
|
||||||
handleReturnNodeChange() {
|
handleReturnNodeChange() {
|
||||||
// 如果不是"发起审批"节点,清空意见
|
// 如果不是"编制"节点,清空意见
|
||||||
if (this.selectedReturnNode !== '发起审批') {
|
if (this.selectedReturnNode !== '编制') {
|
||||||
this.returnOpinion = ''
|
this.returnOpinion = ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -1059,8 +1117,8 @@ export default {
|
|||||||
|
|
||||||
this.returnSubmitting = true
|
this.returnSubmitting = true
|
||||||
|
|
||||||
// 如果选择的是"发起审批"节点,调用拒绝接口
|
// 如果选择的是"编制"节点,调用拒绝接口
|
||||||
if (this.selectedReturnNode === '发起审批') {
|
if (this.selectedReturnNode === '编制') {
|
||||||
const submitData = {
|
const submitData = {
|
||||||
flowId: this.detail.flowId,
|
flowId: this.detail.flowId,
|
||||||
userId: getUserId(),
|
userId: getUserId(),
|
||||||
@ -1465,6 +1523,7 @@ export default {
|
|||||||
reportId: reportId,
|
reportId: reportId,
|
||||||
...this.editFormData,
|
...this.editFormData,
|
||||||
flowId: '',
|
flowId: '',
|
||||||
|
title: this.editingProcessTitle || '',
|
||||||
processTitle: this.editFormData.processTitle || '',
|
processTitle: this.editFormData.processTitle || '',
|
||||||
explanation: '',
|
explanation: '',
|
||||||
nodeList: nodeList,
|
nodeList: nodeList,
|
||||||
@ -2027,6 +2086,33 @@ export default {
|
|||||||
baseChanged ||
|
baseChanged ||
|
||||||
(includeApprovalInSave && approvalChanged)
|
(includeApprovalInSave && approvalChanged)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// 如果是草稿状态(includeApprovalInSave 为 true)且流程主题被修改,先调用 EDIT_APPROVAL_PROCESS_TITLE
|
||||||
|
if (includeApprovalInSave && approvalChanged && this.detail.flowId) {
|
||||||
|
const originalProcessTitle = (this.originalEditSnapshot?.processTitle || '').trim()
|
||||||
|
const currentProcessTitle = (currentSnap.processTitle || '').trim()
|
||||||
|
if (originalProcessTitle !== currentProcessTitle) {
|
||||||
|
const updateTitleRequest = {
|
||||||
|
...api.EDIT_APPROVAL_PROCESS_TITLE,
|
||||||
|
params: {
|
||||||
|
flowId: this.detail.flowId,
|
||||||
|
title: currentProcessTitle
|
||||||
|
},
|
||||||
|
disableSuccessMsg: true
|
||||||
|
}
|
||||||
|
// 先调用更新流程主题接口,成功后再调用编辑报告接口
|
||||||
|
await this.$request(updateTitleRequest)
|
||||||
|
.asyncThen(() => {
|
||||||
|
console.log('流程主题更新成功')
|
||||||
|
})
|
||||||
|
.asyncErrorCatch((err) => {
|
||||||
|
console.error('更新流程主题失败:', err)
|
||||||
|
this.$message.error('更新流程主题失败,请重试')
|
||||||
|
throw err
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (needUpdateReportBase) {
|
if (needUpdateReportBase) {
|
||||||
console.log('needUpdateReportBase', needUpdateReportBase)
|
console.log('needUpdateReportBase', needUpdateReportBase)
|
||||||
const request = {
|
const request = {
|
||||||
@ -2575,32 +2661,6 @@ export default {
|
|||||||
padding-right: 10px;
|
padding-right: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.approval-process-title {
|
|
||||||
margin-bottom: 20px;
|
|
||||||
|
|
||||||
.description-label {
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: 600;
|
|
||||||
color: #303133;
|
|
||||||
margin-bottom: 8px;
|
|
||||||
|
|
||||||
.required-mark {
|
|
||||||
color: #f56c6c;
|
|
||||||
margin-left: 4px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.process-title-display {
|
|
||||||
font-size: 14px;
|
|
||||||
color: #303133;
|
|
||||||
padding: 8px 12px;
|
|
||||||
background: #f5f7fa;
|
|
||||||
border-radius: 4px;
|
|
||||||
min-height: 32px;
|
|
||||||
line-height: 32px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.approval-workflow {
|
.approval-workflow {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|||||||
@ -15,7 +15,7 @@
|
|||||||
</div> -->
|
</div> -->
|
||||||
<div class="searched-field">
|
<div class="searched-field">
|
||||||
<span class="fielded-label">标题</span>
|
<span class="fielded-label">标题</span>
|
||||||
<el-input v-model="searchPanelValue.template" placeholder="请输入" />
|
<el-input v-model="searchPanelValue.templateName" placeholder="请输入" />
|
||||||
</div>
|
</div>
|
||||||
<div class="searched-field">
|
<div class="searched-field">
|
||||||
<span class="fielded-label">状态</span>
|
<span class="fielded-label">状态</span>
|
||||||
@ -463,10 +463,10 @@ export default {
|
|||||||
status: ''
|
status: ''
|
||||||
},
|
},
|
||||||
statusOptions: [
|
statusOptions: [
|
||||||
{ id: 'DRAFT', label: '草稿' },
|
{ id: 'DRAFT', label: '草稿',value: 'DRAFT' },
|
||||||
{ id: 'APPROVING', label: '审批中' },
|
{ id: 'APPROVING', label: '审核中',value: 'APPROVING' },
|
||||||
{ id: 'COMPLETE', label: '已完成' },
|
{ id: 'COMPLETE', label: '已完成',value: 'COMPLETE' },
|
||||||
{ id: 'REJECTED', label: '已拒绝' }
|
{ id: 'REJECTED', label: '已拒绝',value: 'REJECTED' }
|
||||||
],
|
],
|
||||||
tableData: [],
|
tableData: [],
|
||||||
pagination: { currentPage: 1, pageSize: 10, total: 0 },
|
pagination: { currentPage: 1, pageSize: 10, total: 0 },
|
||||||
|
|||||||
@ -49,9 +49,9 @@
|
|||||||
<div class="search-field">
|
<div class="search-field">
|
||||||
<span class="field-label">当前状态</span>
|
<span class="field-label">当前状态</span>
|
||||||
<el-select v-model="searchPanelValue.statusDescription" placeholder="请选择" clearable>
|
<el-select v-model="searchPanelValue.statusDescription" placeholder="请选择" clearable>
|
||||||
<el-option label="审批中" value="审批中" />
|
<el-option label="审核中" value="审核中" />
|
||||||
<el-option label="已通过" value="已通过" />
|
<el-option label="已通过" value="已通过" />
|
||||||
<el-option label="已退回" value="已退回" />
|
<el-option label="已拒绝" value="已拒绝" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
<div class="search-actions">
|
<div class="search-actions">
|
||||||
|
|||||||
@ -108,9 +108,9 @@
|
|||||||
>
|
>
|
||||||
查看
|
查看
|
||||||
</a>
|
</a>
|
||||||
<span v-if="row.distributeStatus != '已分发' && hasEngineDataEditPermission()" class="link-separator"></span>
|
<span v-if=" (row.distributeStatus === '未分发' || row.distributeStatus === '部分分发') &&hasEngineDataEditPermission()" class="link-separator"></span>
|
||||||
<a
|
<a
|
||||||
v-if="row.distributeStatus != '已分发' && hasEngineDataEditPermission()"
|
v-if=" (row.distributeStatus === '未分发' || row.distributeStatus === '部分分发') && hasEngineDataEditPermission()"
|
||||||
href="javascript:void(0)"
|
href="javascript:void(0)"
|
||||||
class="el-link el-link--primary"
|
class="el-link el-link--primary"
|
||||||
style="margin-left: 5px;"
|
style="margin-left: 5px;"
|
||||||
@ -392,16 +392,10 @@ export default {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
// 检查是否有 permissionPath 为 "玉柴发动机数据" 且 parameterPer 是编辑的权限
|
// 检查是否有 permissionPath 为 "玉柴发动机数据" 且 parameterPer 是编辑的权限
|
||||||
// parameterPer 可能是数字 2 或字符串 "编辑" 或 "2"
|
|
||||||
return permissionData.some((perm) => {
|
return permissionData.some((perm) => {
|
||||||
const permissionPath = perm.permissionPath || ''
|
const permissionPath = perm.permissionPath || ''
|
||||||
const parameterPer = perm.parameterPer
|
const parameterPer = perm.parameterPer || ''
|
||||||
return (
|
return permissionPath === '玉柴发动机数据' && parameterPer === '编辑'
|
||||||
permissionPath === '玉柴发动机数据' &&
|
|
||||||
(parameterPer === 2 ||
|
|
||||||
parameterPer === '2' ||
|
|
||||||
parameterPer === '编辑')
|
|
||||||
)
|
|
||||||
})
|
})
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error('检查玉柴发动机数据编辑权限失败:', err)
|
console.error('检查玉柴发动机数据编辑权限失败:', err)
|
||||||
|
|||||||
@ -74,6 +74,7 @@
|
|||||||
:responsible-person-id="responsiblePersonId"
|
:responsible-person-id="responsiblePersonId"
|
||||||
:filled-by="filledBy"
|
:filled-by="filledBy"
|
||||||
:flow-id="flowId"
|
:flow-id="flowId"
|
||||||
|
:todo-id="todoId"
|
||||||
:can-resend="canResend"
|
:can-resend="canResend"
|
||||||
:from-todo="fromTodo"
|
:from-todo="fromTodo"
|
||||||
class="engine-detail-wrapper"
|
class="engine-detail-wrapper"
|
||||||
@ -164,6 +165,7 @@ export default {
|
|||||||
versionList: [],
|
versionList: [],
|
||||||
currentDetail: null,
|
currentDetail: null,
|
||||||
flowId: '',
|
flowId: '',
|
||||||
|
todoId: '',
|
||||||
createdById: '',
|
createdById: '',
|
||||||
templateManagementPermissions: [],
|
templateManagementPermissions: [],
|
||||||
currentModel: '',
|
currentModel: '',
|
||||||
@ -377,6 +379,7 @@ export default {
|
|||||||
} else if (isRejectedApprovalMode) {
|
} else if (isRejectedApprovalMode) {
|
||||||
// 如果是"数据拒绝",打开 engineDetail 页面(类似模板拒绝的处理方式)
|
// 如果是"数据拒绝",打开 engineDetail 页面(类似模板拒绝的处理方式)
|
||||||
this.currentEngineDetail = { ...row, flowId: row.documentNo, id: row.modelId }
|
this.currentEngineDetail = { ...row, flowId: row.documentNo, id: row.modelId }
|
||||||
|
this.todoId = row.id
|
||||||
this.flowId = row.documentNo || ''
|
this.flowId = row.documentNo || ''
|
||||||
this.showEngineDetail = true
|
this.showEngineDetail = true
|
||||||
this.canResend = true
|
this.canResend = true
|
||||||
@ -390,7 +393,8 @@ export default {
|
|||||||
return
|
return
|
||||||
} else if (isInApprovalMode) {
|
} else if (isInApprovalMode) {
|
||||||
// 如果是"数据审批",打开审批页面
|
// 如果是"数据审批",打开审批页面
|
||||||
this.currentEngineDetail = { ...row, flowId: row.documentNo, id: row.documentNo }
|
this.currentEngineDetail = { ...row, flowId: row.documentNo, id: row.documentNo, todoId: row.id }
|
||||||
|
this.todoId = row.id
|
||||||
this.showEngineCheck = true
|
this.showEngineCheck = true
|
||||||
this.showEngineDetail = false
|
this.showEngineDetail = false
|
||||||
this.canResend = false
|
this.canResend = false
|
||||||
@ -445,7 +449,8 @@ export default {
|
|||||||
// 如果是"填写发动机参数值",打开非分发模式(查看模式)
|
// 如果是"填写发动机参数值",打开非分发模式(查看模式)
|
||||||
// 如果是"管理员分发责任人",打开分发模式且是分发填写人(显示填写人列,调用UPDATE_PARAM接口)
|
// 如果是"管理员分发责任人",打开分发模式且是分发填写人(显示填写人列,调用UPDATE_PARAM接口)
|
||||||
// 其他情况打开分发模式且是分发责任人
|
// 其他情况打开分发模式且是分发责任人
|
||||||
this.currentEngineDetail = { ...row, id: row.modelId }
|
this.currentEngineDetail = { ...row, id: row.modelId, todoId: row.id }
|
||||||
|
this.todoId = row.id
|
||||||
// 填写发动机参数值:非分发模式(只读),传递 filledBy
|
// 填写发动机参数值:非分发模式(只读),传递 filledBy
|
||||||
this.isDispatchMode = false
|
this.isDispatchMode = false
|
||||||
this.canResend = false
|
this.canResend = false
|
||||||
@ -454,7 +459,8 @@ export default {
|
|||||||
this.flowId = row.documentNo || ''
|
this.flowId = row.documentNo || ''
|
||||||
this.responsiblePersonId = ''
|
this.responsiblePersonId = ''
|
||||||
} else if (isResponsibleDispatchMode) {
|
} else if (isResponsibleDispatchMode) {
|
||||||
this.currentEngineDetail = { ...row, id: row.modelId }
|
this.currentEngineDetail = { ...row, id: row.modelId, todoId: row.id }
|
||||||
|
this.todoId = row.id
|
||||||
// 管理员分发责任人:分发填写人模式(显示填写人列,可编辑),传递 responsiblePersonId
|
// 管理员分发责任人:分发填写人模式(显示填写人列,可编辑),传递 responsiblePersonId
|
||||||
this.isDispatchMode = true
|
this.isDispatchMode = true
|
||||||
this.dispatchType = 'update_param'
|
this.dispatchType = 'update_param'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user