|
|
@@ -262,6 +262,13 @@
|
|
|
@callback="onRefreshCallback"
|
|
|
@close="(visible) => (dialogFormVisible = visible)"
|
|
|
/>
|
|
|
+ <ibps-bpmn-formrender-dialog
|
|
|
+ :visible="formrenderVisible"
|
|
|
+ :title="formTitle"
|
|
|
+ :def-id="taskId"
|
|
|
+ @close="(visible) => (formrenderVisible = visible)"
|
|
|
+ @callback="onRefreshCallback"
|
|
|
+ />
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
@@ -296,6 +303,7 @@ import SearchField from './components/search-field'
|
|
|
|
|
|
import DataTemplateFormrenderDialog from '@/business/platform/data/form/dialog'
|
|
|
import IbpsPickerToolbar from '@/components/ibps-picker-toolbar'
|
|
|
+import IbpsBpmnFormrenderDialog from '@/business/platform/bpmn/form/dialog'
|
|
|
|
|
|
export default {
|
|
|
name: 'TemplateList',
|
|
|
@@ -308,7 +316,8 @@ export default {
|
|
|
IbpsMoreSearch,
|
|
|
FieldFormatter,
|
|
|
DataTemplateFormrenderDialog,
|
|
|
- IbpsPickerToolbar
|
|
|
+ IbpsPickerToolbar,
|
|
|
+ IbpsBpmnFormrenderDialog
|
|
|
},
|
|
|
props: {
|
|
|
value: {
|
|
|
@@ -323,6 +332,8 @@ export default {
|
|
|
resetFields: false,
|
|
|
dateFormat: 'yyyy-MM-dd',
|
|
|
searchForms: {},
|
|
|
+ formrenderVisible: false,
|
|
|
+ formTitle: '',
|
|
|
firsthand: [],
|
|
|
params: {},
|
|
|
slotForms: [],
|
|
|
@@ -334,6 +345,7 @@ export default {
|
|
|
fieldsList: [],
|
|
|
display: false,
|
|
|
chooseResult: [],
|
|
|
+ taskId: '',
|
|
|
addDataCont: null,
|
|
|
checkFilter: '',
|
|
|
configKey: '',
|
|
|
@@ -432,7 +444,6 @@ export default {
|
|
|
moreToolbarButtons() {
|
|
|
const arrs = ['add', 'addPlus']
|
|
|
const filterAdd = this.toolbars.filter((t) => !arrs.includes(t.code))
|
|
|
- console.log('filterAdd===>', filterAdd)
|
|
|
return filterAdd.length > 4 ? filterAdd.slice(4, filterAdd.length) : null
|
|
|
},
|
|
|
hasToolbar() {
|
|
|
@@ -445,7 +456,11 @@ export default {
|
|
|
// 判断自定义表示addPlus为添加按钮
|
|
|
const isAddPlus =
|
|
|
button.button_type === 'custom' && button.code === 'addPlus'
|
|
|
- if (button.button_type === 'add' || isAddPlus) {
|
|
|
+ if (
|
|
|
+ button.button_type === 'add' ||
|
|
|
+ button.button_type === 'openTask' ||
|
|
|
+ isAddPlus
|
|
|
+ ) {
|
|
|
return button
|
|
|
}
|
|
|
}
|
|
|
@@ -533,6 +548,7 @@ export default {
|
|
|
}
|
|
|
loadDataTemplateById(id, params)
|
|
|
.then((data) => {
|
|
|
+ console.log('initFormData===>', data)
|
|
|
this.initFormData(data)
|
|
|
})
|
|
|
.catch((e) => {
|
|
|
@@ -541,8 +557,8 @@ export default {
|
|
|
},
|
|
|
initFormData(data) {
|
|
|
this.title = data['name']
|
|
|
+ this.formTitle = data.formTitle
|
|
|
this.dataTemplate = data
|
|
|
- console.log('this.$store---->', JSON.parse(JSON.stringify(data)))
|
|
|
// 初始化脚本
|
|
|
if (!this.isInitialization) {
|
|
|
this.initJTemplate()
|
|
|
@@ -555,7 +571,6 @@ export default {
|
|
|
const template = getDataTemplateListTemplate(data)
|
|
|
this.template = template
|
|
|
this.templateFields = buildDataTemplateFields(data.fields)
|
|
|
- console.log('this.templateFields===>', this.templateFields)
|
|
|
this.buildKey(data, template)
|
|
|
this.loadData()
|
|
|
this.initFilterText()
|
|
|
@@ -1075,6 +1090,11 @@ export default {
|
|
|
case 'custom': // 自定义按钮
|
|
|
// this.gotoForm({})
|
|
|
break
|
|
|
+ case 'openTask': // 自定义按钮
|
|
|
+ // this.gotoForm({})
|
|
|
+ this.taskId = button.deflow
|
|
|
+ this.formrenderVisible = true
|
|
|
+ break
|
|
|
default:
|
|
|
break
|
|
|
}
|
|
|
@@ -1212,7 +1232,7 @@ export default {
|
|
|
// TODO:目前版本支持按钮
|
|
|
// 增加自定义按钮实现
|
|
|
const allowButtons = ['edit', 'detail', 'remove', 'custom']
|
|
|
-
|
|
|
+ console.log('toolbars===>', toolbars)
|
|
|
this.defaultToolbars = toolbars
|
|
|
this.toolbars = toolbars.filter((b) => {
|
|
|
if (
|