调整ui优化

This commit is contained in:
xueyuan committed 2023-02-13 11:25:20 +08:00
1 parent 3066478cd8
commit 680d5d5c90
6 files changed
+199 -128

No files matched your search

+13 -5
View File
@@ -4,7 +4,7 @@
<span class="jh-input-label">{{ formItem.statement }}</span> <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="班级ID" v-model="formItem.answer"></v-text-field> <v-text-field v-if="formItem.type === 'input'" :rules="validationRules.requireRules" class="jh-v-input" dense single-line filled label="班级ID" v-model="formItem.answer" :readonly="readonly"></v-text-field>
<!-- 单选 --> <!-- 单选 -->
<v-select <v-select
@@ -13,6 +13,7 @@
:items="formItem.optionList" :items="formItem.optionList"
dense single-line filled dense single-line filled
:rules="validationRules.requireRules" :rules="validationRules.requireRules"
:readonly="readonly"
></v-select> ></v-select>
<!-- 多选 --> <!-- 多选 -->
@@ -23,14 +24,15 @@
multiple multiple
dense single-line filled dense single-line filled
:rules="validationRules.requireRules" :rules="validationRules.requireRules"
:readonly="readonly"
></v-select> ></v-select>
<!-- 文本框 --> <!-- 文本框 -->
<v-textarea v-if="formItem.type === 'short'" :rules="validationRules.requireRules" class="jh-v-input" no-resize dense single-line filled label="备注" <v-textarea v-if="formItem.type === 'short'" :rules="validationRules.requireRules" class="jh-v-input" no-resize dense single-line filled label="备注" :readonly="readonly"
v-model="formItem.answer"></v-textarea> v-model="formItem.answer"></v-textarea>
<!-- 时间选择 --> <!-- 时间选择 -->
<v-text-field v-if="formItem.type === 'date'" class="jh-v-input" dense single-line filled readonly @click="openDataPicker" label="出生日期" v-model="formItem.answer" :rules="validationRules.requireRules"></v-text-field> <v-text-field v-if="formItem.type === 'date'" class="jh-v-input" dense single-line filled readonly @click="openDataPicker" label="出生日期" v-model="formItem.answer" :rules="validationRules.requireRules" :readonly="readonly"></v-text-field>
<v-menu v-if="formItem.type === 'date'" class="jh-v-input" :close-on-content-click="false" v-model="isDataPickerShown" :position-x="dataPickerPosition.x" :position-y="dataPickerPosition.y" transition="scale-transition" offset-y min-width="auto"> <v-menu v-if="formItem.type === 'date'" class="jh-v-input" :close-on-content-click="false" v-model="isDataPickerShown" :position-x="dataPickerPosition.x" :position-y="dataPickerPosition.y" transition="scale-transition" offset-y min-width="auto">
<v-date-picker color="green lighten-1" elevation="20" @input="isDataPickerShown = false" v-model="formItem.answer"></v-date-picker> <v-date-picker color="green lighten-1" elevation="20" @input="isDataPickerShown = false" v-model="formItem.answer"></v-date-picker>
</v-menu> </v-menu>
@@ -44,9 +46,15 @@
vuetify: new Vuetify(), vuetify: new Vuetify(),
props: { props: {
formItem: { formItem: {
type: Boolean, type: Object,
default: false, default: () => {
return {}
},
}, },
readonly: {
type: Boolean,
default: false
}
}, },
data() { data() {
return { return {
@@ -1,97 +0,0 @@
<template id="form-item-list-render">
<div>
<v-card v-for="(formItem, index) in formItemList" :key="index" class="ma-2 formItem-item-body" :elevation="hover ? 12 : 2" dense>
<v-list-item>
<v-list-item-content v-if="formItem.component.type === 'singleSelect'">
<v-list-item-title class="formItem-title">{{ index+1 }}、 {{ formItem.component.outline }}</v-list-item-title>
<v-radio-group v-model="formItem.answerData.selected">
<v-radio :disabled="isCorrecting" v-for="(option, optionIndex) in formItem.component.property.selectOptionList" :key="optionIndex" :label="option.value" :value="option.value"></v-radio>
</v-radio-group>
<form-item-action v-if="isCorrecting" :data="formItem.check"></form-item-action>
</v-list-item-content>
<v-list-item-content v-if="formItem.component.type === 'multipleSelect'">
<v-list-item-title class="formItem-title">{{ index+1 }}、 {{ formItem.component.outline }}</v-list-item-title>
<div v-for="(option, optionIndex) in formItem.component.property.selectOptionList" :key="optionIndex">
<v-checkbox :disabled="isCorrecting" style="margin-top: 0px;" v-model="formItem.answerData[option.value]" :label="option.value" hide-details color="red"></v-checkbox>
</div>
<form-item-action v-if="isCorrecting" :data="formItem.check"></form-item-action>
</v-list-item-content>
<v-list-item-content v-if="formItem.component.type === 'textarea'">
<v-list-item-title class="formItem-title">{{ index+1 }}、 {{ formItem.component.outline }}</v-list-item-title>
<v-row>
<v-col cols="12">
<v-textarea :disabled="isCorrecting" outlined placeholder="" v-model="formItem.answerData.answer" :rows="4"/>
</v-col>
</v-row>
<form-item-action v-if="isCorrecting" :data="formItem.check"></form-item-action>
</v-list-item-content>
</v-list-item>
</v-card>
</div>
</template>
<script>
Vue.component("form-item-list-render", {
template: '#form-item-list-render',
vuetify: new Vuetify(),
name: 'form-item-list-render',
props: {
formItemList: {
type: Array,
default: () => {
return []
},
required: true,
},
action: {
type: String,
default: '',
},
},
data: () => ({
}),
computed: {
isCorrecting() {
return this.action === 'correcting'
}
},
watch: {
form: {
deep: true,
}
},
destroyed() {},
watch: {},
async created() {},
methods: {},
})
</script>
<style scoped>
.formItem-title {
white-space: normal;
}
.correct {
border-top: 1px solid #999;
padding-top: 10px;
}
.correct-title-box .successText {
color: rgb(1, 166, 46);
font-weight: bold;
}
.correct-title-box .failText {
color: darkred;
font-weight: bold;
}
.correct-title-box {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
}
</style>
@@ -0,0 +1,165 @@
<template id="form-item-list-review">
<div class="form-item-list-review-container">
<!-- 单选 -->
<template v-if="formItem.component.type === 'singleSelect'">
<span class="jh-input-label">{{ formItem.component.statement
}}</span>
<v-radio-group readonly v-model="formItem.user.answer">
<v-radio v-for="(option, optionIndex) in formItem.component.selectOptionList" :key="optionIndex"
:label="assignmentOptionKey[optionIndex]+': '+option" :value="option"></v-radio>
</v-radio-group>
</template>
<!-- 多选和填空 -->
<template v-if="['fillBlank', 'multipleSelect'].includes(formItem.component.type)">
<span class="jh-input-label" style="white-space:nowrap !important;"
v-if="formItem.component.type === 'fillBlank'">
<template v-for="(blank, blankIndex) in formItem.component.statement" :key="blankIndex">
<span class="fill-blank fill-blank-input" v-if="blank.type === 'input'">{{
formItem.user.answer[blank.id] }}</span>
<span v-else>{{ blank.value }}</span>
</template>
</span>
<span class="jh-input-label" v-else>{{ formItem.component.statement
}}</span>
<template v-if="formItem.component.type === 'multipleSelect'">
<template v-for="(option, optionIndex) in formItem.component.selectOptionList" :key="optionIndex">
<v-checkbox readonly style="margin-top: 0px;" v-model="formItem.user.answer" :value="option"
:label="assignmentOptionKey[optionIndex]+': '+option" hide-details color="red"></v-checkbox>
</template>
</template>
</template>
<!-- 多行文本,问答和markdown -->
<template v-if="['textarea', 'questionAnswer', 'markdown'].includes(formItem.component.type)">
<span class="jh-input-label">{{ formItem.component.statement
}}</span>
<template v-if="formItem.component.type === 'markdown'" cols="12">
<md2html :article-content="formItem.user.answer" @complete="isContentLoading = false"></md2html>
</template>
<template v-else cols="12">
<v-textarea readonly dense filled single-line v-model="formItem.user.answer" :rows="5" auto-grow />
</template>
</template>
<!-- 题目组 -->
<template v-if="formItem.component.type === 'questionGroup'">
<span class="jh-input-label">{{ formItem.component.statement
}}</span>
<md2html :article-content="formItem.component.markdownContent" @complete="isContentLoading = false">
</md2html>
<form-item-list-review :form-item-list="formItem.component.itemList" :review-data="reviewData"
:answer-check="answerCheck" />
</template>
<!-- 纯标题 -->
<v-list-item-content v-if="formItem.component.type === 'displayText'">
<p>{{formItem.component.statement}}</p>
</v-list-item-content>
</v-list-item>
</v-card>
</div>
</template>
<script>
Vue.component("form-item-list-review", {
template: '#form-item-list-review',
vuetify: new Vuetify(),
name: 'form-item-list-review',
props: {
formItem: {
type: Object,
default: () => {
return {};
},
},
reviewData: {
type: Object,
default: () => {
return {};
},
},
answerCheck: {
type: Object,
default: () => {
return {};
},
},
},
data: () => ({
overlay: false,
imgSrc: '',
assignmentOptionKey: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K'],
}),
computed: {
isMobile() {
return window.innerWidth < 500;
}
},
destroyed() { },
watch: {
},
created() {
},
methods: {}
})
</script>
<style scoped>
.form-item-list-review-container {
background-color: unset;
}
.form-item-list-review-container .jh-input-label {
white-space: pre-line;
font-weight: bold;
font-size: 16px !important;
}
.form-item-list-review-container audio {
height: 35px;
}
.form-item-list-review-container .audio-box {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
}
/*.form-item-list-review-container .submit-handle-box {
position: relative;
}
.form-item-list-review-container .submit-handle-box::after {
position: absolute;
width: 1px;
content: '';
background-color: #e0e0e0;
height: 200px;
top: auto;
bottom: auto;
}*/
.student-remark textarea {
color: rgb(0, 172, 37) !important;
}
.fill-blank {
display: inline-block;
}
.fill-blank-input {
padding-left: 10px;
padding-right: 10px;
border-bottom: 2px solid gray;
margin-left: 5px;
margin-right: 5px;
}
.icon-close {
position: fixed; right: 10px; top: 5px; z-index: 50000
}
.icon-download {
position: fixed; right: 50px; top: 5px; z-index: 50000
}
.file-prev-wrap {
overflow: auto; max-width: 80vw; max-height: 90vh;
}
</style>
-4
View File
@@ -91,10 +91,6 @@
<v-col cols="12" sm="12" md="4" v-for="(item, index) in createFormList" :key="index"> <v-col cols="12" sm="12" md="4" v-for="(item, index) in createFormList" :key="index">
<form-item :form-item="item"></form-item> <form-item :form-item="item"></form-item>
</v-col> </v-col>
<v-col cols="12" sm="12" md="4">
<span class="jh-input-label">附件</span>
xxx
</v-col>
<v-col cols="12" sm="12" md="12"> <v-col cols="12" sm="12" md="12">
<span class="jh-input-label">审批流程 - 添加审批人</span> <span class="jh-input-label">审批流程 - 添加审批人</span>
<v-row v-for="node in workflowPersonList"> <v-row v-for="node in workflowPersonList">
+14 -12
View File
@@ -9,7 +9,7 @@
<v-main class="mt-15"> <v-main class="mt-15">
<!-- 头部内容 >>>>>>>>>>>>> --> <!-- 头部内容 >>>>>>>>>>>>> -->
<div class="jh-page-second-bar px-8"> <div class="jh-page-second-bar px-8">
<div class="pt-3 text-h7 font-weight-bold">待办审批 <div class="pt-3 text-h7 font-weight-bold">我的任务
<!-- 帮助页按钮 --> <!-- 帮助页按钮 -->
<v-icon @click="isHelpPageDrawerShown = true" color="success" small>mdi-help-circle-outline</v-icon> <v-icon @click="isHelpPageDrawerShown = true" color="success" small>mdi-help-circle-outline</v-icon>
</div> </div>
@@ -20,16 +20,16 @@
<div class="jh-page-body-container px-8"> <div class="jh-page-body-container px-8">
<!-- 页面内容 >>>>>>>>>>>>> --> <!-- 页面内容 >>>>>>>>>>>>> -->
<v-card class="rounded-lg"> <v-card class="rounded-lg">
<v-row class="ma-0 py-0 px-4"> <v-row class="ma-0 pa-4">
<v-spacer></v-spacer> <v-spacer></v-spacer>
<!--切换状态--> <!--切换状态-->
<v-col cols="12" xs="4" sm="4" md="4" xl="4" class="pl-0 d-flex justify-end"> <v-col cols="12" xs="4" sm="4" md="4" xl="4" class="pa-0 pr-2 d-flex justify-end">
<v-btn-toggle <v-btn-toggle
v-model="workflowType" v-model="workflowType"
borderless borderless
color="success" color="success"
> >
<v-btn value="todo" small> <v-btn value="todo" small class="jh-backend-search-btn">
<v-badge <v-badge
v-if="tableData.length" v-if="tableData.length"
inline inline
@@ -40,7 +40,7 @@
</v-badge> </v-badge>
<span v-else class="">待处理</span> <span v-else class="">待处理</span>
</v-btn> </v-btn>
<v-btn value="history" small> <v-btn value="history" small class="jh-backend-search-btn">
<v-badge <v-badge
v-if="historyData.length" v-if="historyData.length"
inline inline
@@ -54,7 +54,7 @@
</v-btn-toggle> </v-btn-toggle>
</v-col> </v-col>
<!--搜索--> <!--搜索-->
<v-col cols="12" xs="8" sm="4" md="3" xl="2" class="px-0"> <v-col cols="12" xs="8" sm="4" md="3" xl="2" class="pa-0">
<v-text-field v-model="searchInput" color="success" prefix="搜索:" class="jh-v-input" dense filled hide-details <v-text-field v-model="searchInput" color="success" prefix="搜索:" class="jh-v-input" dense filled hide-details
single-line></v-text-field> single-line></v-text-field>
</v-col> </v-col>
@@ -74,21 +74,21 @@
class="jh-fixed-table-height elevation-0 mt-0 mb-xs-4"> class="jh-fixed-table-height elevation-0 mt-0 mb-xs-4">
<template v-slot:item.taskTitle="{ item }"> <template v-slot:item.taskTitle="{ item }">
<span>{{item.taskTitle}}</span> - <span>{{item.taskTitle}}</span>
<span>{{item.taskExplain}}</span>
<span v-if="workflowType != 'todo'"> <span v-if="workflowType != 'todo'">
<v-chip <v-chip
v-if="item.taskHandleDesc === '拒绝'" label outlined v-if="item.taskHandleDesc === '拒绝'"
color="red" color="red"
small small
dark
> >
已{{item.taskHandleDesc}} 已{{item.taskHandleDesc}}
</v-chip> </v-chip>
<v-chip <v-chip
v-else label outlined v-else
color="green" color="green"
small small
dark
> >
已{{item.taskHandleDesc}} 已{{item.taskHandleDesc}}
</v-chip> </v-chip>
@@ -103,6 +103,7 @@
</span> </span>
<span v-else role="button" class="success--text jh-font-size-3 pr-2" <span v-else role="button" class="success--text jh-font-size-3 pr-2"
@click="doUiAction('startUpdateItem', item)"> @click="doUiAction('startUpdateItem', item)">
<v-icon size="14" class="success--text">mdi-text-box-outline</v-icon>
查看 查看
</span> </span>
</template> </template>
@@ -208,6 +209,7 @@
<!-- 加载页面组件 >>>>>>>>>>>>> --> <!-- 加载页面组件 >>>>>>>>>>>>> -->
{% include 'component/taskHistory.html' %} {% include 'component/taskHistory.html' %}
{% include 'common/jianghuJs/fixedTableHeightV4.html' %}
<!-- <<<<<<<<<<<<< 加载页面组件 --> <!-- <<<<<<<<<<<<< 加载页面组件 -->
<script type="module"> <script type="module">
@@ -224,7 +226,7 @@
disabled: true, disabled: true,
}, },
{ {
text: '我的待办', text: '待办、已处理的任务',
disabled: true, disabled: true,
} }
], ],
+7 -10
View File
@@ -19,16 +19,16 @@
<div class="jh-page-body-container px-8"> <div class="jh-page-body-container px-8">
<!-- 页面内容 >>>>>>>>>>>>> --> <!-- 页面内容 >>>>>>>>>>>>> -->
<v-card class="rounded-lg mb-4"> <v-card class="rounded-lg">
<v-row class="ma-0 py-0 px-4"> <v-row class="ma-0 pa-4">
<!--新增按钮--> <!--新增按钮-->
<v-col cols="12" xs="4" sm="4" md="4" xl="4" class="pl-0"> <v-col cols="12" xs="4" sm="4" md="4" xl="4" class="pa-0">
<v-btn color="success" small class="elevation-0 mr-2" <v-btn color="success" small class="elevation-0 mr-2"
@click="doUiAction('jumpToCreateWorkflow')">新增</v-btn> @click="doUiAction('jumpToCreateWorkflow')">新增</v-btn>
</v-col> </v-col>
<v-spacer></v-spacer> <v-spacer></v-spacer>
<!--搜索--> <!--搜索-->
<v-col cols="12" xs="8" sm="4" md="3" xl="2" class="px-0"> <v-col cols="12" xs="8" sm="4" md="3" xl="2" class="pa-0">
<v-text-field v-model="searchInput" color="success" prefix="搜索:" class="jh-v-input" dense filled single-line hide-details></v-text-field> <v-text-field v-model="searchInput" color="success" prefix="搜索:" class="jh-v-input" dense filled single-line hide-details></v-text-field>
</v-col> </v-col>
</v-row> </v-row>
@@ -47,10 +47,10 @@
class="jh-fixed-table-height elevation-0 mt-0 mb-xs-4"> class="jh-fixed-table-height elevation-0 mt-0 mb-xs-4">
<!--表格行操作按钮--> <!--表格行操作按钮-->
<template v-slot:item.action="{ item }"> <template v-slot:item.action="{ item }">
<!-- <span role="button" class="success--text jh-font-size-3 pr-2" <span role="button" class="success--text jh-font-size-3 pr-2"
@click="doUiAction('startCreateWorkflow', item)"> @click="doUiAction('startCreateWorkflow', item)">
<v-icon size="14" class="success--text">mdi-note-edit-outline</v-icon>申请 <v-icon size="14" class="success--text">mdi-note-edit-outline</v-icon>申请
</span> --> </span>
<span role="button" class="success--text jh-font-size-3 pr-2" <span role="button" class="success--text jh-font-size-3 pr-2"
@click="doUiAction('jumpUpdateWorkflow', item)"> @click="doUiAction('jumpUpdateWorkflow', item)">
<v-icon size="14" class="success--text">mdi-note-edit-outline</v-icon>编辑 <v-icon size="14" class="success--text">mdi-note-edit-outline</v-icon>编辑
@@ -91,10 +91,6 @@
<v-col cols="12" sm="12" md="4" v-for="(item, index) in createFormList" :key="index"> <v-col cols="12" sm="12" md="4" v-for="(item, index) in createFormList" :key="index">
<form-item :form-item="item"></form-item> <form-item :form-item="item"></form-item>
</v-col> </v-col>
<v-col cols="12" sm="12" md="4">
<span class="jh-input-label">附件</span>
xxx
</v-col>
<v-col cols="12" sm="12" md="12"> <v-col cols="12" sm="12" md="12">
<span class="jh-input-label">审批流程 - 添加审批人</span> <span class="jh-input-label">审批流程 - 添加审批人</span>
<v-row v-for="node in workflowPersonList"> <v-row v-for="node in workflowPersonList">
@@ -168,6 +164,7 @@
<!-- 加载页面组件 >>>>>>>>>>>>> --> <!-- 加载页面组件 >>>>>>>>>>>>> -->
{% include 'component/formItem.html' %} {% include 'component/formItem.html' %}
{% include 'common/jianghuJs/fixedTableHeightV4.html' %}
<!-- <<<<<<<<<<<<< 加载页面组件 --> <!-- <<<<<<<<<<<<< 加载页面组件 -->
<script type="module"> <script type="module">