|
|
@@ -15,6 +15,7 @@
|
|
|
<!-- {{ form.name }}-->
|
|
|
<!-- </div>-->
|
|
|
<fm-generate-form
|
|
|
+ class="el-form-box"
|
|
|
v-if="Object.keys(form?.formJson || {}).length !== 0"
|
|
|
:data="jsonData"
|
|
|
:value="form.valueJson"
|
|
|
@@ -219,6 +220,8 @@
|
|
|
|
|
|
import { getModel } from '@/api/bpm/model';
|
|
|
import { getProcessDefinitionList } from '@/api/bpm/definition';
|
|
|
+ import { getToken } from '@/utils/token-util';
|
|
|
+ import {mapGetters} from "vuex";
|
|
|
|
|
|
export default {
|
|
|
name: 'processSubmitDialog',
|
|
|
@@ -273,6 +276,9 @@
|
|
|
rules: {}
|
|
|
};
|
|
|
},
|
|
|
+ computed:{
|
|
|
+ ...mapGetters(['user']),
|
|
|
+ },
|
|
|
async created() {
|
|
|
let typeObj = await getProduceTreeByCode(
|
|
|
treeClassifyCodeEnum['PROCESSTYPE']
|
|
|
@@ -320,7 +326,7 @@ this.postOptions.push(...response.data);
|
|
|
},
|
|
|
methods: {
|
|
|
async init(row = {}) {
|
|
|
- this.title = '申请' + row.name + '单';
|
|
|
+ this.title = '新建' + row.name + '单';
|
|
|
this.form = _.cloneDeep(row);
|
|
|
this.form.formId = row.id;
|
|
|
this.$set(this.form, 'noticeScope', []);
|
|
|
@@ -328,7 +334,36 @@ this.postOptions.push(...response.data);
|
|
|
this.$set(this.form, 'FQLC', '');
|
|
|
this.$set(this.form, 'name', '');
|
|
|
this.$set(this.form, 'key', '');
|
|
|
+ this.$set(this.form, 'valueJson', {});
|
|
|
this.jsonData = JSON.parse(this.form.formJson.makingJson);
|
|
|
+ this.jsonData.config.dataSource &&
|
|
|
+ this.jsonData.config.dataSource.forEach((item) => {
|
|
|
+ item.headers = {
|
|
|
+ Authorization: getToken()
|
|
|
+ };
|
|
|
+ // item.url = item.url && item.url.replace('/api', this.APIUrl);
|
|
|
+ });
|
|
|
+ console.log(this.user,'');
|
|
|
+ this.jsonData.list.forEach((item) => {
|
|
|
+ if (item.type == 'deptAndUserCascader') {
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+ if (item.type == 'deptCascader') {
|
|
|
+ this.form.valueJson[item.model] = this.user.info.deptIds
|
|
|
+ }
|
|
|
+ if (item.type == 'userSelect') {
|
|
|
+ this.form.valueJson[item.model] = this.user.info.userId
|
|
|
+ }
|
|
|
+ if (item.type == 'imgupload') {
|
|
|
+ // this.form.valueJson[item.model].length &&
|
|
|
+ // this.form.valueJson[item.model].forEach((item) => {
|
|
|
+ // //item.objectUrl = this.APIUrl +'/kd-aiot' + item.storePath
|
|
|
+ // // item.objectUrl = item.url;
|
|
|
+ // // console.log(item);
|
|
|
+ // });
|
|
|
+ }
|
|
|
+ });
|
|
|
await this.getProcessDefinitionBpmnXMLInfo(this.form.processModelId);
|
|
|
await this.getTaskAssignRuleListInfo({
|
|
|
modelId: this.form.processModelId,
|
|
|
@@ -549,5 +584,12 @@ this.postOptions.push(...response.data);
|
|
|
}
|
|
|
::v-deep .el-dialog {
|
|
|
min-width: 400px;
|
|
|
+ .el-dialog__header {
|
|
|
+ background: #1890ffd6;
|
|
|
+ }
|
|
|
+ .el-dialog__title,
|
|
|
+ .el-dialog__close {
|
|
|
+ color: #ffffff;
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|