feat:暂存1正式出版

This commit is contained in:
大黑 2026-02-02 15:17:19 +08:00
parent 70d91689eb
commit d002e3ff8c
28 changed files with 12735 additions and 3557 deletions

View File

@ -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
View File

@ -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",

View File

@ -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",

View File

@ -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'
} }
} }

View File

@ -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'
} }
} }

View File

@ -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'
} }
} }

View File

@ -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() {

View File

@ -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

View File

@ -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

View File

@ -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>

View File

@ -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)

View File

@ -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 {

View File

@ -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: '',

View File

@ -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'
} }
], ],

View File

@ -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">

View File

@ -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

View File

@ -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: {

View File

@ -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;

View File

@ -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 },

View File

@ -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">

View File

@ -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)

View File

@ -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'