代码清理 && UI调整

This commit is contained in:
ChenXinXin committed 2024-04-30 16:54:56 +08:00
1 parent b64c952d0f
commit c44365e44f
3 files changed
+14 -118

No files matched your search

-108
View File
@@ -1,108 +0,0 @@
<!-- formItem.html >>>>>>>>>>>>> -->
<script type="text/html" id="form-item">
<div>
<span class="jh-input-label">{{ formItem.statement }}</span>
<!-- 文本 -->
<v-text-field
v-if="formItem.type === 'input'"
:rules="validationRules.requireRules"
class="jh-v-input"
dense single-line filled
label=""
v-model="formItem.answer"
:readonly="typeof readonly == 'boolean'? readonly: readonly.indexOf(formItem.id) > -1"
></v-text-field>
<!-- 文本 -->
<v-text-field
v-if="formItem.type === 'textarea'"
:rules="validationRules.requireRules"
class="jh-v-input"
dense single-line filled
label=""
v-model="formItem.answer"
:readonly="typeof readonly == 'boolean'? readonly: readonly.indexOf(formItem.id) > -1"
></v-text-field>
<!-- 单选 -->
<v-select
v-if="formItem.type === 'single'"
v-model="formItem.answer"
:items="formItem.optionList"
dense single-line filled
class="jh-v-input"
:rules="validationRules.requireRules"
:readonly="typeof readonly == 'boolean'? readonly: readonly.indexOf(formItem.id) > -1"
></v-select>
<!-- 多选 -->
<v-select
v-if="formItem.type === 'multiple'"
v-model="formItem.answer"
:items="formItem.optionList"
multiple
dense single-line filled
class="jh-v-input"
:rules="validationRules.requireRules"
:readonly="typeof readonly == 'boolean'? readonly: readonly.indexOf(formItem.id) > -1"
></v-select>
<!-- 文本框 -->
<v-textarea
v-if="formItem.type === 'short'"
:rules="validationRules.requireRules"
class="jh-v-input" no-resize dense single-line filled
label="备注"
v-model="formItem.answer"
:readonly="typeof readonly == 'boolean'? readonly: false"
></v-textarea>
<!-- 时间选择 -->
<v-menu v-if="formItem.type === 'date'" class="jh-v-input" :close-on-content-click="false" v-model="isDataPickerShown"
transition="scale-transition" offset-y min-width="auto">
<template v-slot:activator="{on, attrs}">
<v-text-field class="jh-v-input" dense single-line filled readonly v-on="on" v-bind="attrs" label="出生日期" v-model="formItem.answer"
:rules="validationRules.requireRules" :readonly="readonly"></v-text-field>
</template>
<v-date-picker color="green lighten-1" elevation="20" @input="isDataPickerShown = false" v-model="formItem.answer"></v-date-picker>
</v-menu>
</div>
</script>
<script>
Vue.component('form-item', {
template: "#form-item",
vueComponent: 'form-item',
vuetify: new Vuetify(),
props: {
formItem: {
type: Object,
default: () => {
return {}
},
},
readonly: {
type: [Array, Boolean],
default: false
}
},
data() {
return {
isDataPickerShown: false,
validationRules: {
requireRules: [
v => !!v || 'This is required',
],
},
};
},
created() {
console.log(this.formItem)
},
methods: {},
});
</script>
<style>
</style>
<!-- <<<<<<<<<<<<< formItem.html -->
+11 -7
View File
@@ -91,22 +91,26 @@
<v-form v-if="isViewDrawerShown" ref="updateForm" lazy-validation>
<!-- 抽屉标题 -->
<v-row no-gutters>
<span class="text-h7 font-weight-bold pa-4">历史审核记录</span>
<span class="text-h7 font-weight-bold pa-4">申请信息详情</span>
</v-row>
<v-divider class="jh-divider"></v-divider>
<!--抽屉表单-->
<v-row class="mt-1 px-4" >
<v-col cols="12" sm="12" md="4" class="py-0" v-for="(item, index) in viewItem.taskFormInput.formList" :key="index">
<form-item :form-item="item" readonly></form-item>
<v-row class="my-2 px-4" >
<v-col cols="12" v-for="(formItem, index) in viewItem.taskFormInput" :key="index" class="px-2 py-1 ma-0">
<span class="jh-input-label">{{ index + 1 }}. {{ formItem.statement }}<span v-show="formItem.isRequire" class="red--text ml-1">*</span></span>
<form-component-list :form-item="formItem" :disabled='true' ></form-component-list>
</v-col>
</v-row>
</v-form>
<v-divider class="jh-divider"></v-divider>
<!-- 审核申请信息 -->
<v-row class="mt-8">
<v-row class="mt-4">
<v-col cols="12" sm="12" md="12">
<div class="text-subtitle-2 mb-2 mx-4">审核申请信息</div>
<div class="text-subtitle-2 mb-2 mx-4 font-weight-bold">历史审核记录</div>
<task-history :task-id="viewItem.taskId"></task-history>
</v-col>
</v-row>
@@ -149,7 +153,7 @@
{% block vueScript %}
<!-- 加载页面组件 >>>>>>>>>>>>> -->
{% include 'component/formItem.html' %}
{% include 'component/tpl/formComponentList.html' %}
{% include 'component/taskHistory.html' %}
{% include 'common/jianghuJs/fixedTableHeightV4.html' %}
<!-- <<<<<<<<<<<<< 加载页面组件 -->
+3 -3
View File
@@ -109,7 +109,7 @@
</v-card>
<!-- <<<<<<<<<<<<< 页面内容 -->
<!--编辑抽屉-->
<!--审核抽屉-->
<v-navigation-drawer v-if="isSubmitDrawerShown" v-model="isSubmitDrawerShown" fixed temporary right width="80%" class="elevation-24">
<!-- 抽屉标题 -->
<v-row no-gutters class="align-center justify-end">
@@ -135,7 +135,7 @@
</v-col>
</v-row>
<!-- 抽屉操作按钮 -->
<div class="d-flex justify-end mt-2 mr-4">
<div class="d-flex justify-end my-2 mr-4">
<v-btn :color="lineTypeItem.value === '拒绝' ? 'error' : 'success'" small class="ml-2" v-for="lineTypeItem in lineTypeList" v-if="lineTypeItem.value" @click="doUiAction('submitNode', lineTypeItem.value)">
{{ lineTypeItem.text }}
</v-btn>
@@ -145,7 +145,7 @@
<v-divider class="jh-divider"></v-divider>
<!-- 审核历史 -->
<v-row class="mt-8">
<v-row class="mt-4">
<v-col cols="12" sm="12" md="12">
<div class="text-subtitle-2 mb-2 mx-4 font-weight-bold">审批流程</div>
<task-history :workflow-config="updateItem.taskWorkflow" :task-id="updateItem.taskId" :task-config-id="updateItem.taskConfigId"></task-history>