ui改版提交

This commit is contained in:
case committed 2022-08-01 22:30:38 +08:00
1 parent 1c28ac9431
commit d964dafc8e
20 files changed
+1023 -3836

No files matched your search

@@ -24,7 +24,7 @@
<v-card class="formItemList"> <v-card class="formItemList">
<v-toolbar dense flat> <v-toolbar dense flat>
<v-btn icon @click.stop="emptyCanva"> <v-btn icon @click.stop="emptyCanva" class="ml-2">
<v-icon color="grey lighten-1" dark>mdi-delete-empty</v-icon> <v-icon color="grey lighten-1" dark>mdi-delete-empty</v-icon>
</v-btn> </v-btn>
</v-toolbar> </v-toolbar>
-347
View File
@@ -1,347 +0,0 @@
{% extends 'template/jhTemplate.html'%}
{% block vue_template %}
<jh-layout>
<!-- 页面主要内容 -->
<v-container class="fullScreen d-flex flex-column pa-xs-0 pa-0">
<v-row class="ma-0 pa-xs-4 align-center flex-none pt-0 " :class="{'pa-4': !isMobile, 'pb-0': !isMobile, 'pa-2': isMobile}">
<v-col cols="12" sm="12" md="3" xl="2" class="pa-xs-0 pb-3" :class="{'pb-xs-4': !isMobile}">
<v-text-field v-model="serverSearchInput.studentId" label="学生ID" class="cus-v-input " :class="{'mr-2': !isMobile}" dense outlined></v-text-field>
</v-col>
<v-col cols="12" sm="12" md="3" xl="2" class="pa-xs-0 pb-3" :class="{'pb-xs-4': !isMobile, 'mt-2': isMobile}">
<v-text-field v-model="serverSearchInput.classId" label="班级ID" class="cus-v-input" :class="{'mr-2': !isMobile}" dense outlined></v-text-field>
</v-col>
<v-col :class="{'pb-xs-4': !isMobile, 'pt-2': isMobile, 'pl-0': isMobile}" cols="12" md="2" sm="12" xl="3">
<v-btn
class="elevation-0"
color="success"
dark
@click="refreshTableData"
>
查询
</v-btn>
</v-col>
</v-row>
<v-divider></v-divider>
<v-row class="ma-0 pa-xs-4 align-center flex-none pt-0 " :class="{'pa-4': !isMobile, 'pb-0': !isMobile, 'pa-2': isMobile}">
<v-col cols="12" xs="4" sm="4" md="4" xl="4" class="pl-0">
<v-btn color="success" small dark class="elevation-0 mr-2" @click="doUiAction('startCreateItem', null)">新增</v-btn>
<span class="body-2">共{{ tableData.length }}条记录</span>
</v-col>
<v-spacer></v-spacer>
<v-col cols="12" xs="8" sm="3" md="2" xl="2" class="pa-xs-0 pa-xs-2 col-sm-8-flex pl-0">
<v-select class="cus-v-input mr-2" v-model="currentTableGenderType" :items="[{value: 'all', text: '全部'}, ...constantCollection.gender]"
prefix="性别:" dense item-text="text" item-value="value" dense outlined></v-select>
</v-col>
<v-col cols="12" xs="8" sm="4" md="3" xl="3" class="pa-xs-0 pa-xs-2 col-sm-8-flex">
<v-text-field v-model="searchInput" label="表格过滤" class="cus-v-input" dense outlined></v-text-field>
</v-col>
</v-row>
<v-data-table fixed-header
:headers="headers"
:items="tableData"
:search="searchInput"
:footer-props="{ itemsPerPageOptions: [20, 40, 60, 100, -1] }"
:items-per-page="20"
mobile-breakpoint="0"
:loading="isTableLoading"
checkbox-color="success"
class="elevation-0 mt-0 mb-xs-4 flex-fill d-flex flex-column">
<template v-slot:item.gender="{ item }">
{{ getConstantCollectionItemText('gender', item.gender) }}
</template>
<template v-slot:item.level="{ item }">
{{ getConstantCollectionItemText('level', item.level) }}
</template>
<template v-slot:item.action="{ item }">
<v-btn small class="mr-2 success" @click="doUiAction('startUpdateItem', item)">
修改
</v-btn>
<v-btn small class="mr-2 error" @click="doUiAction('deleteItem', item)">
删除
</v-btn>
</template>
</v-data-table>
</v-container>
<!-- 编辑抽屉 -->
<v-navigation-drawer v-model="isEditDrawerShow" absolute temporary right width="80%" hide-overlay
class="elevation-24">
<v-form v-model="isFormValid" v-if="isEditDrawerShow" ref="form" lazy-validation>
<v-row>
<span class="title pa-6">{{ editItem.id ? "修改" : "新增" }}信息</span>
<v-spacer></v-spacer>
<v-btn class="mt-7 mr-8 elevation-0" fab x-small @click="isEditDrawerShow = false">
<v-icon dark>mdi-close</v-icon>
</v-btn>
</v-row>
<v-row class="pa-0 ma-0 pa-xs-4 pb-xs-4 flex-none">
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="学生ID" v-model="editItem.studentId" :rules="requireRules"></v-text-field>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-select class="cus-v-input mr-2" dense outlined clearable label="班级ID" v-model="editItem.classId" :items="constantCollection.classId"></v-select>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="学生名字" v-model="editItem.name"></v-text-field>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-select class="cus-v-input mr-2" dense outlined clearable label="年级" v-model="editItem.level" :items="constantCollection.level"></v-select>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-select class="cus-v-input mr-2" dense outlined clearable label="性别" v-model="editItem.gender" :items="constantCollection.gender"></v-select>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-menu class="cus-v-input mr-2" offset-y max-width="290">
<template v-slot:activator="{ on, attrs }">
<v-text-field class="cus-v-input mr-2" dense outlined v-on="on" label="出生日期" v-model="editItem.dateOfBirth"></v-text-field>
</template>
<v-date-picker color="success" elevation="20" v-model="editItem.dateOfBirth"></v-date-picker>
</v-menu>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="身高" v-model="editItem.bodyHeight"></v-text-field>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-select class="cus-v-input mr-2" dense outlined clearable label="学生状态" v-model="editItem.studentStatus" :items="constantCollection.studentStatus"></v-select>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="备注" v-model="editItem.remarks"></v-text-field>
</v-col>
</v-row>
<v-row class="justify-end pr-6">
<v-btn color="success" small @click="doUiAction(dialogSaveInfoAction)" :style="{width: isMobile ? 'calc(100% - 45px)' : '200px'}" :class="{'mb-2': isMobile, 'mr-4': isMobile}">保存</v-btn>
<v-btn class="ml-2" small @click="isEditDrawerShow = false" :style="{width: isMobile ? 'calc(100% - 45px)' : '200px'}" :class="{'mr-4': isMobile}">取消</v-btn>
</v-row>
</v-form>
</v-navigation-drawer>
</jh-layout>
{% endblock %}
{% block vue_body %}
<script type="module">
window.registerData({
// 表格相关数据
isFormValid: true,
requireRules: [
v => !!v || 'This is required',
],
constantCollection: {
gender: [{"value": "male", "text": "男"}, {"value": "female", "text": "女"}],
classId: [
{"value": "2021-01级-01班", "text": "2021-01级-01班"}, {"value": "2021-01级-02班", "text": "2021-01级-02班"},
{"value": "2021-02级-01班", "text": "2021-02级-01班"}, {"value": "2021-02级-02班", "text": "2021-02级-02班"},
{"value": "2021-03级-01班", "text": "2021-03级-01班"}, {"value": "2021-03级-02班", "text": "2021-03级-02班"}
],
level: [{"value": "01", "text": "一年级"}, {"value": "02", "text": "二年级"}, {"value": "03", "text": "三年级"}],
icType: [{"value": "身份证", "text": "身份证"}, {"value": "护照", "text": "护照"}],
enrollmentType: [{"value": "正常升学", "text": "正常升学"}, {"value": "借读", "text": "借读"}],
studentStatus: [{"value": "正常", "text": "正常"}, {"value": "退学", "text": "退学"}]
},
serverSearchInput: {
studentId: null,
classId: null
},
currentTableGenderType: 'all',
isEditDrawerShow: false,
searchInput: null,
isTableLoading: true,
tableDataFromBackend: [],
headers: [
{text: "学生ID", value: "studentId", width: 120, class: 'fixed', cellClass: 'fixed'},
{text: "班级ID", value: "classId", width: 140},
{text: "学生名字", value: "name", width: 120},
{text: "年级", value: "level", width: 120},
{text: "性别", value: "gender", width: 120},
{text: "出生日期", value: "dateOfBirth", width: 120},
{text: "身高", value: "bodyHeight", width: 120},
{text: "学生状态", value: "studentStatus", width: 120},
{text: "备注", value: "remarks", width: 120},
{text: "操作者", value: "operationByUser", width: 120},
{text: "操作时间", value: "operationAt", width: 250},
{text: '操作', value: 'action', align: 'center', sortable: false, width: 200, class: 'fixed', cellClass: 'fixed'},
],
editItem: {},
dialogSaveInfoAction: ''
})
</script>
{% include 'layout/jhLayout.html' %}
{% include 'common/resetTableMaxHeight.html' %}
<script type="module">
new Vue({
el: '#app',
template: '#app-template',
vueComponent: 'page',
vuetify: new Vuetify(),
mixins: [window.jianghuUiActionMixins],
data: () => window.vueData,
computed: {
isMobile() {
return window.innerWidth < 600;
},
tableData() {
if (!this.currentTableGenderType || this.currentTableGenderType === 'all') {
return this.tableDataFromBackend;
}
return this.tableDataFromBackend.filter(({gender}) => gender === this.currentTableGenderType);
},
computedEditItem() {
return this.editItem;
},
},
watch: {},
async created() {
},
mounted() {
this.doUiAction('refreshTableData');
},
methods: {
/**
* 获取表格数据
*/
async refreshTableData() {
this.isTableLoading = true;
const serverSearchInput = _.pickBy(this.serverSearchInput, value=> !!value);
const { data: { appData: { rows } } } = await window.jianghuAxios({
data: {
appData: {
pageId: 'backendSearchDemo',
actionId: 'selectItemList',
actionData: {},
where: {},
whereLike: serverSearchInput,
orderBy: [{column: 'operationAt', order: 'desc'}]
}
}
});
await window.jianghuAxios({
data: {
appData: {
pageId: 'allPage',
actionId: 'getConstantList',
actionData: {},
where: {},
}
}
})
this.tableDataFromBackend = rows;
this.isTableLoading = false;
},
async clearItemData() {
this.editItem = {};
},
// validate
prepareValidate() {
return this.$refs.form.validate();
},
async openCreateDialog() {
this.isEditDrawerShow = true;
this.dialogSaveInfoAction = 'createItem';
},
async confirmCreateItemDialog() {
return window.confirmDialog({ title: '新增', content: '确定新增吗?'})
},
async doCreateItem() {
delete this.computedEditItem.id;
await window.vtoast.loading("新增学生");
await window.jianghuAxios({
data: {
appData: {
pageId: 'backendSearchDemo',
actionId: 'insertItem',
actionData: this.computedEditItem
}
}
})
await window.vtoast.success("新增学生成功");
},
async closeDrawerShow() {
this.isEditDrawerShow = false;
},
async prepareItemData(item) {
this.editItem = {...item};
},
async openUpdateDialog() {
this.isEditDrawerShow = true;
this.dialogSaveInfoAction = 'updateItem';
},
async confirmUpdateItemDialog() {
return window.confirmDialog({ title: '修改', content: '确定修改吗?'});
},
async doUpdateItem() {
const id = this.computedEditItem.id;
delete this.computedEditItem.id;
await window.vtoast.loading("修改学生");
await window.jianghuAxios({
data: {
appData: {
pageId: 'backendSearchDemo',
actionId: 'updateItem',
actionData: this.computedEditItem,
where: {id: id}
}
}
})
await window.vtoast.success("修改学生成功");
this.isEditDrawerShow = false;
},
async confirmDeleteItemDialog() {
return window.confirmDialog({ title: '删除', content: '确定删除吗?'});
},
async doDeleteItem() {
const { id } = this.computedEditItem;
await window.vtoast.loading("删除学生");
await window.jianghuAxios({
data: {
appData: {
pageId: 'backendSearchDemo',
actionId: 'deleteItem',
actionData: {},
where: { id: id }
}
}
});
await window.vtoast.success("删除学生成功");
},
getConstantCollectionItemText(key, _value) {
const constantCollectionItemFind = this.constantCollection[key].find(({value}) => value === _value);
if(constantCollectionItemFind) {
return constantCollectionItemFind.text;
}
return _value;
}
}
})
</script>
<style scoped>
</style>
{% endblock %}
-360
View File
@@ -1,360 +0,0 @@
{% extends 'template/jhTemplate.html'%}
{% block vue_template %}
<jh-layout>
<!-- 页面主要内容 -->
<v-container class="fullScreen d-flex flex-column pa-xs-0 pa-0">
<div>
<span class="red">备注: 需要为当前用户创建一条学生数据, 用户只能看到自己所在班级的数据。</span>
</div>
<v-row class="ma-0 pa-xs-4 align-center flex-none pt-0 " :class="{'pa-4': !isMobile, 'pb-0': !isMobile, 'pa-2': isMobile}">
<v-col cols="12" xs="4" sm="4" md="4" xl="4" class="pl-0">
<v-btn color="success" small dark class="elevation-0 mr-2" @click="doUiAction('startCreateItem', null)">新增</v-btn>
<span class="body-2">共{{ tableData.length }}条记录</span>
</v-col>
<v-spacer></v-spacer>
<v-select style="max-width: 200px;" class="cus-v-input mr-2" v-model="currentTableGenderType" :items="[{value: 'all', text: '全部'}, ...constantCollection.gender]"
prefix="性别:" dense item-text="text" item-value="value" dense outlined></v-select>
<v-text-field style="max-width: 200px;" v-model="searchInput" label="表格过滤" class="cus-v-input" dense outlined></v-text-field>
</v-row>
<v-data-table fixed-header
:headers="headers"
:items="tableData"
:search="searchInput"
:footer-props="{ itemsPerPageOptions: [20, 40, 60, 100, -1] }"
:items-per-page="20"
mobile-breakpoint="0"
:loading="isTableLoading"
checkbox-color="success"
class="elevation-0 mt-0 mb-xs-4 flex-fill d-flex flex-column">
<template v-slot:item.gender="{ item }">
{{ getConstantCollectionItemText('gender', item.gender) }}
</template>
<template v-slot:item.level="{ item }">
{{ getConstantCollectionItemText('level', item.level) }}
</template>
<template v-slot:item.action="{ item }">
<v-btn small class="mr-2 success" @click="doUiAction('startUpdateItem', item)">
修改
</v-btn>
<v-btn small class="mr-2 error" @click="doUiAction('deleteItem', item)">
删除
</v-btn>
</template>
</v-data-table>
</v-container>
<!-- 编辑抽屉 -->
<v-navigation-drawer v-model="isEditDrawerShow" absolute temporary right width="80%" hide-overlay
class="elevation-24">
<v-form v-model="isFormValid" ref="form" lazy-validation>
<v-row>
<span class="title pa-6">{{ currentClickButton.title }}信息</span>
<v-spacer></v-spacer>
<v-btn class="mt-7 mr-8 elevation-0" fab x-small @click="isEditDrawerShow = false">
<v-icon dark>mdi-close</v-icon>
</v-btn>
</v-row>
<v-row class="pa-0 ma-0 pa-xs-4 pb-xs-4 flex-none">
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="学生ID" v-model="editItem.studentId" :rules="requireRules"></v-text-field>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-select class="cus-v-input mr-2" dense outlined clearable label="班级ID" v-model="editItem.classId" :items="constantCollection.classId"></v-select>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="学生名字" v-model="editItem.name"></v-text-field>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-select class="cus-v-input mr-2" dense outlined clearable label="年级" v-model="editItem.level" :items="constantCollection.level"></v-select>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-select class="cus-v-input mr-2" dense outlined clearable label="性别" v-model="editItem.gender" :items="constantCollection.gender"></v-select>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-menu class="cus-v-input mr-2" offset-y max-width="290">
<template v-slot:activator="{ on, attrs }">
<v-text-field class="cus-v-input mr-2" dense outlined v-on="on" label="出生日期" v-model="editItem.dateOfBirth"></v-text-field>
</template>
<v-date-picker color="success" elevation="20" v-model="editItem.dateOfBirth"></v-date-picker>
</v-menu>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="身高" v-model="editItem.bodyHeight"></v-text-field>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-select class="cus-v-input mr-2" dense outlined clearable label="学生状态" v-model="editItem.studentStatus" :items="constantCollection.studentStatus"></v-select>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="备注" v-model="editItem.remarks"></v-text-field>
</v-col>
</v-row>
<v-row class="justify-end pr-6">
<v-btn color="success" small @click="doUiAction(dialogSaveInfoAction)" :style="{width: isMobile ? 'calc(100% - 45px)' : '200px'}" :class="{'mb-2': isMobile, 'mr-4': isMobile}">保存</v-btn>
<v-btn class="ml-2" small @click="isEditDrawerShow = false" :style="{width: isMobile ? 'calc(100% - 45px)' : '200px'}" :class="{'mr-4': isMobile}">取消</v-btn>
</v-row>
</v-form>
</v-navigation-drawer>
</jh-layout>
{% endblock %}
{% block vue_body %}
<script type="module">
window.registerData({
// 表格相关数据
isFormValid: true,
requireRules: [
v => !!v || 'This is required',
],
constantCollection: {
gender: [{"value": "male", "text": "男"}, {"value": "female", "text": "女"}],
classId: [
{"value": "2021-01级-01班", "text": "2021-01级-01班"}, {"value": "2021-01级-02班", "text": "2021-01级-02班"},
{"value": "2021-02级-01班", "text": "2021-02级-01班"}, {"value": "2021-02级-02班", "text": "2021-02级-02班"},
{"value": "2021-03级-01班", "text": "2021-03级-01班"}, {"value": "2021-03级-02班", "text": "2021-03级-02班"}
],
level: [{"value": "01", "text": "一年级"}, {"value": "02", "text": "二年级"}, {"value": "03", "text": "三年级"}],
icType: [{"value": "身份证", "text": "身份证"}, {"value": "护照", "text": "护照"}],
enrollmentType: [{"value": "正常升学", "text": "正常升学"}, {"value": "借读", "text": "借读"}],
studentStatus: [{"value": "正常", "text": "正常"}, {"value": "退学", "text": "退学"}]
},
currentTableGenderType: 'all',
isEditDrawerShow: false,
searchInput: null,
isTableLoading: true,
tableDataFromBackend: [],
headers: [
{text: "学生ID", value: "studentId", type: "input", width: 120, class: 'fixed', cellClass: 'fixed'},
{text: "班级ID", value: "classId", type: "select", width: 140},
{text: "学生名字", value: "name", type: "input", width: 120},
{text: "年级", value: "level", type: "select", width: 120},
{text: "性别", value: "gender", type: "select", width: 120},
{text: "出生日期", value: "dateOfBirth", type: "date", width: 120},
{text: "身高", value: "bodyHeight", type: "input", width: 120},
{text: "学生状态", value: "studentStatus", type: "select", width: 120},
{text: "备注", value: "remarks", type: "textarea", width: 120},
{text: "操作者", value: "operationByUser", type: "input", width: 120},
{text: "操作时间", value: "operationAt", type: "input", width: 250},
{text: '操作', value: 'action', type: 'button', align: 'center', sortable: false, width: 200, class: 'fixed', cellClass: 'fixed'},
],
currentClickButton: {title: '新增', action: 'add'},
editItem: {},
dialogSaveInfoAction: ''
})
</script>
{% include 'layout/jhLayout.html' %}
{% include 'common/resetTableMaxHeight.html' %}
<script type="module">
new Vue({
el: '#app',
template: '#app-template',
vueComponent: 'page',
vuetify: new Vuetify(),
mixins: [window.jianghuUiActionMixins],
data: () => ({
// 表格相关数据
isFormValid: true,
requireRules: [
v => !!v || 'This is required',
],
constantCollection: {
gender: [{"value": "male", "text": "男"}, {"value": "female", "text": "女"}],
classId: [
{"value": "2021-01级-01班", "text": "2021-01级-01班"}, {"value": "2021-01级-02班", "text": "2021-01级-02班"},
{"value": "2021-02级-01班", "text": "2021-02级-01班"}, {"value": "2021-02级-02班", "text": "2021-02级-02班"},
{"value": "2021-03级-01班", "text": "2021-03级-01班"}, {"value": "2021-03级-02班", "text": "2021-03级-02班"}
],
level: [{"value": "01", "text": "一年级"}, {"value": "02", "text": "二年级"}, {"value": "03", "text": "三年级"}],
icType: [{"value": "身份证", "text": "身份证"}, {"value": "护照", "text": "护照"}],
enrollmentType: [{"value": "正常升学", "text": "正常升学"}, {"value": "借读", "text": "借读"}],
studentStatus: [{"value": "正常", "text": "正常"}, {"value": "退学", "text": "退学"}]
},
currentTableGenderType: 'all',
isEditDrawerShow: false,
searchInput: null,
isTableLoading: true,
tableDataFromBackend: [],
headers: [
{text: "学生ID", value: "studentId", type: "input", width: 120, class: 'fixed', cellClass: 'fixed'},
{text: "班级ID", value: "classId", type: "select", width: 140},
{text: "学生名字", value: "name", type: "input", width: 120},
{text: "年级", value: "level", type: "select", width: 120},
{text: "性别", value: "gender", type: "select", width: 120},
{text: "出生日期", value: "dateOfBirth", type: "date", width: 120},
{text: "身高", value: "bodyHeight", type: "input", width: 120},
{text: "学生状态", value: "studentStatus", type: "select", width: 120},
{text: "备注", value: "remarks", type: "textarea", width: 120},
{text: "操作者", value: "operationByUser", type: "input", width: 120},
{text: "操作时间", value: "operationAt", type: "input", width: 250},
{text: '操作', value: 'action', type: 'button', align: 'center', sortable: false, width: 200, class: 'fixed', cellClass: 'fixed'},
],
currentClickButton: {title: '新增', action: 'add'},
editItem: {},
tableButtonList: [
{text: '修改', buttonType: 'edit', color: 'success',},
{text: '删除', buttonType: 'delete', color: 'error',},
],
}),
computed: {
isMobile() {
return window.innerWidth < 600;
},
tableData() {
if (!this.currentTableGenderType || this.currentTableGenderType === 'all') {
return this.tableDataFromBackend;
}
return this.tableDataFromBackend.filter(({gender}) => gender === this.currentTableGenderType);
},
computedEditItem() {
return this.editItem;
},
},
watch: {},
async created() {
},
mounted() {
this.doUiAction('refreshTableData');
},
methods: {
/**
* 获取表格数据
*/
async refreshTableData() {
this.isTableLoading = true;
const result = await window.jianghuAxios({
data: {
appData: {
pageId: 'dataAccessRight',
actionId: 'selectItemListByDynamicData',// 'selectItemListByService', 'selectItemListBySql'
actionData: {},
where: {},
orderBy: [{column: 'operationAt', order: 'desc'}]
}
}
});
this.tableDataFromBackend = result.data.appData.rows;
this.isTableLoading = false;
},
async clearItemData() {
this.editItem = {};
},
async openCreateDialog() {
this.currentClickButton = {action: 'add', title: '新增'};
this.isEditDrawerShow = true;
this.dialogSaveInfoAction = 'createItem';
},
// validate
prepareValidate() {
return this.$refs.form.validate();
},
async confirmCreateItemDialog() {
return window.confirmDialog({ title: '新增', content: '确定新增吗?'});
},
/**
* 新增学生
*/
async doCreateItem() {
delete this.computedEditItem.id;
await window.vtoast.loading("新增学生");
await window.jianghuAxios({
data: {
appData: {
pageId: 'dataAccessRight',
actionId: 'insertItem',
actionData: this.computedEditItem
}
}
})
await window.vtoast.success("新增学生成功");
this.isEditDrawerShow = false;
},
async closeDrawerShow() {
this.isEditDrawerShow = false;
},
async prepareItemData(item) {
this.editItem = {...item};
},
async openUpdateDialog() {
this.currentClickButton = {action: 'edit', title: '修改'};
this.isEditDrawerShow = true;
this.dialogSaveInfoAction = 'updateItem';
},
async confirmUpdateItemDialog() {
return window.confirmDialog({ title: '修改', content: '确定修改吗?'});
},
/**
* 保存学生
*/
async doUpdateItem() {
const id = this.computedEditItem.id;
delete this.computedEditItem.id;
await window.vtoast.loading("修改学生");
await window.jianghuAxios({
data: {
appData: {
pageId: 'dataAccessRight',
actionId: 'updateItem',
actionData: this.computedEditItem,
where: {id: id}
}
}
})
await window.vtoast.success("修改学生成功");
this.isEditDrawerShow = false;
},
async confirmDeleteItemDialog() {
return window.confirmDialog({ title: '删除', content: '确定删除吗?'});
},
async doDeleteItem() {
const { id } = this.computedEditItem;
await window.vtoast.loading("删除学生");
await window.jianghuAxios({
data: {
appData: {
pageId: 'backendSearchDemo',
actionId: 'deleteItem',
actionData: {},
where: { id: id }
}
}
});
await window.vtoast.success("删除学生成功");
},
getConstantCollectionItemText(key, _value) {
const constantCollectionItemFind = this.constantCollection[key].find(({value}) => value === _value);
if(constantCollectionItemFind) {
return constantCollectionItemFind.text;
}
return _value;
}
}
})
</script>
<style scoped>
</style>
{% endblock %}
-358
View File
@@ -1,358 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>江湖演示-初级</title>
<meta charset="utf-8" name="viewport"
content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"/>
<link href="/xianfeng-v1/public/css/global.css" rel="stylesheet">
<link href="/xianfeng-v1/public/css/materialdesignicons.min.css" rel="stylesheet">
<link href="/xianfeng-v1/public/css/vuetify.min.css" rel="stylesheet">
<link href="/xianfeng-v1/public/css/vuetify.custom.css" rel="stylesheet">
<script src="/xianfeng-v1/public/js/lib/axios.min.js"></script>
<script src="/xianfeng-v1/public/js/lib/vue.js"></script>
<script src="/xianfeng-v1/public/js/lib/vuetify.min.js"></script>
</head>
<body>
<div id="app">
<v-app>
<!-- 菜单栏 -->
<v-app-bar
app
color="secondary"
clipped-left
dark
height="55"
flat
>
<v-toolbar-title class="mr-4 align-center" style="font-size: 14px">
<span class="title" style="font-size: 1rem!important;">江湖演示-初级</span>
</v-toolbar-title>
<v-tabs
v-model="menuSelectedIndex"
show-arrows
slider-size="5"
style="max-width: calc(100vw - 280px)"
>
<v-tabs-slider color="success"></v-tabs-slider>
<template v-for="item in inMenuList">
<v-tab
class="pl-3 pr-3"
:key="item.path"
@click="jump({ path: item.path })"
>
{{ item.title }}
</v-tab>
</template>
</v-tabs>
<v-spacer/>
<!--
<div style="white-space: nowrap">
<v-btn disabled text class="ml-1 text-none" style="color: #ffffff!important;">
admin
</v-btn>
<v-btn icon small class="ml-1">
<v-icon>mdi-account-circle</v-icon>
</v-btn>
</div>
-->
</v-app-bar>
<v-main>
<!-- 页面主要内容 -->
<v-container class="fullScreen d-flex flex-column pa-xs-0 pa-0">
<v-row class="ma-0 pa-xs-4 align-center flex-none pt-0 " :class="{'pa-4': !isMobile, 'pb-0': !isMobile, 'pa-2': isMobile}">
<v-col cols="12" xs="4" sm="4" md="4" xl="4" class="pl-0">
<v-btn color="success" small dark class="elevation-0 mr-2" @click="openEditDialog({ item: {} })">新增</v-btn>
<span class="body-2">共{{ tableData.length }}条记录</span>
</v-col>
<v-spacer></v-spacer>
<v-col cols="12" xs="8" sm="3" md="2" xl="2" class="pa-xs-0 pa-xs-2 col-sm-8-flex pl-0">
<v-select class="cus-v-input mr-2" v-model="currentTableGenderType" :items="[{value: 'all', text: '全部'}, ...constantCollection.gender]"
prefix="性别:" dense item-text="text" item-value="value" dense outlined></v-select>
</v-col>
<v-col cols="12" xs="8" sm="4" md="3" xl="3" class="pa-xs-0 pa-xs-2 col-sm-8-flex">
<v-text-field v-model="searchInput" label="表格过滤" class="cus-v-input" dense outlined></v-text-field>
</v-col>
</v-row>
<v-data-table fixed-header
:headers="headers"
:items="tableData"
:search="searchInput"
:footer-props="{ itemsPerPageOptions: [20, 40, 60, 100, -1] }"
:items-per-page="20"
mobile-breakpoint="0"
:loading="isTableLoading"
checkbox-color="success"
class="elevation-0 mt-0 mb-xs-4 flex-fill d-flex flex-column">
<template v-slot:item.action="{ item }">
<v-btn small class="mr-2 success" @click="openEditDialog({ item })">
修改
</v-btn>
<v-btn small class="mr-2 error" @click="deleteStudent({ item })">
删除
</v-btn>
</template>
</v-data-table>
</v-container>
<!-- 编辑抽屉 -->
<v-navigation-drawer v-model="isEditDrawerShow" absolute temporary right width="80%" hide-overlay
class="elevation-24">
<v-form v-model="isFormValid" v-if="isEditDrawerShow" ref="form" lazy-validation>
<v-row>
<span class="title pa-6">{{ currentClickButton.title }}信息</span>
<v-spacer></v-spacer>
<v-btn class="mt-7 mr-8 elevation-0" fab x-small @click="isEditDrawerShow = false">
<v-icon dark>mdi-close</v-icon>
</v-btn>
</v-row>
<v-row class="pa-0 ma-0 pa-xs-4 pb-xs-4 flex-none">
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="学生ID" v-model="editItem.studentId" :rules="requireRules"></v-text-field>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-select class="cus-v-input mr-2" dense outlined clearable label="班级ID" v-model="editItem.classId" :items="constantCollection.classId"></v-select>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="学生名字" v-model="editItem.name"></v-text-field>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-select class="cus-v-input mr-2" dense outlined clearable label="年级" v-model="editItem.level" :items="constantCollection.level"></v-select>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-select class="cus-v-input mr-2" dense outlined clearable label="性别" v-model="editItem.gender" :items="constantCollection.gender"></v-select>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-menu class="cus-v-input mr-2" offset-y max-width="290">
<template v-slot:activator="{ on, attrs }">
<v-text-field class="cus-v-input mr-2" dense outlined v-on="on" label="出生日期" v-model="editItem.dateOfBirth"></v-text-field>
</template>
<v-date-picker color="success" elevation="20" v-model="editItem.dateOfBirth"></v-date-picker>
</v-menu>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="身高" v-model="editItem.bodyHeight"></v-text-field>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-select class="cus-v-input mr-2" dense outlined clearable label="学生状态" v-model="editItem.studentStatus" :items="constantCollection.studentStatus"></v-select>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="备注" v-model="editItem.remarks"></v-text-field>
</v-col>
</v-row>
<v-row class="justify-end pr-6">
<v-btn v-if="editItem.id" color="success" small @click="updateStudent" :style="{width: isMobile ? 'calc(100% - 45px)' : '200px'}" :class="{'mb-2': isMobile, 'mr-4': isMobile}">修改</v-btn>
<v-btn v-if="!editItem.id" color="success" small @click="insertStudent" :style="{width: isMobile ? 'calc(100% - 45px)' : '200px'}" :class="{'mb-2': isMobile, 'mr-4': isMobile}">创建</v-btn>
<v-btn class="ml-2" small @click="isEditDrawerShow = false" :style="{width: isMobile ? 'calc(100% - 45px)' : '200px'}" :class="{'mr-4': isMobile}">取消</v-btn>
</v-row>
</v-form>
</v-navigation-drawer>
</v-main>
</v-app>
</div>
<script>
new Vue({
el: '#app',
vuetify: new Vuetify(),
data: {
// 菜单相关数据
menuSelectedIndex: 1,
inMenuList: [
{
"path": `/xianfeng-v1/page/manual`,
"title": "操作手册",
},
{
"path": `/xianfeng-v1/page/frontendDemo01`,
"title": "前端对接-学习",
}
],
// 表格相关数据
isFormValid: true,
requireRules: [
v => !!v || 'This is required',
],
constantCollection: {
gender: [{"value": "male", "text": "男"}, {"value": "female", "text": "女"}],
classId: [
{"value": "2021-01级-01班", "text": "2021-01级-01班"}, {"value": "2021-01级-02班", "text": "2021-01级-02班"},
{"value": "2021-02级-01班", "text": "2021-02级-01班"}, {"value": "2021-02级-02班", "text": "2021-02级-02班"},
{"value": "2021-03级-01班", "text": "2021-03级-01班"}, {"value": "2021-03级-02班", "text": "2021-03级-02班"}
],
level: [{"value": "01", "text": "一年级"}, {"value": "02", "text": "二年级"}, {"value": "03", "text": "三年级"}],
icType: [{"value": "身份证", "text": "身份证"}, {"value": "护照", "text": "护照"}],
enrollmentType: [{"value": "正常升学", "text": "正常升学"}, {"value": "借读", "text": "借读"}],
studentStatus: [{"value": "正常", "text": "正常"}, {"value": "退学", "text": "退学"}]
},
currentTableGenderType: 'all',
isEditDrawerShow: false,
searchInput: null,
isTableLoading: true,
tableDataFromBackend: [],
headers: [
{text: "学生ID", value: "studentId", width: 120, class: 'fixed', cellClass: 'fixed'},
{text: "班级ID", value: "classId", width: 140},
{text: "学生名字", value: "name", width: 120},
{text: "年级", value: "level", width: 120},
{text: "性别", value: "gender", width: 120},
{text: "出生日期", value: "dateOfBirth", width: 120},
{text: "身高", value: "bodyHeight", width: 120},
{text: "学生状态", value: "studentStatus", width: 120},
{text: "备注", value: "remarks", width: 120},
{text: "操作者", value: "operationByUser", width: 120},
{text: "操作时间", value: "operationAt", width: 250},
{text: '操作', value: 'action', align: 'center', sortable: false, width: 200, class: 'fixed', cellClass: 'fixed'},
],
currentClickButton: {title: '新增', action: 'add'},
editItem: {},
tableButtonList: [
{text: '修改', buttonType: 'edit', color: 'success',},
{text: '删除', buttonType: 'delete', color: 'error',},
],
},
computed: {
isMobile() {
return window.innerWidth < 600;
},
tableData() {
if (!this.currentTableGenderType || this.currentTableGenderType === 'all') {
return this.tableDataFromBackend;
}
return this.tableDataFromBackend.filter(({gender}) => gender === this.currentTableGenderType);
},
},
watch: {},
async created() {
await this.getTableData();
},
mounted() {
},
methods: {
/**
* 获取表格数据
*/
async getTableData() {
this.isTableLoading = true;
const result = await axios({
method: 'post',
url: `/xianfeng-v1/resource`,
data: {
packageId: '123456',
packageType: 'httpRequest',
appData: {
appId: 'xianfeng-v1',
pageId: 'frontendDemo01',
actionId: 'selectItemList',
userAgent: 'demo_userAgent',
authToken: localStorage.getItem(`xianfeng-v1_authToken`),
actionData: {},
where: {},
orderBy: [{column: 'operationAt', order: 'desc'}]
}
}
});
this.tableDataFromBackend = result.data.appData.rows;
this.isTableLoading = false;
},
openEditDialog({ item }) {
this.editItem = item;
this.isEditDrawerShow = true;
},
/**
* 删除学生
*/
async deleteStudent({ item }) {
const { id } = item;
await axios({
method: 'post',
url: `/xianfeng-v1/resource`,
data: {
packageId: '123456',
packageType: 'httpRequest',
appData: {
appId: 'xianfeng-v1',
pageId: 'frontendDemo01',
actionId: 'deleteItem',
userAgent: 'demo_userAgent',
authToken: localStorage.getItem(`xianfeng-v1_authToken`),
actionData: {},
where: { id: id }
}
}
});
await this.getTableData();
},
/**
* 新增学生
*/
async insertStudent() {
if (!this.$refs.form.validate()) return false;
const { id, ...actionData } = this.editItem;
await axios({
method: 'post',
url: `/xianfeng-v1/resource`,
data: {
packageId: '123456',
packageType: 'httpRequest',
appData: {
appId: 'xianfeng-v1',
pageId: 'frontendDemo01',
actionId: 'insertItem',
userAgent: 'demo_userAgent',
authToken: localStorage.getItem(`xianfeng-v1_authToken`),
actionData: actionData
}
}
})
this.isEditDrawerShow = false;
await this.getTableData();
},
/**
* 保存学生
*/
async updateStudent() {
if (!this.$refs.form.validate()) return false;
const { id, ...actionData } = this.editItem;
await axios({
method: 'post',
url: `/xianfeng-v1/resource`,
data: {
packageId: '123456',
packageType: 'httpRequest',
appData: {
appId: 'xianfeng-v1',
pageId: 'frontendDemo01',
actionId: 'updateItem',
userAgent: 'demo_userAgent',
authToken: localStorage.getItem(`xianfeng-v1_authToken`),
actionData: actionData,
where: {id}
}
}
})
this.isEditDrawerShow = false;
await this.getTableData();
},
jump({ path }) {
window.location.href = path;
}
}
})
</script>
</body>
-323
View File
@@ -1,323 +0,0 @@
{% extends 'template/jhTemplate.html'%}
{% block vue_template %}
<jh-layout>
<!-- 页面主要内容 -->
<v-container class="fullScreen d-flex flex-column pa-xs-0 pa-0">
<v-row class="ma-0 pa-xs-4 align-center flex-none pt-0 " :class="{'pa-4': !isMobile, 'pb-0': !isMobile, 'pa-2': isMobile}">
<v-col cols="12" xs="4" sm="4" md="4" xl="4" class="pl-0">
<v-btn color="success" small dark class="elevation-0 mr-2" @click="handleTableButton({ text: '新增', buttonType: 'add' }, null)">新增</v-btn>
<span class="body-2">共{{ tableData.length }}条记录</span>
</v-col>
<v-spacer></v-spacer>
<v-col cols="12" xs="8" sm="3" md="2" xl="2" class="pa-xs-0 pa-xs-2 col-sm-8-flex pl-0">
<v-select class="cus-v-input mr-2" v-model="currentTableGenderType" :items="[{value: 'all', text: '全部'}, ...constantCollection.gender]"
prefix="性别:" dense item-text="text" item-value="value" dense outlined></v-select>
</v-col>
<v-col cols="12" xs="8" sm="4" md="3" xl="3" class="pa-xs-0 pa-xs-2 col-sm-8-flex">
<v-text-field v-model="searchInput" label="表格过滤" class="cus-v-input" dense outlined></v-text-field>
</v-col>
</v-row>
<v-data-table fixed-header
:headers="headers"
:items="tableData"
:search="searchInput"
:footer-props="{ itemsPerPageOptions: [20, 40, 60, 100, -1] }"
:items-per-page="20"
mobile-breakpoint="0"
:loading="isTableLoading"
checkbox-color="success"
class="elevation-0 mt-0 mb-xs-4 flex-fill d-flex flex-column">
<template v-slot:item.gender="{ item }">
{{ getConstantCollectionItemText('gender', item.gender) }}
</template>
<template v-slot:item.level="{ item }">
{{ getConstantCollectionItemText('level', item.level) }}
</template>
<template v-slot:item.action="{ item }">
<v-btn small class="mr-2" :class="tableButton.color" v-for="tableButton of tableButtonList" @click="handleTableButton(tableButton, item)">
{{ tableButton.text }}
</v-btn>
</template>
</v-data-table>
</v-container>
<!-- 编辑抽屉 -->
<v-navigation-drawer v-model="isEditDrawerShow" absolute temporary right width="80%" hide-overlay
class="elevation-24">
<v-form v-model="isFormValid" v-if="isEditDrawerShow" ref="form" lazy-validation>
<v-row>
<span class="title pa-6">{{ currentClickButton.title }}信息</span>
<v-spacer></v-spacer>
<v-btn class="mt-7 mr-8 elevation-0" fab x-small @click="isEditDrawerShow = false">
<v-icon dark>mdi-close</v-icon>
</v-btn>
</v-row>
<v-row class="pa-0 ma-0 pa-xs-4 pb-xs-4 flex-none">
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="学生ID" v-model="editItem.studentId" :rules="requireRules"></v-text-field>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-select class="cus-v-input mr-2" dense outlined clearable label="班级ID" v-model="editItem.classId" :items="constantCollection.classId"></v-select>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="学生名字" v-model="editItem.name"></v-text-field>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-select class="cus-v-input mr-2" dense outlined clearable label="年级" v-model="editItem.level" :items="constantCollection.level"></v-select>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-select class="cus-v-input mr-2" dense outlined clearable label="性别" v-model="editItem.gender" :items="constantCollection.gender"></v-select>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-menu class="cus-v-input mr-2" offset-y max-width="290">
<template v-slot:activator="{ on, attrs }">
<v-text-field class="cus-v-input mr-2" dense outlined v-on="on" label="出生日期" v-model="editItem.dateOfBirth"></v-text-field>
</template>
<v-date-picker color="success" elevation="20" v-model="editItem.dateOfBirth"></v-date-picker>
</v-menu>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="身高" v-model="editItem.bodyHeight"></v-text-field>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-select class="cus-v-input mr-2" dense outlined clearable label="学生状态" v-model="editItem.studentStatus" :items="constantCollection.studentStatus"></v-select>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="备注" v-model="editItem.remarks"></v-text-field>
</v-col>
</v-row>
<v-row class="justify-end pr-6">
<v-btn color="success" small @click="saveInfo" :style="{width: isMobile ? 'calc(100% - 45px)' : '200px'}" :class="{'mb-2': isMobile, 'mr-4': isMobile}">保存</v-btn>
<v-btn class="ml-2" small @click="isEditDrawerShow = false" :style="{width: isMobile ? 'calc(100% - 45px)' : '200px'}" :class="{'mr-4': isMobile}">取消</v-btn>
</v-row>
</v-form>
</v-navigation-drawer>
</jh-layout>
{% endblock %}
{% block vue_body %}
{% include 'layout/jhLayout.html' %}
{% include 'common/resetTableMaxHeight.html' %}
<script type="module">
new Vue({
el: '#app',
template: '#app-template',
vuetify: new Vuetify(),
data: () => ({
// 表格相关数据
isFormValid: true,
requireRules: [
v => !!v || 'This is required',
],
constantCollection: {
gender: [{"value": "male", "text": "男"}, {"value": "female", "text": "女"}],
classId: [
{"value": "2021-01级-01班", "text": "2021-01级-01班"}, {"value": "2021-01级-02班", "text": "2021-01级-02班"},
{"value": "2021-02级-01班", "text": "2021-02级-01班"}, {"value": "2021-02级-02班", "text": "2021-02级-02班"},
{"value": "2021-03级-01班", "text": "2021-03级-01班"}, {"value": "2021-03级-02班", "text": "2021-03级-02班"}
],
level: [{"value": "01", "text": "一年级"}, {"value": "02", "text": "二年级"}, {"value": "03", "text": "三年级"}],
icType: [{"value": "身份证", "text": "身份证"}, {"value": "护照", "text": "护照"}],
enrollmentType: [{"value": "正常升学", "text": "正常升学"}, {"value": "借读", "text": "借读"}],
studentStatus: [{"value": "正常", "text": "正常"}, {"value": "退学", "text": "退学"}]
},
currentTableGenderType: 'all',
isEditDrawerShow: false,
searchInput: null,
isTableLoading: true,
tableDataFromBackend: [],
headers: [
{text: "学生ID", value: "studentId", width: 120, class: 'fixed', cellClass: 'fixed'},
{text: "班级ID", value: "classId", width: 140},
{text: "学生名字", value: "name", width: 120},
{text: "年级", value: "level", width: 120},
{text: "性别", value: "gender", width: 120},
{text: "出生日期", value: "dateOfBirth", width: 120},
{text: "身高", value: "bodyHeight", width: 120},
{text: "学生状态", value: "studentStatus", width: 120},
{text: "备注", value: "remarks", width: 120},
{text: "操作者", value: "operationByUser", width: 120},
{text: "操作时间", value: "operationAt", width: 250},
{text: '操作', value: 'action', align: 'center', sortable: false, width: 200, class: 'fixed', cellClass: 'fixed'},
],
currentClickButton: {title: '新增', action: 'add'},
editItem: {},
tableButtonList: [
{text: '修改', buttonType: 'edit', color: 'success',},
{text: '删除', buttonType: 'delete', color: 'error',},
],
}),
computed: {
isMobile() {
return window.innerWidth < 600;
},
tableData() {
if (!this.currentTableGenderType || this.currentTableGenderType === 'all') {
return this.tableDataFromBackend;
}
return this.tableDataFromBackend.filter(({gender}) => gender === this.currentTableGenderType);
},
computedEditItem() {
return this.editItem;
},
},
watch: {},
async created() {
await this.getTableData();
},
mounted() {},
methods: {
/**
* 获取表格数据
*/
async getTableData() {
this.isTableLoading = true;
const result = await window.jianghuAxios({
data: {
appData: {
pageId: 'frontendDemo02',
actionId: 'selectItemList',
actionData: {},
where: {},
orderBy: [{column: 'operationAt', order: 'desc'}]
}
}
});
this.tableDataFromBackend = result.data.appData.rows;
this.isTableLoading = false;
},
// validate
prepareValidate() {
return this.$refs.form.validate();
},
/**
* 点击表格数据按钮
*/
async handleTableButton(button, item) {
const buttonType = button.buttonType;
switch (buttonType) {
case 'edit':
this.currentClickButton = {action: 'edit', title: '修改'};
this.editItem = {...item};
this.isEditDrawerShow = true;
break;
case 'add':
this.currentClickButton = {action: 'add', title: '新增'};
this.editItem = {};
this.isEditDrawerShow = true;
break;
case 'delete':
this.editItem = {...item};
await this.deleteStudent();
break;
}
},
/**
* 删除学生
*/
async deleteStudent() {
const dialogDone = await window.confirmDialog({ title: '删除', content: '确定删除吗?'});
if (!dialogDone) {
return false;
}
const { id } = this.computedEditItem;
await window.vtoast.loading("删除学生");
await window.jianghuAxios({
data: {
appData: {
pageId: 'frontendDemo02',
actionId: 'deleteItem',
actionData: {},
where: { id: id }
}
}
});
await window.vtoast.success("删除学生成功");
await this.getTableData();
},
/**
* 保存数据
*/
async saveInfo() {
if (!this.prepareValidate()) return false
if (this.currentClickButton.action === 'add') {
await this.insertStudent();
}
if (this.currentClickButton.action === 'edit') {
await this.updateStudent();
}
},
/**
* 新增学生
*/
async insertStudent() {
if (await window.confirmDialog({ title: '新增', content: '确定新增吗?'})) {
delete this.computedEditItem.id;
await window.vtoast.loading("新增学生");
await window.jianghuAxios({
data: {
appData: {
pageId: 'frontendDemo02',
actionId: 'insertItem',
actionData: this.computedEditItem
}
}
})
await window.vtoast.success("新增学生成功");
this.isEditDrawerShow = false;
await this.getTableData();
}
},
/**
* 保存学生
*/
async updateStudent() {
if (await window.confirmDialog({ title: '修改', content: '确定修改吗?'})) {
const id = this.computedEditItem.id;
delete this.computedEditItem.id;
await window.vtoast.loading("修改学生");
await window.jianghuAxios({
data: {
appData: {
pageId: 'frontendDemo02',
actionId: 'updateItem',
actionData: this.computedEditItem,
where: {id: id}
}
}
})
await window.vtoast.success("修改学生成功");
this.isEditDrawerShow = false;
await this.getTableData();
}
},
getConstantCollectionItemText(key, _value) {
const constantCollectionItemFind = this.constantCollection[key].find(({value}) => value === _value);
if(constantCollectionItemFind) {
return constantCollectionItemFind.text;
}
return _value;
}
}
})
</script>
<style scoped>
</style>
{% endblock %}
-135
View File
@@ -1,135 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>
江湖演示-初级-数据传输演示
</title>
<meta charset="utf-8" name="viewport"
content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"/>
<script src="/xianfeng-v1/public/js/lib/axios.min.js"></script>
<script type="text/javascript">
async function insertStudent() {
// Tip: studentId不能重复
const studentInfo = {
studentId: "G00003",
bodyHeight: "180",
classId: "2021-01级-02班",
dateOfBirth: "2022-01-25",
gender: "male",
level: "02",
name: "小虾米",
remarks: "小虾米",
studentStatus: "正常",
}
const result = await axios({
method: 'post',
url: `/xianfeng-v1/resource`,
data: {
packageId: '123456',
packageType: 'httpRequest',
appData: {
appId: 'xianfeng-v1',
pageId: 'protocolDemo',
actionId: 'insertItem',
userAgent: 'demo_userAgent',
authToken: localStorage.getItem(`xianfeng-v1_authToken`),
actionData: studentInfo,
}
}
});
console.log('insertStudent', result.data);
}
async function selectStudentList() {
const result = await axios({
method: 'post',
url: `/xianfeng-v1/resource`,
data: {
packageId: '123456',
packageType: 'httpRequest',
appData: {
appId: 'xianfeng-v1',
pageId: 'protocolDemo',
actionId: 'selectItemList',
userAgent: 'demo_userAgent',
authToken: localStorage.getItem(`xianfeng-v1_authToken`),
actionData: {},
where: {},
}
}
});
console.log('selectStudentList', result.data);
}
async function updateStudent() {
const studentInfo = {
level: "03",
}
const result = await axios({
method: 'post',
url: `/xianfeng-v1/resource`,
data: {
packageId: '123456',
packageType: 'httpRequest',
appData: {
appId: 'xianfeng-v1',
pageId: 'protocolDemo',
actionId: 'updateItem',
userAgent: 'demo_userAgent',
authToken: localStorage.getItem(`xianfeng-v1_authToken`),
actionData: studentInfo,
where: {
studentId: "G00003",
},
}
}
});
console.log('updateStudent', result.data);
}
async function deleteStudent() {
const result = await axios({
method: 'post',
url: `/xianfeng-v1/resource`,
data: {
packageId: '123456',
packageType: 'httpRequest',
appData: {
appId: 'xianfeng-v1',
pageId: 'protocolDemo',
actionId: 'deleteItem',
userAgent: 'demo_userAgent',
authToken: localStorage.getItem(`xianfeng-v1_authToken`),
actionData: {},
where: {
studentId: "G00003",
},
}
}
});
console.log('deleteStudent', result.data);
}
</script>
</head>
<a href="/">回到首页</a><p/>
<button onclick="insertStudent()">1. 创建一个学号 "G00003", 姓名 "小虾米" 的二年级学生</button><p/>
<button onclick="selectStudentList()">2. 点击获取学生列表,显示在console里</button><p/>
<button onclick="updateStudent()">3. 将学生 "G00003" 改为三年级(level = 3)</button><p/>
<button onclick="deleteStudent()">4. 删除刚才创建的学生 "G00003"</button><p/>
<body>
</body>
-318
View File
@@ -1,318 +0,0 @@
{% extends 'template/jhTemplate.html'%}
{% block vue_template %}
<jh-layout>
<!-- 页面主要内容 -->
<v-container class="fullScreen d-flex flex-column pa-xs-0 pa-0">
<v-row class="ma-0 pa-xs-4 align-center flex-none pt-0 " :class="{'pa-4': !isMobile, 'pb-0': !isMobile, 'pa-2': isMobile}">
<v-col cols="12" xs="4" sm="4" md="4" xl="4" class="pl-0">
<v-btn color="success" small dark class="elevation-0 mr-2" @click="doUiAction('startCreateItem', null)">新增</v-btn>
<span class="body-2">共{{ tableData.length }}条记录</span>
</v-col>
<v-spacer></v-spacer>
<v-col cols="12" xs="8" sm="3" md="2" xl="2" class="pa-xs-0 pa-xs-2 col-sm-8-flex pl-0">
<v-select class="cus-v-input mr-2" v-model="currentTableGenderType" :items="[{value: 'all', text: '全部'}, ...constantCollection.gender]"
prefix="性别:" dense item-text="text" item-value="value" dense outlined></v-select>
</v-col>
<v-col cols="12" xs="8" sm="4" md="3" xl="3" class="pa-xs-0 pa-xs-2 col-sm-8-flex">
<v-text-field v-model="searchInput" label="表格过滤" class="cus-v-input" dense outlined></v-text-field>
</v-col>
</v-row>
<v-data-table fixed-header
:headers="headers"
:items="tableData"
:search="searchInput"
:footer-props="{ itemsPerPageOptions: [20, 40, 60, 100, -1] }"
:items-per-page="20"
mobile-breakpoint="0"
:loading="isTableLoading"
checkbox-color="success"
class="elevation-0 mt-0 mb-xs-4 flex-fill d-flex flex-column">
<template v-slot:item.gender="{ item }">
{{ getConstantCollectionItemText('gender', item.gender) }}
</template>
<template v-slot:item.level="{ item }">
{{ getConstantCollectionItemText('level', item.level) }}
</template>
<template v-slot:item.action="{ item }">
<v-btn small class="mr-2 success" @click="doUiAction('startUpdateItem', item)">
修改
</v-btn>
<v-btn small class="mr-2 error" @click="doUiAction('deleteItem', item)">
删除
</v-btn>
</template>
</v-data-table>
</v-container>
<!-- 编辑抽屉 -->
<v-navigation-drawer v-model="isEditDrawerShow" absolute temporary right width="80%" hide-overlay
v-click-outside="{ closeConditional: () => !dialogIsOpen(), }"
class="elevation-24">
<v-form v-model="isFormValid" v-if="isEditDrawerShow" ref="form" lazy-validation>
<v-row>
<span class="title pa-6">{{ editItem.id ? "修改" : "新增" }}信息</span>
<v-spacer></v-spacer>
<v-btn class="mt-7 mr-8 elevation-0" fab x-small @click="isEditDrawerShow = false">
<v-icon dark>mdi-close</v-icon>
</v-btn>
</v-row>
<v-row class="pa-0 ma-0 pa-xs-4 pb-xs-4 flex-none">
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="学生ID 后端生成" v-model="editItem.studentId"></v-text-field>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-select class="cus-v-input mr-2" dense outlined clearable label="班级ID" v-model="editItem.classId" :items="constantCollection.classId" :rules="requireRules"></v-select>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="学生名字" v-model="editItem.name" :rules="requireRules"></v-text-field>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-select class="cus-v-input mr-2" dense outlined clearable label="年级" v-model="editItem.level" :items="constantCollection.level" :rules="requireRules"></v-select>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-select class="cus-v-input mr-2" dense outlined clearable label="性别" v-model="editItem.gender" :items="constantCollection.gender" :rules="requireRules"></v-select>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-menu class="cus-v-input mr-2" offset-y max-width="290">
<template v-slot:activator="{ on, attrs }">
<v-text-field class="cus-v-input mr-2" dense outlined v-on="on" label="出生日期" v-model="editItem.dateOfBirth" :rules="requireRules"></v-text-field>
</template>
<v-date-picker color="success" elevation="20" v-model="editItem.dateOfBirth"></v-date-picker>
</v-menu>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="身高" v-model="editItem.bodyHeight"></v-text-field>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-select class="cus-v-input mr-2" dense outlined clearable label="学生状态" v-model="editItem.studentStatus" :items="constantCollection.studentStatus"></v-select>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="备注" v-model="editItem.remarks"></v-text-field>
</v-col>
</v-row>
<v-row class="justify-end pr-6">
<v-btn color="success" small @click="doUiAction(dialogSaveInfoAction)" :style="{width: isMobile ? 'calc(100% - 45px)' : '200px'}" :class="{'mb-2': isMobile, 'mr-4': isMobile}">保存</v-btn>
<v-btn class="ml-2" small @click="isEditDrawerShow = false" :style="{width: isMobile ? 'calc(100% - 45px)' : '200px'}" :class="{'mr-4': isMobile}">取消</v-btn>
</v-row>
</v-form>
</v-navigation-drawer>
</jh-layout>
{% endblock %}
{% block vue_body %}
<script type="module">
window.registerData({
// 表格相关数据
isFormValid: true,
requireRules: [
v => !!v || 'This is required',
],
constantCollection: {
gender: [{"value": "male", "text": "男"}, {"value": "female", "text": "女"}],
classId: [
{"value": "2021-01级-01班", "text": "2021-01级-01班"}, {"value": "2021-01级-02班", "text": "2021-01级-02班"},
{"value": "2021-02级-01班", "text": "2021-02级-01班"}, {"value": "2021-02级-02班", "text": "2021-02级-02班"},
{"value": "2021-03级-01班", "text": "2021-03级-01班"}, {"value": "2021-03级-02班", "text": "2021-03级-02班"}
],
level: [{"value": "01", "text": "一年级"}, {"value": "02", "text": "二年级"}, {"value": "03", "text": "三年级"}],
icType: [{"value": "身份证", "text": "身份证"}, {"value": "护照", "text": "护照"}],
enrollmentType: [{"value": "正常升学", "text": "正常升学"}, {"value": "借读", "text": "借读"}],
studentStatus: [{"value": "正常", "text": "正常"}, {"value": "退学", "text": "退学"}]
},
currentTableGenderType: 'all',
isEditDrawerShow: false,
searchInput: null,
isTableLoading: true,
tableDataFromBackend: [],
headers: [
{text: "学生ID", value: "studentId", width: 120, class: 'fixed', cellClass: 'fixed'},
{text: "班级ID", value: "classId", width: 140},
{text: "学生名字", value: "name", width: 120},
{text: "年级", value: "level", width: 120},
{text: "性别", value: "gender", width: 120},
{text: "出生日期", value: "dateOfBirth", width: 120},
{text: "身高", value: "bodyHeight", width: 120},
{text: "学生状态", value: "studentStatus", width: 120},
{text: "备注", value: "remarks", width: 120},
{text: "操作者", value: "operationByUser", width: 120},
{text: "操作时间", value: "operationAt", width: 250},
{text: '操作', value: 'action', align: 'center', sortable: false, width: 200, class: 'fixed', cellClass: 'fixed'},
],
editItem: {},
})
</script>
{% include 'layout/jhLayout.html' %}
{% include 'common/resetTableMaxHeight.html' %}
<script type="module">
new Vue({
el: '#app',
template: '#app-template',
vueComponent: 'page',
vuetify: new Vuetify(),
mixins: [window.jianghuUiActionMixins],
data: () => window.vueData,
computed: {
isMobile() {
return window.innerWidth < 600;
},
tableData() {
if (!this.currentTableGenderType || this.currentTableGenderType === 'all') {
return this.tableDataFromBackend;
}
return this.tableDataFromBackend.filter(({gender}) => gender === this.currentTableGenderType);
},
computedEditItem() {
return this.editItem;
},
},
watch: {},
mounted() {
this.doUiAction('refreshTableData')
},
methods: {
/**
* 获取表格数据
*/
async refreshTableData() {
this.isTableLoading = true;
const result = await window.jianghuAxios({
data: {
appData: {
pageId: 'resourceHook',
actionId: 'selectItemList',
actionData: {},
where: {},
orderBy: [{column: 'operationAt', order: 'desc'}]
}
}
});
this.tableDataFromBackend = result.data.appData.rows;
this.isTableLoading = false;
},
async clearItemData() {
this.editItem = {};
},
async openCreateDialog() {
this.isEditDrawerShow = true;
this.dialogSaveInfoAction = "createItem";
},
// createItem
async confirmCreateItemDialog() {
return await window.confirmDialog({ title: "新增", content: "确定新增吗?" });
},
/**
* 新增学生
*/
async doCreateItem() {
delete this.computedEditItem.id;
await window.vtoast.loading("新增学生");
await window.jianghuAxios({
data: {
appData: {
pageId: 'resourceHook',
actionId: 'insertItem',
actionData: this.computedEditItem
}
}
})
await window.vtoast.success("新增学生成功");
},
// createItem/updateItem
async closeDrawerShow() {
this.isEditDrawerShow = false;
},
async prepareItemData(item) {
this.editItem = {...item};
},
async openUpdateDialog() {
this.isEditDrawerShow = true;
this.dialogSaveInfoAction = "updateItem";
},
// validate
prepareValidate() {
return this.$refs.form.validate();
},
// createItem
async confirmUpdateItemDialog() {
return await window.confirmDialog({ title: "修改", content: "确定修改吗?" });
},
/**
* 新增学生
*/
async doUpdateItem() {
const id = this.computedEditItem.id;
delete this.computedEditItem.id;
await window.vtoast.loading("修改学生");
await window.jianghuAxios({
data: {
appData: {
pageId: 'resourceHook',
actionId: 'updateItem',
actionData: this.computedEditItem,
where: {id: id}
}
}
})
await window.vtoast.success("修改学生成功");
},
async confirmDeleteItemDialog() {
await window.confirmDialog({ title: '删除', content: '确定删除吗?'});
},
/**
* 删除学生
*/
async doDeleteItem() {
const { id } = this.computedEditItem;
await window.vtoast.loading("删除学生");
await window.jianghuAxios({
data: {
appData: {
pageId: 'resourceHook',
actionId: 'deleteItem',
actionData: {},
where: { id: id }
}
}
});
await window.vtoast.success("删除学生成功");
},
getConstantCollectionItemText(key, _value) {
const constantCollectionItemFind = this.constantCollection[key].find(({value}) => value === _value);
if(constantCollectionItemFind) {
return constantCollectionItemFind.text;
}
return _value;
},
dialogIsOpen() {
return window.dialogIsOpen;
}
}
})
</script>
<style scoped>
</style>
{% endblock %}
-361
View File
@@ -1,361 +0,0 @@
{% extends 'template/jhTemplate.html'%}
{% block vue_template %}
<!-- 3 table 下 的单表 crud 页面 -->
<!--SQL START
-- 以下为 jianghu init 工具生成的参考 SQL,使用后删除
-- 创建 page
INSERT INTO `_page` (`pageId`,`pageName`,`pageType`,`sort`,`operation`,`operationByUserId`,`operationByUser`,`operationAt`) SELECT 'studentManagement','页面','showInMenu','5','jhInsert',NULL,NULL,NULL FROM DUAL WHERE NOT EXISTS (SELECT `pageId` FROM `_page` WHERE `pageId`='studentManagement');
-- 创建 resource
INSERT INTO `_resource` (`accessControlTable`,`resourceHook`,`pageId`,`actionId`,`desc`,`resourceType`,`appDataSchema`,`resourceData`,`requestDemo`,`responseDemo`,`operation`,`operationByUserId`,`operationByUser`,`operationAt`) SELECT NULL,NULL,'studentManagement','selectItemList','✅查询-查询列表','sql','{}','{ \"table\": \"student\", \"operation\": \"select\" }','','','insert',NULL,NULL,NULL FROM DUAL WHERE NOT EXISTS (SELECT `pageId` FROM `_resource` WHERE `pageId`='studentManagement' AND `actionId`='selectItemList');
INSERT INTO `_resource` (`accessControlTable`,`resourceHook`,`pageId`,`actionId`,`desc`,`resourceType`,`appDataSchema`,`resourceData`,`requestDemo`,`responseDemo`,`operation`,`operationByUserId`,`operationByUser`,`operationAt`) SELECT NULL,NULL,'studentManagement','insertItem','✅查询-添加成员','sql','{}','{ \"table\": \"student\", \"operation\": \"insert\" }','','','insert',NULL,NULL,NULL FROM DUAL WHERE NOT EXISTS (SELECT `pageId` FROM `_resource` WHERE `pageId`='studentManagement' AND `actionId`='insertItem');
INSERT INTO `_resource` (`accessControlTable`,`resourceHook`,`pageId`,`actionId`,`desc`,`resourceType`,`appDataSchema`,`resourceData`,`requestDemo`,`responseDemo`,`operation`,`operationByUserId`,`operationByUser`,`operationAt`) SELECT NULL,NULL,'studentManagement','updateItem','✅查询-更新成员','sql','{}','{ \"table\": \"student\", \"operation\": \"update\" }','','','insert',NULL,NULL,NULL FROM DUAL WHERE NOT EXISTS (SELECT `pageId` FROM `_resource` WHERE `pageId`='studentManagement' AND `actionId`='updateItem');
INSERT INTO `_resource` (`accessControlTable`,`resourceHook`,`pageId`,`actionId`,`desc`,`resourceType`,`appDataSchema`,`resourceData`,`requestDemo`,`responseDemo`,`operation`,`operationByUserId`,`operationByUser`,`operationAt`) SELECT NULL,NULL,'studentManagement','deleteItem','✅查询-删除信息','sql','{}','{ \"table\": \"student\", \"operation\": \"delete\" }','','','insert',NULL,NULL,NULL FROM DUAL WHERE NOT EXISTS (SELECT `pageId` FROM `_resource` WHERE `pageId`='studentManagement' AND `actionId`='deleteItem');
SQL END!-->
<jh-layout>
<!-- 页面主要内容 -->
<v-container class="fullScreen d-flex flex-column pa-xs-0 pa-0">
<v-row class="ma-0 pa-xs-4 align-center flex-none pt-0 " :class="{'pa-4': !isMobile, 'pb-0': !isMobile, 'pa-2': isMobile}">
<v-col cols="12" xs="4" sm="4" md="4" xl="4" class="pl-0">
<v-btn color="success" small dark class="elevation-0 mr-2" @click="doUiAction('startCreateItem')">新增</v-btn>
<span class="body-2">共{{ tableData.length }}条记录</span>
</v-col>
<v-spacer></v-spacer>
<!--<v-col cols="12" xs="3" sm="3" md="2" xl="2" class="pl-0">
<v-text-field v-model="serverSearchInput.articleTitle" label="文章标题" class="cus-v-input" dense outlined>
</v-text-field>
</v-col>
<v-col cols="12" xs="3" sm="3" md="2" xl="2" class="pa-xs-0 pa-xs-2 col-sm-8-flex pl-0">
<v-select @mouseup="openSelectCategoryDialog" v-model="serverSearchInput.categoryId"
:items="constantCollection.category" readonly label="分类" hide-details dense outlined hide-no-data
hide-selected />
</v-col>
-->
<v-col cols="12" xs="3" sm="3" md="2" xl="2" class="pa-xs-0 pa-xs-2 col-sm-8-flex">
<v-text-field v-model="searchInput" label="表格过滤" class="cus-v-input" dense outlined></v-text-field>
</v-col>
<v-btn
class="elevation-0"
color="success"
dark
@click="doUiAction('refreshTableData')"
>
查询
</v-btn>
</v-row>
<v-data-table fixed-header
:headers="headers"
:items="tableData"
:search="searchInput"
:footer-props="{ itemsPerPageOptions: [20, 40, 60, 100, -1] }"
:items-per-page="20"
mobile-breakpoint="0"
:loading="isTableLoading"
checkbox-color="success"
class="elevation-0 mt-0 mb-xs-4 flex-fill d-flex flex-column">
<!-- <template v-slot:item.level="{ item }">-->
<!-- {{ getConstantCollectionItemText('level', item.level) }}-->
<!-- </template>-->
<template v-slot:item.action="{ item }">
<v-btn small class="mr-2" :class="tableButton.color" v-for="tableButton of tableButtonList" @click="doUiAction(tableButton.action, {item})">
{{ tableButton.text }}
</v-btn>
</template>
</v-data-table>
</v-container>
<!-- 编辑抽屉 -->
<v-navigation-drawer v-model="isEditDrawerShow" absolute temporary right width="80%" hide-overlay class="elevation-24">
<v-form v-model="isFormValid" v-if="isEditDrawerShow" ref="form" lazy-validation>
<v-row>
<span class="title pa-6">{{ currentClickButton.title }}信息</span>
<v-spacer></v-spacer>
<v-btn class="mt-7 mr-8 elevation-0" fab x-small @click="isEditDrawerShow = false">
<v-icon dark>mdi-close</v-icon>
</v-btn>
</v-row>
<v-row class="pa-0 ma-0 pa-xs-4 pb-xs-4 flex-none">
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="学生ID" v-model="editItem['studentId']"></v-text-field>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="学生名字" v-model="editItem['name']"></v-text-field>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="性别" v-model="editItem['gender']"></v-text-field>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="出生日期" v-model="editItem['dateOfBirth']"></v-text-field>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="班级ID" v-model="editItem['classId']"></v-text-field>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="年级" v-model="editItem['level']"></v-text-field>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="身高" v-model="editItem['bodyHeight']"></v-text-field>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="学生状态" v-model="editItem['studentStatus']"></v-text-field>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="备注" v-model="editItem['remarks']"></v-text-field>
</v-col>
<!-- <v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">-->
<!-- &lt;!&ndash; 必填字段样式 demo :rules="requireRules" &ndash;&gt;-->
<!-- <v-text-field class="cus-v-input mr-2" dense outlined label="学生ID" v-model="editItem.studentId" :rules="requireRules"></v-text-field>-->
<!-- </v-col>-->
<!-- &lt;!&ndash; select 字段 demo &ndash;&gt;-->
<!-- <v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">-->
<!-- <v-select class="cus-v-input mr-2" dense outlined clearable label="班级ID" v-model="editItem.classId" :items="constantCollection.classId"></v-select>-->
<!-- </v-col>-->
<!-- &lt;!&ndash; 日期选择 demo &ndash;&gt;-->
<!-- <v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">-->
<!-- <v-menu class="cus-v-input mr-2" offset-y max-width="290">-->
<!-- <template v-slot:activator="{ on, attrs }">-->
<!-- <v-text-field class="cus-v-input mr-2" dense outlined v-on="on" label="出生日期" v-model="editItem.dateOfBirth"></v-text-field>-->
<!-- </template>-->
<!-- <v-date-picker color="success" elevation="20" v-model="editItem.dateOfBirth"></v-date-picker>-->
<!-- </v-menu>-->
<!-- </v-col>-->
</v-row>
<v-row class="justify-end pr-6">
<v-btn color="success" small @click="doUiAction(dialogSaveInfoAction)" :style="{width: isMobile ? 'calc(100% - 45px)' : '200px'}" :class="{'mb-2': isMobile, 'mr-4': isMobile}">保存</v-btn>
<v-btn class="ml-2" small @click="isEditDrawerShow = false" :style="{width: isMobile ? 'calc(100% - 45px)' : '200px'}" :class="{'mr-4': isMobile}">取消</v-btn>
</v-row>
</v-form>
</v-navigation-drawer>
</jh-layout>
{% endblock %}
{% block vue_body %}
{% include 'layout/jhLayout.html' %}
{% include 'common/resetTableMaxHeight.html' %}
<script type="module">
new Vue({
el: '#app',
template: '#app-template',
vuetify: new Vuetify(),
mixins: [window.jianghuUiActionMixins],
data: () => ({
// 表格相关数据
isFormValid: true,
requireRules: [
v => !!v || 'This is required',
],
constantCollection: {
},
serverSearchInput: {
studentId: null,
classId: null
},
currentTableGenderType: 'all',
isEditDrawerShow: false,
searchInput: null,
isTableLoading: true,
tableDataFromBackend: [],
headers: [
{text: "ID", value: "id", width: 120, class: 'fixed', cellClass: 'fixed'},
{text: "学生ID", value: "studentId", width: 120},
{text: "学生名字", value: "name", width: 120},
{text: "性别", value: "gender", width: 120},
{text: "出生日期", value: "dateOfBirth", width: 120},
{text: "班级ID", value: "classId", width: 120},
{text: "年级", value: "level", width: 120},
{text: "身高", value: "bodyHeight", width: 120},
{text: "学生状态", value: "studentStatus", width: 120},
{text: "备注", value: "remarks", width: 120},
{text: "操作者", value: "operationByUser", width: 120},
{text: "操作时间", value: "operationAt", width: 250},
{text: '操作', value: 'action', align: 'center', sortable: false, width: 200, class: 'fixed', cellClass: 'fixed'},
],
currentClickButton: {title: '新增', action: 'add'},
editItem: {},
tableButtonList: [
{text: '修改', buttonType: 'edit', color: 'success', action: 'startUpdateItem'},
{text: '删除', buttonType: 'delete', color: 'error', action: 'deleteItem'},
],
dialogSaveInfoAction: ''
}),
computed: {
isMobile() {
return window.innerWidth < 600;
},
tableData() {
if (!this.currentTableGenderType || this.currentTableGenderType === 'all') {
return this.tableDataFromBackend;
}
return this.tableDataFromBackend.filter(({gender}) => gender === this.currentTableGenderType);
},
computedEditItem() {
return this.editItem;
},
},
watch: {},
async created() {
await this.doUiAction('refreshTableData');
},
mounted() {},
methods: {
/**
* 获取表格数据
*/
async refreshTableData() {
this.isTableLoading = true;
const serverSearchInput = _.pickBy(this.serverSearchInput, value=> !!value);
const { data: { appData: { rows } } } = await window.jianghuAxios({
data: {
appData: {
pageId: 'studentManagement',
actionId: 'selectItemList',
actionData: {},
where: {},
whereLike: serverSearchInput,
orderBy: [{column: 'operationAt', order: 'desc'}]
}
}
});
this.tableDataFromBackend = rows;
this.isTableLoading = false;
},
// startCreateItem
async clearItemData() {
this.editItem = {};
},
async openCreateItemDialog() {
this.currentClickButton = {action: 'add', title: '新增'};
this.isEditDrawerShow = true;
this.dialogSaveInfoAction = 'createItem';
},
// createItem
async confirmCreateItemDialog() {
return window.confirmDialog({title: '新增', content: '确定新增吗?'})
},
/**
* 新增数据
*/
async doCreateItem() {
delete this.computedEditItem.id;
await window.vtoast.loading("新增数据");
await window.jianghuAxios({
data: {
appData: {
pageId: 'studentManagement',
actionId: 'insertItem',
actionData: this.computedEditItem
}
}
})
await window.vtoast.success("新增数据成功");
},
async closeDrawerShow() {
this.isEditDrawerShow = false;
},
// startUpdateItem
async prepareItemData({item}) {
this.editItem = {...item};
},
async openUpdateDialog() {
this.currentClickButton = {action: 'edit', title: '修改'};
this.isEditDrawerShow = true;
this.dialogSaveInfoAction = 'updateItem';
},
// updateItem
async confirmUpdateItemDialog() {
return window.confirmDialog({title: '修改', content: '确定修改吗?'});
},
/**
* 保存数据
*/
async doUpdateItem() {
const id = this.computedEditItem.id;
delete this.computedEditItem.id;
await window.vtoast.loading("修改数据");
await window.jianghuAxios({
data: {
appData: {
pageId: 'studentManagement',
actionId: 'updateItem',
actionData: this.computedEditItem,
where: {id: id}
}
}
})
await window.vtoast.success("修改数据成功");
},
// updateItem
async confirmDeleteItemDialog() {
return window.confirmDialog({title: '删除', content: '确定删除吗?'});
},
/**
* 删除数据
*/
async doDeleteItem({item}) {
const { id } = item;
await window.vtoast.loading("删除数据");
await window.jianghuAxios({
data: {
appData: {
pageId: 'studentManagement',
actionId: 'deleteItem',
actionData: {},
where: { id: id }
}
}
});
await window.vtoast.success("删除数据成功");
},
getConstantCollectionItemText(key, _value) {
const constantCollectionItemFind = this.constantCollection[key].find(({value}) => value === _value);
if(constantCollectionItemFind) {
return constantCollectionItemFind.text;
}
return _value;
}
}
})
</script>
<style scoped>
</style>
{% endblock %}
+28 -23
View File
@@ -1,29 +1,32 @@
{% extends 'template/jhTemplate.html'%} {% extends 'template/jhTemplateV3.html'%}
{% block vue_template %} {% block vue_template %}
<jh-layout> <jh-layout-v3>
<template slot="serverSearch">
<v-row class="ma-0 align-center flex-none pa-0" :class="{'pa-2': !isMobile, 'pa-2': isMobile}" style="justify-content: end">
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field v-model="serverSearchInput.processName" label="流程名称" class="cus-v-input "
:class="{'mr-2': !isMobile}" dense outlined filled ></v-text-field>
</v-col>
<v-col :class="{'pt-2': isMobile, 'pl-0': isMobile, 'pr-0': !isMobile}" style="max-width: 77px">
<v-btn
class="elevation-0"
color="success"
dark
@click="doUiAction('refreshTableData')"
>
查询
</v-btn>
</v-col>
</v-row>
</template>
<!-- 页面主要内容 --> <!-- 页面主要内容 -->
<v-container class="fullScreen d-flex flex-column pa-xs-0 pa-0"> <v-container class="fullScreen d-flex flex-column pa-xs-0 pa-0">
<v-card> <v-card>
<v-list three-line subheader>
<v-row class="pa-0 ma-0 pa-xs-4 pb-xs-4 flex-none">
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field v-model="serverSearchInput.processName" label="流程名称" class="cus-v-input "
:class="{'mr-2': !isMobile}" dense outlined></v-text-field>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-btn class="elevation-0" color="success" dark @click="doUiAction('refreshTableData')">
查询
</v-btn>
</v-col>
</v-row>
</v-list>
<v-divider></v-divider>
<v-list three-line subheader> <v-list three-line subheader>
<v-subheader>流程列表</v-subheader> <v-subheader>流程列表</v-subheader>
<v-list-item v-for="(item, index) in tableDataFromBackend" :key="index"> <v-list-item v-for="(item, index) in tableDataFromBackend" :key="index">
@@ -41,7 +44,7 @@
</v-container> </v-container>
<!-- 编辑抽屉 --> <!-- 编辑抽屉 -->
<v-navigation-drawer v-model="isEditDrawerShow" absolute temporary right width="80%" hide-overlay <v-navigation-drawer v-model="isEditDrawerShow" :permanent="isEditDrawerShow" fixed temporary right width="80%"
class="elevation-24"> class="elevation-24">
<v-form v-model="isFormValid" v-if="isEditDrawerShow" ref="form" lazy-validation> <v-form v-model="isFormValid" v-if="isEditDrawerShow" ref="form" lazy-validation>
<v-row> <v-row>
@@ -54,11 +57,13 @@
<v-row class="pa-0 ma-0 pa-xs-4 pb-xs-4 flex-none"> <v-row class="pa-0 ma-0 pa-xs-4 pb-xs-4 flex-none">
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3"> <v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="任务标题" v-model="editItem['taskTitle']"> <span style="color: #3F4254;" :style="{'line-height': isMobile ? '20px' : '42px', 'font-weight': isMobile ? 400 : 500}">任务标题</span>
<v-text-field class="cus-v-input mr-2" dense filled single-line label="任务标题" v-model="editItem['taskTitle']">
</v-text-field> </v-text-field>
</v-col> </v-col>
<v-col cols="12" class="pa-xs-0 pb-xs-4 pb-3" v-for="(formItem, index) in editItem.workflowForm" :key="index"> <v-col cols="12" class="pa-xs-0 pb-xs-4 pb-3" v-for="(formItem, index) in editItem.workflowForm" :key="index">
<span style="color: #3F4254;" :style="{'line-height': isMobile ? '20px' : '42px', 'font-weight': isMobile ? 400 : 500}">{{formItem.component.outline}}</span>
<v-list-item-content v-if="formItem.component.type === 'singleSelect'"> <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-list-item-title class="formItem-title">{{ index+1 }}、 {{ formItem.component.outline }}</v-list-item-title>
<v-radio-group :rules="requireRules" v-model="editItem.workflowFormData[formItem.id]" hide-details> <v-radio-group :rules="requireRules" v-model="editItem.workflowFormData[formItem.id]" hide-details>
@@ -75,11 +80,11 @@
</v-list-item-content> </v-list-item-content>
<v-list-item-content v-if="formItem.component.type === 'textarea'"> <v-list-item-content v-if="formItem.component.type === 'textarea'">
<v-textarea hide-details dense outlined placeholder="请输入" :rules="requireRules" :label="(index+1) + '. ' + formItem.component.outline" v-model="editItem.workflowFormData[formItem.id]" :rows="4"/> <v-textarea hide-details dense filled single-line placeholder="请输入" :rules="requireRules" :label="(index+1) + '. ' + formItem.component.outline" v-model="editItem.workflowFormData[formItem.id]" :rows="4"/>
</v-list-item-content> </v-list-item-content>
<v-list-item-content v-if="formItem.component.type === 'input'"> <v-list-item-content v-if="formItem.component.type === 'input'">
<v-text-field class="cus-v-input mr-2" dense outlined placeholder="请输入" :rules="requireRules" :label="(index+1) + '. ' + formItem.component.outline" v-model="editItem.workflowFormData[formItem.id]" ></v-text-field> <v-text-field class="cus-v-input mr-2" dense filled single-line placeholder="请输入" :rules="requireRules" :label="(index+1) + '. ' + formItem.component.outline" v-model="editItem.workflowFormData[formItem.id]" ></v-text-field>
</v-list-item-content> </v-list-item-content>
</v-col> </v-col>
</v-row> </v-row>
@@ -93,7 +98,7 @@
</v-form> </v-form>
</v-navigation-drawer> </v-navigation-drawer>
</jh-layout> </jh-layout-v3>
{% endblock %} {% endblock %}
+3 -4
View File
@@ -1,9 +1,8 @@
{% extends 'template/jhTemplate.html'%} {% extends 'template/jhTemplateV3.html'%}
{% block vue_template %} {% block vue_template %}
<jh-layout> <jh-layout-v3>
<!-- 页面主要内容 --> <!-- 页面主要内容 -->
<v-container class="fullScreen d-flex flex-column pa-xs-0 pa-4" style="background-color: rgb(236, 236, 236);"> <v-container class="fullScreen d-flex flex-column pa-xs-0 pa-4" style="background-color: rgb(236, 236, 236);">
@@ -112,7 +111,7 @@
</v-list> </v-list>
</v-card> </v-card>
</v-container> </v-container>
</jh-layout> </jh-layout-v3>
{% endblock %} {% endblock %}
+49 -128
View File
@@ -1,140 +1,61 @@
{% extends 'template/jhTemplate.html'%} {% extends 'template/jhTemplateV3.html'%}
{% block vue_template %} {% block vue_template %}
<jh-layout> <jh-layout-v3>
<template slot="serverSearch">
<!-- 页面主要内容 --> <v-row class="ma-0 align-center flex-none pa-0" :class="{'pa-2': !isMobile, 'pa-2': isMobile}" style="justify-content: end">
<v-container class="fullScreen d-flex flex-column pa-xs-0 pa-0"> <v-col :class="{'pt-2': isMobile, 'pl-0': isMobile, 'pr-0': !isMobile}" style="max-width: 77px">
<v-divider></v-divider> <v-btn
<v-row class="ma-0 pa-xs-4 align-center flex-none pt-0 " :class="{'pa-4': !isMobile, 'pb-0': !isMobile, 'pa-2': isMobile}"> class="elevation-0"
color="success"
<v-col cols="12" xs="4" sm="4" md="4" xl="4" class="pl-0"> dark
<span class="body-2">共{{ tableData.length }}条记录</span> @click="doUiAction('refreshTableData')"
</v-col> >
查询
<v-spacer></v-spacer> </v-btn>
</v-col>
<v-col cols="12" xs="8" sm="4" md="3" xl="3" class="pa-xs-0 pa-xs-2 col-sm-8-flex">
<v-text-field v-model="searchInput" label="表格过滤" class="cus-v-input" dense outlined></v-text-field>
</v-col>
<v-btn
class="elevation-0"
color="success"
dark
@click="doUiAction('refreshTableData')"
>
查询
</v-btn>
</v-row>
<v-data-table fixed-header
:headers="headers"
:items="tableData"
:search="searchInput"
:footer-props="{ itemsPerPageOptions: [20, 40, 60, 100, -1] }"
:items-per-page="20"
mobile-breakpoint="0"
:loading="isTableLoading"
checkbox-color="success"
class="elevation-0 mt-0 mb-xs-4 flex-fill d-flex flex-column">
<!-- <template v-slot:item.level="{ item }">-->
<!-- {{ getConstantCollectionItemText('level', item.level) }}-->
<!-- </template>-->
<template v-slot:item.action="{ item }">
<v-btn small class="mr-2" @click="doUiAction('toTaskHistory', {item})">
查看
</v-btn>
</template>
</v-data-table>
</v-container>
<!-- 编辑抽屉 -->
<v-navigation-drawer v-model="isEditDrawerShow" absolute temporary right width="80%" hide-overlay class="elevation-24">
<v-form v-model="isFormValid" v-if="isEditDrawerShow" ref="form" lazy-validation>
<v-row>
<span class="title pa-6">{{ currentClickButton.title }}信息</span>
<v-spacer></v-spacer>
<v-btn class="mt-7 mr-8 elevation-0" fab x-small @click="isEditDrawerShow = false">
<v-icon dark>mdi-close</v-icon>
</v-btn>
</v-row> </v-row>
<v-row class="pa-0 ma-0 pa-xs-4 pb-xs-4 flex-none"> </template>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3"> <!-- 页面主要内容 -->
<v-text-field class="cus-v-input mr-2" dense outlined label="任务ID" v-model="editItem['taskId']"></v-text-field> <v-container class="fullScreen d-flex flex-column pa-xs-0 pa-0">
</v-col> <v-card>
<v-row class="ma-0 pa-xs-4 align-center flex-none pt-0 " :class="{'pa-4': !isMobile, 'pb-0': !isMobile, 'pa-2': isMobile}">
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3"> <v-col cols="12" xs="4" sm="4" md="4" xl="4" class="pl-0">
<v-text-field class="cus-v-input mr-2" dense outlined label="任务名称" v-model="editItem['taskTitle']"></v-text-field> <span class="body-2">共{{ tableData.length }}条记录</span>
</v-col> </v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3"> <v-spacer></v-spacer>
<v-text-field class="cus-v-input mr-2" dense outlined label="任务状态:running 执行中;deny 拒绝;end 结束" v-model="editItem['taskStatus']"></v-text-field>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3"> <v-col cols="12" xs="8" sm="4" md="3" xl="3" class="pa-xs-0 pa-xs-2 col-sm-8-flex">
<v-text-field class="cus-v-input mr-2" dense outlined label="表单" v-model="editItem['taskFormInput']"></v-text-field> <v-text-field v-model="searchInput" label="表格过滤" class="cus-v-input" dense filled single-line></v-text-field>
</v-col> </v-col>
</v-row>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3"> <v-data-table fixed-header
<v-text-field class="cus-v-input mr-2" dense outlined label="当前执行中节点ID" v-model="editItem['taskConfigId']"></v-text-field> :headers="headers"
</v-col> :items="tableData"
:search="searchInput"
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3"> :footer-props="{ itemsPerPageOptions: [20, 40, 60, 100, -1] }"
<v-text-field class="cus-v-input mr-2" dense outlined label="执行线路id list: 逗号分隔" v-model="editItem['taskNextConfigList']"></v-text-field> :items-per-page="20"
</v-col> mobile-breakpoint="0"
:loading="isTableLoading"
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3"> checkbox-color="success"
<v-text-field class="cus-v-input mr-2" dense outlined label="申请人" v-model="editItem['taskInitUser']"></v-text-field> class="elevation-0 mt-0 mb-xs-4 flex-fill d-flex flex-column">
</v-col> <!-- <template v-slot:item.level="{ item }">-->
<!-- {{ getConstantCollectionItemText('level', item.level) }}-->
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3"> <!-- </template>-->
<v-text-field class="cus-v-input mr-2" dense outlined label="当前执行的处理人员,用逗号分隔" v-model="editItem['taskEditUserList']"></v-text-field> <template v-slot:item.action="{ item }">
</v-col> <v-btn small color="warning" class="mr-2" @click="doUiAction('toTaskHistory', {item})">
查看
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3"> </v-btn>
<v-text-field class="cus-v-input mr-2" dense outlined label="所有相关人员,用逗号分隔" v-model="editItem['taskViewUserList']"></v-text-field> </template>
</v-col> </v-data-table>
</v-card>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3"> </v-container>
<v-text-field class="cus-v-input mr-2" dense outlined label="备注" v-model="editItem['taskComment']"></v-text-field> </jh-layout-v3>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="work flow流程JSON" v-model="editItem['workflowConfig']"></v-text-field>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="任务创建人" v-model="editItem['createByUser']"></v-text-field>
</v-col>
<!-- <v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">-->
<!-- &lt;!&ndash; 必填字段样式 demo :rules="requireRules" &ndash;&gt;-->
<!-- <v-text-field class="cus-v-input mr-2" dense outlined label="学生ID" v-model="editItem.studentId" :rules="requireRules"></v-text-field>-->
<!-- </v-col>-->
<!-- &lt;!&ndash; select 字段 demo &ndash;&gt;-->
<!-- <v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">-->
<!-- <v-select class="cus-v-input mr-2" dense outlined clearable label="班级ID" v-model="editItem.classId" :items="constantCollection.classId"></v-select>-->
<!-- </v-col>-->
<!-- &lt;!&ndash; 日期选择 demo &ndash;&gt;-->
<!-- <v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">-->
<!-- <v-menu class="cus-v-input mr-2" offset-y max-width="290">-->
<!-- <template v-slot:activator="{ on, attrs }">-->
<!-- <v-text-field class="cus-v-input mr-2" dense outlined v-on="on" label="出生日期" v-model="editItem.dateOfBirth"></v-text-field>-->
<!-- </template>-->
<!-- <v-date-picker color="success" elevation="20" v-model="editItem.dateOfBirth"></v-date-picker>-->
<!-- </v-menu>-->
<!-- </v-col>-->
</v-row>
<v-row class="justify-end pr-6">
<v-btn color="success" small @click="doUiAction(dialogSaveInfoAction)" :style="{width: isMobile ? 'calc(100% - 45px)' : '200px'}" :class="{'mb-2': isMobile, 'mr-4': isMobile}">保存</v-btn>
<v-btn class="ml-2" small @click="isEditDrawerShow = false" :style="{width: isMobile ? 'calc(100% - 45px)' : '200px'}" :class="{'mr-4': isMobile}">取消</v-btn>
</v-row>
</v-form>
</v-navigation-drawer>
</jh-layout>
{% endblock %} {% endblock %}
+128 -121
View File
@@ -1,143 +1,150 @@
{% extends 'template/jhTemplate.html'%} {% extends 'template/jhTemplateV3.html'%}
{% block vue_template %} {% block vue_template %}
<jh-layout> <jh-layout-v3>
<template slot="serverSearch">
<!-- 页面主要内容 --> <v-row class="ma-0 align-center flex-none pa-0" :class="{'pa-2': !isMobile, 'pa-2': isMobile}" style="justify-content: end">
<v-container class="fullScreen d-flex flex-column pa-xs-0 pa-0"> <v-col :class="{'pt-2': isMobile, 'pl-0': isMobile, 'pr-0': !isMobile}" style="max-width: 77px">
<v-row class="ma-0 pa-xs-4 align-center flex-none pt-0 " :class="{'pa-4': !isMobile, 'pb-0': !isMobile, 'pa-2': isMobile}"> <v-btn
class="elevation-0"
<v-col cols="12" xs="4" sm="4" md="4" xl="4" class="pl-0"> color="success"
<span class="body-2">共{{ tableData.length }}条记录</span> dark
</v-col> @click="doUiAction('refreshTableData')"
>
<v-spacer></v-spacer> 查询
</v-btn>
<v-col cols="12" xs="8" sm="4" md="3" xl="3" class="pa-xs-0 pa-xs-2 col-sm-8-flex"> </v-col>
<v-text-field v-model="searchInput" label="表格过滤" class="cus-v-input" dense outlined></v-text-field>
</v-col>
<v-btn
class="elevation-0"
color="success"
dark
@click="doUiAction('refreshTableData')"
>
查询
</v-btn>
</v-row>
<v-data-table fixed-header
:headers="headers"
:items="tableData"
:search="searchInput"
:footer-props="{ itemsPerPageOptions: [20, 40, 60, 100, -1] }"
:items-per-page="20"
mobile-breakpoint="0"
:loading="isTableLoading"
checkbox-color="success"
class="elevation-0 mt-0 mb-xs-4 flex-fill d-flex flex-column">
<!-- <template v-slot:item.level="{ item }">-->
<!-- {{ getConstantCollectionItemText('level', item.level) }}-->
<!-- </template>-->
<template v-slot:item.action="{ item }">
<v-btn small class="mr-2" @click="doUiAction('toTaskHistory', {item})">
查看
</v-btn>
<v-btn small class="mr-2" :class="tableButton.color" v-for="tableButton of tableButtonList" @click="doUiAction(tableButton.action, {item})">
{{ tableButton.text }}
</v-btn>
</template>
</v-data-table>
</v-container>
<!-- 编辑抽屉 -->
<v-navigation-drawer v-model="isEditDrawerShow" absolute temporary right width="80%" hide-overlay class="elevation-24">
<v-form v-model="isFormValid" v-if="isEditDrawerShow" ref="form" lazy-validation>
<v-row>
<span class="title pa-6">{{ currentClickButton.title }}信息</span>
<v-spacer></v-spacer>
<v-btn class="mt-7 mr-8 elevation-0" fab x-small @click="isEditDrawerShow = false">
<v-icon dark>mdi-close</v-icon>
</v-btn>
</v-row> </v-row>
<v-row class="pa-0 ma-0 pa-xs-4 pb-xs-4 flex-none"> </template>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3"> <!-- 页面主要内容 -->
<v-text-field class="cus-v-input mr-2" dense outlined label="任务ID" v-model="editItem['taskId']"></v-text-field> <v-container class="fullScreen d-flex flex-column pa-xs-0 pa-0">
</v-col> <v-card>
<v-row class="ma-0 pa-xs-4 align-center flex-none pt-0 " :class="{'pa-4': !isMobile, 'pb-0': !isMobile, 'pa-2': isMobile}">
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3"> <v-col cols="12" xs="4" sm="4" md="4" xl="4" class="pl-0">
<v-text-field class="cus-v-input mr-2" dense outlined label="任务名称" v-model="editItem['taskTitle']"></v-text-field> <span class="body-2">共{{ tableData.length }}条记录</span>
</v-col> </v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3"> <v-spacer></v-spacer>
<v-text-field class="cus-v-input mr-2" dense outlined label="任务状态:running 执行中;deny 拒绝;end 结束" v-model="editItem['taskStatus']"></v-text-field>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3"> <v-col cols="12" xs="8" sm="4" md="3" xl="3" class="pa-xs-0 pa-xs-2 col-sm-8-flex">
<v-text-field class="cus-v-input mr-2" dense outlined label="表单" v-model="editItem['taskFormInput']"></v-text-field> <v-text-field v-model="searchInput" label="表格过滤" class="cus-v-input" dense outlined></v-text-field>
</v-col> </v-col>
</v-row>
<v-data-table fixed-header
:headers="headers"
:items="tableData"
:search="searchInput"
:footer-props="{ itemsPerPageOptions: [20, 40, 60, 100, -1] }"
:items-per-page="20"
mobile-breakpoint="0"
:loading="isTableLoading"
checkbox-color="success"
class="elevation-0 mt-0 mb-xs-4 flex-fill d-flex flex-column">
<!-- <template v-slot:item.level="{ item }">-->
<!-- {{ getConstantCollectionItemText('level', item.level) }}-->
<!-- </template>-->
<template v-slot:item.action="{ item }">
<v-btn small color="warning" class="mr-2" @click="doUiAction('toTaskHistory', {item})">
查看
</v-btn>
<v-btn small class="mr-2" :class="tableButton.color" v-for="tableButton of tableButtonList" @click="doUiAction(tableButton.action, {item})">
{{ tableButton.text }}
</v-btn>
</template>
</v-data-table>
</v-card>
</v-container>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3"> <!-- 编辑抽屉 -->
<v-text-field class="cus-v-input mr-2" dense outlined label="当前执行中节点ID" v-model="editItem['taskConfigId']"></v-text-field> <v-navigation-drawer v-model="isEditDrawerShow" absolute temporary right width="80%" hide-overlay class="elevation-24">
</v-col> <v-form v-model="isFormValid" v-if="isEditDrawerShow" ref="form" lazy-validation>
<v-row>
<span class="title pa-6">{{ currentClickButton.title }}信息</span>
<v-spacer></v-spacer>
<v-btn class="mt-7 mr-8 elevation-0" fab x-small @click="isEditDrawerShow = false">
<v-icon dark>mdi-close</v-icon>
</v-btn>
</v-row>
<v-row class="pa-0 ma-0 pa-xs-4 pb-xs-4 flex-none">
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3"> <v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="执行线路id list: 逗号分隔" v-model="editItem['taskNextConfigList']"></v-text-field> <v-text-field class="cus-v-input mr-2" dense outlined label="任务ID" v-model="editItem['taskId']"></v-text-field>
</v-col> </v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3"> <v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="申请人" v-model="editItem['taskInitUser']"></v-text-field> <v-text-field class="cus-v-input mr-2" dense outlined label="任务名称" v-model="editItem['taskTitle']"></v-text-field>
</v-col> </v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3"> <v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="当前执行的处理人员,用逗号分隔" v-model="editItem['taskEditUserList']"></v-text-field> <v-text-field class="cus-v-input mr-2" dense outlined label="任务状态:running 执行中;deny 拒绝;end 结束" v-model="editItem['taskStatus']"></v-text-field>
</v-col> </v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3"> <v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="所有相关人员,用逗号分隔" v-model="editItem['taskViewUserList']"></v-text-field> <v-text-field class="cus-v-input mr-2" dense outlined label="表单" v-model="editItem['taskFormInput']"></v-text-field>
</v-col> </v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3"> <v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="备注" v-model="editItem['taskComment']"></v-text-field> <v-text-field class="cus-v-input mr-2" dense outlined label="当前执行中节点ID" v-model="editItem['taskConfigId']"></v-text-field>
</v-col> </v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3"> <v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="work flow流程JSON" v-model="editItem['workflowConfig']"></v-text-field> <v-text-field class="cus-v-input mr-2" dense outlined label="执行线路id list: 逗号分隔" v-model="editItem['taskNextConfigList']"></v-text-field>
</v-col> </v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3"> <v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="任务创建人" v-model="editItem['createByUser']"></v-text-field> <v-text-field class="cus-v-input mr-2" dense outlined label="申请人" v-model="editItem['taskInitUser']"></v-text-field>
</v-col> </v-col>
<!-- <v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">--> <v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<!-- &lt;!&ndash; 必填字段样式 demo :rules="requireRules" &ndash;&gt;--> <v-text-field class="cus-v-input mr-2" dense outlined label="当前执行的处理人员,用逗号分隔" v-model="editItem['taskEditUserList']"></v-text-field>
<!-- <v-text-field class="cus-v-input mr-2" dense outlined label="学生ID" v-model="editItem.studentId" :rules="requireRules"></v-text-field>--> </v-col>
<!-- </v-col>-->
<!-- &lt;!&ndash; select 字段 demo &ndash;&gt;-->
<!-- <v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">-->
<!-- <v-select class="cus-v-input mr-2" dense outlined clearable label="班级ID" v-model="editItem.classId" :items="constantCollection.classId"></v-select>-->
<!-- </v-col>-->
<!-- &lt;!&ndash; 日期选择 demo &ndash;&gt;-->
<!-- <v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">-->
<!-- <v-menu class="cus-v-input mr-2" offset-y max-width="290">-->
<!-- <template v-slot:activator="{ on, attrs }">-->
<!-- <v-text-field class="cus-v-input mr-2" dense outlined v-on="on" label="出生日期" v-model="editItem.dateOfBirth"></v-text-field>-->
<!-- </template>-->
<!-- <v-date-picker color="success" elevation="20" v-model="editItem.dateOfBirth"></v-date-picker>-->
<!-- </v-menu>-->
<!-- </v-col>-->
</v-row>
<v-row class="justify-end pr-6">
<v-btn color="success" small @click="doUiAction(dialogSaveInfoAction)" :style="{width: isMobile ? 'calc(100% - 45px)' : '200px'}" :class="{'mb-2': isMobile, 'mr-4': isMobile}">保存</v-btn>
<v-btn class="ml-2" small @click="isEditDrawerShow = false" :style="{width: isMobile ? 'calc(100% - 45px)' : '200px'}" :class="{'mr-4': isMobile}">取消</v-btn>
</v-row>
</v-form>
</v-navigation-drawer>
</jh-layout> <v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="所有相关人员,用逗号分隔" v-model="editItem['taskViewUserList']"></v-text-field>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="备注" v-model="editItem['taskComment']"></v-text-field>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="work flow流程JSON" v-model="editItem['workflowConfig']"></v-text-field>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="任务创建人" v-model="editItem['createByUser']"></v-text-field>
</v-col>
<!-- <v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">-->
<!-- &lt;!&ndash; 必填字段样式 demo :rules="requireRules" &ndash;&gt;-->
<!-- <v-text-field class="cus-v-input mr-2" dense outlined label="学生ID" v-model="editItem.studentId" :rules="requireRules"></v-text-field>-->
<!-- </v-col>-->
<!-- &lt;!&ndash; select 字段 demo &ndash;&gt;-->
<!-- <v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">-->
<!-- <v-select class="cus-v-input mr-2" dense outlined clearable label="班级ID" v-model="editItem.classId" :items="constantCollection.classId"></v-select>-->
<!-- </v-col>-->
<!-- &lt;!&ndash; 日期选择 demo &ndash;&gt;-->
<!-- <v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">-->
<!-- <v-menu class="cus-v-input mr-2" offset-y max-width="290">-->
<!-- <template v-slot:activator="{ on, attrs }">-->
<!-- <v-text-field class="cus-v-input mr-2" dense outlined v-on="on" label="出生日期" v-model="editItem.dateOfBirth"></v-text-field>-->
<!-- </template>-->
<!-- <v-date-picker color="success" elevation="20" v-model="editItem.dateOfBirth"></v-date-picker>-->
<!-- </v-menu>-->
<!-- </v-col>-->
</v-row>
<v-row class="justify-end pr-6">
<v-btn color="success" small @click="doUiAction(dialogSaveInfoAction)" :style="{width: isMobile ? 'calc(100% - 45px)' : '200px'}" :class="{'mb-2': isMobile, 'mr-4': isMobile}">保存</v-btn>
<v-btn class="ml-2" small @click="isEditDrawerShow = false" :style="{width: isMobile ? 'calc(100% - 45px)' : '200px'}" :class="{'mr-4': isMobile}">取消</v-btn>
</v-row>
</v-form>
</v-navigation-drawer>
</jh-layout-v3>
{% endblock %} {% endblock %}
+18 -12
View File
@@ -1,9 +1,23 @@
{% extends 'template/jhTemplate.html'%} {% extends 'template/jhTemplateV3.html'%}
{% block vue_template %} {% block vue_template %}
<jh-layout> <jh-layout-v3>
<template slot="serverSearch">
<v-row class="ma-0 align-center flex-none pa-0" :class="{'pa-2': !isMobile, 'pa-2': isMobile}" style="justify-content: end">
<v-col :class="{'pt-2': isMobile, 'pl-0': isMobile, 'pr-0': !isMobile}" style="max-width: 77px">
<v-btn
class="elevation-0"
color="success"
dark
@click="doUiAction('refreshTableData')"
>
查询
</v-btn>
</v-col>
</v-row>
</template>
<!-- 页面主要内容 --> <!-- 页面主要内容 -->
<v-container class="fullScreen d-flex flex-column pa-xs-0 pa-0"> <v-container class="fullScreen d-flex flex-column pa-xs-0 pa-0">
@@ -19,14 +33,6 @@
<v-col cols="12" xs="8" sm="4" md="3" xl="3" class="pa-xs-0 pa-xs-2 col-sm-8-flex"> <v-col cols="12" xs="8" sm="4" md="3" xl="3" class="pa-xs-0 pa-xs-2 col-sm-8-flex">
<v-text-field v-model="searchInput" label="表格过滤" class="cus-v-input" dense outlined></v-text-field> <v-text-field v-model="searchInput" label="表格过滤" class="cus-v-input" dense outlined></v-text-field>
</v-col> </v-col>
<v-btn
class="elevation-0"
color="success"
dark
@click="doUiAction('refreshTableData')"
>
查询
</v-btn>
</v-row> </v-row>
<v-data-table fixed-header <v-data-table fixed-header
:headers="headers" :headers="headers"
@@ -42,7 +48,7 @@
<!-- {{ getConstantCollectionItemText('level', item.level) }}--> <!-- {{ getConstantCollectionItemText('level', item.level) }}-->
<!-- </template>--> <!-- </template>-->
<template v-slot:item.action="{ item }"> <template v-slot:item.action="{ item }">
<v-btn small class="mr-2" @click="doUiAction('toTaskHistory', {item})"> <v-btn small color="warning" class="mr-2" @click="doUiAction('toTaskHistory', {item})">
查看 查看
</v-btn> </v-btn>
</template> </template>
@@ -134,7 +140,7 @@
</v-form> </v-form>
</v-navigation-drawer> </v-navigation-drawer>
</jh-layout> </jh-layout-v3>
{% endblock %} {% endblock %}
+129 -121
View File
@@ -1,140 +1,148 @@
{% extends 'template/jhTemplate.html'%} {% extends 'template/jhTemplateV3.html'%}
{% block vue_template %} {% block vue_template %}
<jh-layout> <jh-layout-v3>
<template slot="serverSearch">
<!-- 页面主要内容 --> <v-row class="ma-0 align-center flex-none pa-0" :class="{'pa-2': !isMobile, 'pa-2': isMobile}" style="justify-content: end">
<v-container class="fullScreen d-flex flex-column pa-xs-0 pa-0"> <v-col :class="{'pt-2': isMobile, 'pl-0': isMobile, 'pr-0': !isMobile}" style="max-width: 77px">
<v-row class="ma-0 pa-xs-4 align-center flex-none pt-0 " :class="{'pa-4': !isMobile, 'pb-0': !isMobile, 'pa-2': isMobile}"> <v-btn
class="elevation-0"
<v-col cols="12" xs="4" sm="4" md="4" xl="4" class="pl-0"> color="success"
<span class="body-2">共{{ tableData.length }}条记录</span> dark
</v-col> @click="doUiAction('refreshTableData')"
>
<v-spacer></v-spacer> 查询
</v-btn>
<v-col cols="12" xs="8" sm="4" md="3" xl="3" class="pa-xs-0 pa-xs-2 col-sm-8-flex"> </v-col>
<v-text-field v-model="searchInput" label="表格过滤" class="cus-v-input" dense outlined></v-text-field>
</v-col>
<v-btn
class="elevation-0"
color="success"
dark
@click="doUiAction('refreshTableData')"
>
查询
</v-btn>
</v-row>
<v-data-table fixed-header
:headers="headers"
:items="tableData"
:search="searchInput"
:footer-props="{ itemsPerPageOptions: [20, 40, 60, 100, -1] }"
:items-per-page="20"
mobile-breakpoint="0"
:loading="isTableLoading"
checkbox-color="success"
class="elevation-0 mt-0 mb-xs-4 flex-fill d-flex flex-column">
<!-- <template v-slot:item.level="{ item }">-->
<!-- {{ getConstantCollectionItemText('level', item.level) }}-->
<!-- </template>-->
<template v-slot:item.action="{ item }">
<v-btn small class="mr-2" @click="doUiAction('toTaskHistory', {item})">
查看
</v-btn>
</template>
</v-data-table>
</v-container>
<!-- 编辑抽屉 -->
<v-navigation-drawer v-model="isEditDrawerShow" absolute temporary right width="80%" hide-overlay class="elevation-24">
<v-form v-model="isFormValid" v-if="isEditDrawerShow" ref="form" lazy-validation>
<v-row>
<span class="title pa-6">{{ currentClickButton.title }}信息</span>
<v-spacer></v-spacer>
<v-btn class="mt-7 mr-8 elevation-0" fab x-small @click="isEditDrawerShow = false">
<v-icon dark>mdi-close</v-icon>
</v-btn>
</v-row> </v-row>
<v-row class="pa-0 ma-0 pa-xs-4 pb-xs-4 flex-none"> </template>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3"> <!-- 页面主要内容 -->
<v-text-field class="cus-v-input mr-2" dense outlined label="任务ID" v-model="editItem['taskId']"></v-text-field> <v-container class="fullScreen d-flex flex-column pa-xs-0 pa-0">
</v-col> <v-card>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3"> <v-row class="ma-0 pa-xs-4 align-center flex-none pt-0 " :class="{'pa-4': !isMobile, 'pb-0': !isMobile, 'pa-2': isMobile}">
<v-text-field class="cus-v-input mr-2" dense outlined label="任务名称" v-model="editItem['taskTitle']"></v-text-field>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3"> <v-col cols="12" xs="4" sm="4" md="4" xl="4" class="pl-0">
<v-text-field class="cus-v-input mr-2" dense outlined label="任务状态:running 执行中;deny 拒绝;end 结束" v-model="editItem['taskStatus']"></v-text-field> <span class="body-2">共{{ tableData.length }}条记录</span>
</v-col> </v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3"> <v-spacer></v-spacer>
<v-text-field class="cus-v-input mr-2" dense outlined label="表单" v-model="editItem['taskFormInput']"></v-text-field>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3"> <v-col cols="12" xs="8" sm="4" md="3" xl="3" class="pa-xs-0 pa-xs-2 col-sm-8-flex">
<v-text-field class="cus-v-input mr-2" dense outlined label="当前执行中节点ID" v-model="editItem['taskConfigId']"></v-text-field> <v-text-field v-model="searchInput" label="表格过滤" class="cus-v-input" dense filled single-line></v-text-field>
</v-col> </v-col>
</v-row>
<v-data-table fixed-header
:headers="headers"
:items="tableData"
:search="searchInput"
:footer-props="{ itemsPerPageOptions: [20, 40, 60, 100, -1] }"
:items-per-page="20"
mobile-breakpoint="0"
:loading="isTableLoading"
checkbox-color="success"
class="elevation-0 mt-0 mb-xs-4 flex-fill d-flex flex-column">
<!-- <template v-slot:item.level="{ item }">-->
<!-- {{ getConstantCollectionItemText('level', item.level) }}-->
<!-- </template>-->
<template v-slot:item.action="{ item }">
<v-btn small color="warning" class="mr-2" @click="doUiAction('toTaskHistory', {item})">
查看
</v-btn>
</template>
</v-data-table>
</v-card>
</v-container>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3"> <!-- 编辑抽屉 -->
<v-text-field class="cus-v-input mr-2" dense outlined label="执行线路id list: 逗号分隔" v-model="editItem['taskNextConfigList']"></v-text-field> <v-navigation-drawer v-model="isEditDrawerShow" absolute temporary right width="80%" hide-overlay class="elevation-24">
</v-col> <v-form v-model="isFormValid" v-if="isEditDrawerShow" ref="form" lazy-validation>
<v-row>
<span class="title pa-6">{{ currentClickButton.title }}信息</span>
<v-spacer></v-spacer>
<v-btn class="mt-7 mr-8 elevation-0" fab x-small @click="isEditDrawerShow = false">
<v-icon dark>mdi-close</v-icon>
</v-btn>
</v-row>
<v-row class="pa-0 ma-0 pa-xs-4 pb-xs-4 flex-none">
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3"> <v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="申请人" v-model="editItem['taskInitUser']"></v-text-field> <v-text-field class="cus-v-input mr-2" dense outlined label="任务ID" v-model="editItem['taskId']"></v-text-field>
</v-col> </v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3"> <v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="当前执行的处理人员,用逗号分隔" v-model="editItem['taskEditUserList']"></v-text-field> <v-text-field class="cus-v-input mr-2" dense outlined label="任务名称" v-model="editItem['taskTitle']"></v-text-field>
</v-col> </v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3"> <v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="所有相关人员,用逗号分隔" v-model="editItem['taskViewUserList']"></v-text-field> <v-text-field class="cus-v-input mr-2" dense outlined label="任务状态:running 执行中;deny 拒绝;end 结束" v-model="editItem['taskStatus']"></v-text-field>
</v-col> </v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3"> <v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="备注" v-model="editItem['taskComment']"></v-text-field> <v-text-field class="cus-v-input mr-2" dense outlined label="表单" v-model="editItem['taskFormInput']"></v-text-field>
</v-col> </v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3"> <v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="work flow流程JSON" v-model="editItem['workflowConfig']"></v-text-field> <v-text-field class="cus-v-input mr-2" dense outlined label="当前执行中节点ID" v-model="editItem['taskConfigId']"></v-text-field>
</v-col> </v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3"> <v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="任务创建人" v-model="editItem['createByUser']"></v-text-field> <v-text-field class="cus-v-input mr-2" dense outlined label="执行线路id list: 逗号分隔" v-model="editItem['taskNextConfigList']"></v-text-field>
</v-col> </v-col>
<!-- <v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">--> <v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<!-- &lt;!&ndash; 必填字段样式 demo :rules="requireRules" &ndash;&gt;--> <v-text-field class="cus-v-input mr-2" dense outlined label="申请人" v-model="editItem['taskInitUser']"></v-text-field>
<!-- <v-text-field class="cus-v-input mr-2" dense outlined label="学生ID" v-model="editItem.studentId" :rules="requireRules"></v-text-field>--> </v-col>
<!-- </v-col>-->
<!-- &lt;!&ndash; select 字段 demo &ndash;&gt;-->
<!-- <v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">-->
<!-- <v-select class="cus-v-input mr-2" dense outlined clearable label="班级ID" v-model="editItem.classId" :items="constantCollection.classId"></v-select>-->
<!-- </v-col>-->
<!-- &lt;!&ndash; 日期选择 demo &ndash;&gt;-->
<!-- <v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">-->
<!-- <v-menu class="cus-v-input mr-2" offset-y max-width="290">-->
<!-- <template v-slot:activator="{ on, attrs }">-->
<!-- <v-text-field class="cus-v-input mr-2" dense outlined v-on="on" label="出生日期" v-model="editItem.dateOfBirth"></v-text-field>-->
<!-- </template>-->
<!-- <v-date-picker color="success" elevation="20" v-model="editItem.dateOfBirth"></v-date-picker>-->
<!-- </v-menu>-->
<!-- </v-col>-->
</v-row>
<v-row class="justify-end pr-6">
<v-btn color="success" small @click="doUiAction(dialogSaveInfoAction)" :style="{width: isMobile ? 'calc(100% - 45px)' : '200px'}" :class="{'mb-2': isMobile, 'mr-4': isMobile}">保存</v-btn>
<v-btn class="ml-2" small @click="isEditDrawerShow = false" :style="{width: isMobile ? 'calc(100% - 45px)' : '200px'}" :class="{'mr-4': isMobile}">取消</v-btn>
</v-row>
</v-form>
</v-navigation-drawer>
</jh-layout> <v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="当前执行的处理人员,用逗号分隔" v-model="editItem['taskEditUserList']"></v-text-field>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="所有相关人员,用逗号分隔" v-model="editItem['taskViewUserList']"></v-text-field>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="备注" v-model="editItem['taskComment']"></v-text-field>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="work flow流程JSON" v-model="editItem['workflowConfig']"></v-text-field>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="任务创建人" v-model="editItem['createByUser']"></v-text-field>
</v-col>
<!-- <v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">-->
<!-- &lt;!&ndash; 必填字段样式 demo :rules="requireRules" &ndash;&gt;-->
<!-- <v-text-field class="cus-v-input mr-2" dense outlined label="学生ID" v-model="editItem.studentId" :rules="requireRules"></v-text-field>-->
<!-- </v-col>-->
<!-- &lt;!&ndash; select 字段 demo &ndash;&gt;-->
<!-- <v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">-->
<!-- <v-select class="cus-v-input mr-2" dense outlined clearable label="班级ID" v-model="editItem.classId" :items="constantCollection.classId"></v-select>-->
<!-- </v-col>-->
<!-- &lt;!&ndash; 日期选择 demo &ndash;&gt;-->
<!-- <v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">-->
<!-- <v-menu class="cus-v-input mr-2" offset-y max-width="290">-->
<!-- <template v-slot:activator="{ on, attrs }">-->
<!-- <v-text-field class="cus-v-input mr-2" dense outlined v-on="on" label="出生日期" v-model="editItem.dateOfBirth"></v-text-field>-->
<!-- </template>-->
<!-- <v-date-picker color="success" elevation="20" v-model="editItem.dateOfBirth"></v-date-picker>-->
<!-- </v-menu>-->
<!-- </v-col>-->
</v-row>
<v-row class="justify-end pr-6">
<v-btn color="success" small @click="doUiAction(dialogSaveInfoAction)" :style="{width: isMobile ? 'calc(100% - 45px)' : '200px'}" :class="{'mb-2': isMobile, 'mr-4': isMobile}">保存</v-btn>
<v-btn class="ml-2" small @click="isEditDrawerShow = false" :style="{width: isMobile ? 'calc(100% - 45px)' : '200px'}" :class="{'mr-4': isMobile}">取消</v-btn>
</v-row>
</v-form>
</v-navigation-drawer>
</jh-layout-v3>
{% endblock %} {% endblock %}
@@ -172,11 +180,11 @@ new Vue({
{text: "任务ID", value: "taskId", width: 120}, {text: "任务ID", value: "taskId", width: 120},
{text: "任务名称", value: "taskTitle", width: 120}, {text: "任务名称", value: "taskTitle", width: 120},
{text: "任务状态:running 执行中;deny 拒绝;end 结束", value: "taskStatus", width: 120}, {text: "任务状态", value: "taskStatus", width: 120},
{text: "当前执行中节点ID", value: "taskConfigId", width: 120}, {text: "当前执行中节点ID", value: "taskConfigId", width: 120},
{text: "申请人", value: "taskInitUser", width: 120}, {text: "申请人", value: "taskInitUser", width: 120},
{text: "当前执行的处理人员,用逗号分隔", value: "taskEditUserList", width: 120}, {text: "当前执行的处理人员", value: "taskEditUserList", width: 120},
{text: "所有相关人员,用逗号分隔", value: "taskViewUserList", width: 120}, {text: "所有相关人员", value: "taskViewUserList", width: 120},
{text: "备注", value: "taskComment", width: 120}, {text: "备注", value: "taskComment", width: 120},
{text: "任务创建人", value: "createByUser", width: 120}, {text: "任务创建人", value: "createByUser", width: 120},
{text: "操作者", value: "operationByUser", width: 120}, {text: "操作者", value: "operationByUser", width: 120},
-332
View File
@@ -1,332 +0,0 @@
{% extends 'template/jhTemplate.html'%}
{% block vue_template %}
<jh-layout>
<!-- 页面主要内容 -->
<v-container class="fullScreen d-flex flex-column pa-xs-0 pa-0">
<v-row class="ma-0 pa-xs-4 align-center flex-none pt-0 " :class="{'pa-4': !isMobile, 'pb-0': !isMobile, 'pa-2': isMobile}">
<v-col cols="12" xs="4" sm="4" md="4" xl="4" class="pl-0">
<v-btn color="success" small dark class="elevation-0 mr-2" @click="doUiAction('startInsertItem')">新增</v-btn>
<span class="body-2">共{{ tableDataFromBackend.length }}条记录</span>
</v-col>
<v-spacer></v-spacer>
<v-col cols="12" xs="8" sm="4" md="3" xl="3" class="pa-xs-0 pa-xs-2 col-sm-8-flex">
<v-text-field v-model="searchInput" label="表格过滤" class="cus-v-input" dense outlined></v-text-field>
</v-col>
</v-row>
<v-data-table
fixed-header
:headers="headers"
:items="tableDataFromBackend"
:search="searchInput"
:footer-props="{ itemsPerPageOptions: [20, 40, 60, 100, -1] }"
:items-per-page="20"
mobile-breakpoint="0"
:loading="isTableLoading"
checkbox-color="success"
class="elevation-0 mt-0 mb-xs-4 flex-fill d-flex flex-column">
<template v-slot:item.action="{ item }">
<v-btn small class="mr-2 success" @click="doUiAction('startUpdateItem', {item})">
修改
</v-btn>
<v-btn small class="mr-2 error" @click="doUiAction('deleteItem', {item})">
删除
</v-btn>
</template>
</v-data-table>
</v-container>
<v-navigation-drawer v-model="isCreateDrawerShow" absolute temporary right width="80%" hide-overlay
v-click-outside="{ closeConditional: () => !dialogIsOpen(), }"
class="elevation-24">
<v-form v-model="isFormValid" v-if="isCreateDrawerShow" ref="form" lazy-validation>
<v-row>
<span class="title pa-6">新增</span>
<v-spacer></v-spacer>
<v-btn class="mt-7 mr-8 elevation-0" fab x-small @click="isCreateDrawerShow = false">
<v-icon dark>mdi-close</v-icon>
</v-btn>
</v-row>
<v-row class="pa-0 ma-0 pa-xs-4 pb-xs-4 flex-none">
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="学生ID" v-model="createItem.studentId" :rules="requireRules"></v-text-field>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="班级ID" v-model="createItem.classId"></v-text-field>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="学生名字" v-model="createItem.name"></v-text-field>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="年级" v-model="createItem.level"></v-text-field>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="性别" v-model="createItem.gender"></v-text-field>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-menu class="cus-v-input mr-2" offset-y max-width="290">
<template v-slot:activator="{ on, attrs }">
<v-text-field class="cus-v-input mr-2" dense outlined v-on="on" label="出生日期" v-model="createItem.dateOfBirth"></v-text-field>
</template>
<v-date-picker color="success" elevation="20" v-model="createItem.dateOfBirth"></v-date-picker>
</v-menu>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="身高" v-model="createItem.bodyHeight"></v-text-field>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="学生状态" v-model="createItem.studentStatus"></v-text-field>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="备注" v-model="createItem.remarks"></v-text-field>
</v-col>
</v-row>
<v-row class="justify-end pr-6">
<v-btn class="ml-2 success" small @click="doUiAction('createItem')" :style="{width: isMobile ? 'calc(100% - 45px)' : '200px'}" :class="{'mb-2': isMobile, 'mr-4': isMobile}">新增</v-btn>
<v-btn class="ml-2" small @click="isCreateDrawerShow = false" :style="{width: isMobile ? 'calc(100% - 45px)' : '200px'}" :class="{'mr-4': isMobile}">取消</v-btn>
</v-row>
</v-form>
</v-navigation-drawer>
<v-navigation-drawer v-model="isUpdateDrawerShow" absolute temporary right width="80%" hide-overlay
v-click-outside="{ closeConditional: () => !dialogIsOpen(), }"
class="elevation-24">
<v-form v-model="isFormValid" v-if="isUpdateDrawerShow" ref="form" lazy-validation>
<v-row>
<span class="title pa-6">修改</span>
<v-spacer></v-spacer>
<v-btn class="mt-7 mr-8 elevation-0" fab x-small @click="isUpdateDrawerShow = false">
<v-icon dark>mdi-close</v-icon>
</v-btn>
</v-row>
<v-row class="pa-0 ma-0 pa-xs-4 pb-xs-4 flex-none">
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="学生ID" disabled v-model="updateItem.studentId" :rules="requireRules"></v-text-field>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="班级ID" v-model="updateItem.classId"></v-text-field>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="学生名字" v-model="updateItem.name"></v-text-field>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="年级" v-model="updateItem.level"></v-text-field>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="性别" v-model="updateItem.gender"></v-text-field>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-menu class="cus-v-input mr-2" offset-y max-width="290">
<template v-slot:activator="{ on, attrs }">
<v-text-field class="cus-v-input mr-2" dense outlined v-on="on" label="出生日期" v-model="updateItem.dateOfBirth"></v-text-field>
</template>
<v-date-picker color="success" elevation="20" v-model="updateItem.dateOfBirth"></v-date-picker>
</v-menu>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="身高" v-model="updateItem.bodyHeight"></v-text-field>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="学生状态" v-model="updateItem.studentStatus"></v-text-field>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="备注" v-model="updateItem.remarks"></v-text-field>
</v-col>
</v-row>
<v-row class="justify-end pr-6">
<v-btn class="ml-2 success" color="success" small @click="doUiAction('updateItem')" :style="{width: isMobile ? 'calc(100% - 45px)' : '200px'}" :class="{'mb-2': isMobile, 'mr-4': isMobile}">修改</v-btn>
<v-btn class="ml-2" small @click="isUpdateDrawerShow = false" :style="{width: isMobile ? 'calc(100% - 45px)' : '200px'}" :class="{'mr-4': isMobile}">取消</v-btn>
</v-row>
</v-form>
</v-navigation-drawer>
</jh-layout>
{% endblock %}
{% block vue_body %}
{% include 'layout/jhLayout.html' %}
{% include 'common/resetTableMaxHeight.html' %}
<script type="module">
new Vue({
el: '#app',
template: '#app-template',
vueComponent: 'page',
vuetify: new Vuetify(),
mixins: [window.jianghuUiActionMixins],
data: {
// 表格相关数据
isFormValid: true,
requireRules: [
v => !!v || 'This is required',
],
searchInput: null,
isTableLoading: true,
tableDataFromBackend: [],
headers: [
{text: "学生ID", value: "studentId", width: 120, class: 'fixed', cellClass: 'fixed'},
{text: "班级ID", value: "classId", width: 140},
{text: "学生名字", value: "name", width: 120},
{text: "年级", value: "level", width: 120},
{text: "性别", value: "gender", width: 120},
{text: "出生日期", value: "dateOfBirth", width: 120},
{text: "身高", value: "bodyHeight", width: 120},
{text: "学生状态", value: "studentStatus", width: 120},
{text: "备注", value: "remarks", width: 120},
{text: "操作者", value: "operationByUser", width: 120},
{text: "操作时间", value: "operationAt", width: 250},
{text: '操作', value: 'action', align: 'center', sortable: false, width: 200, class: 'fixed', cellClass: 'fixed'},
],
isCreateDrawerShow: false,
createItem: {},
isUpdateDrawerShow: false,
updateItem: {},
},
computed: {
isMobile() {
return window.innerWidth < 600;
},
},
watch: {},
mounted() {
this.doUiAction('refreshTableData');
},
methods: {
async refreshTableData() {
this.isTableLoading = true;
const result = await window.jianghuAxios({
data: {
appData: {
pageId: 'uiAction',
actionId: 'selectItemList',
actionData: {},
where: {},
orderBy: [{column: 'operationAt', order: 'desc'}]
}
}
});
this.tableDataFromBackend = result.data.appData.rows;
this.isTableLoading = false;
},
// ====================================Create Start===========================================
async clearCreateForm() {
this.createItem = {};
},
// validate
prepareValidate() {
return this.$refs.form.validate();
},
async openCreateDrawer() {
this.isCreateDrawerShow = true;
},
async prepareCreateItem() {
delete this.createItem.id;
},
async confirmCreateFormDialog() {
// retrun false 会中断后面的 uiAction function
return await window.confirmDialog({ title: "新增", content: "确定新增吗?" });
},
async doCreateItem() {
await window.vtoast.loading("新增学生");
await window.jianghuAxios({
data: {
appData: {
pageId: 'uiAction',
actionId: 'createItem',
actionData: this.createItem
}
}
})
await window.vtoast.success("新增学生成功");
},
async closeCreateDrawer() {
this.isCreateDrawerShow = false;
},
// ====================================Create End===========================================
// ====================================Update Start===========================================
async fillUpdateForm({ item }) {
this.updateItem = _.clone(item);
},
async openUpdateDrawer() {
this.isUpdateDrawerShow = true;
},
async prepareUpdateItem() {
// TODO: 对this.updateItem做一些数据处理
},
async confirmUpdateItemDialog() {
// retrun false 会中断后面的 uiAction function
return await window.confirmDialog({ title: "修改", content: "确定修改吗?" });
},
async doUpdateItem() {
const {id, ...actionData} = this.updateItem;
await window.vtoast.loading("修改学生");
await window.jianghuAxios({
data: {
appData: {
pageId: 'uiAction',
actionId: 'updateItem',
actionData: actionData,
where: {id}
}
}
})
await window.vtoast.success("修改学生成功");
},
async closeUpdateDrawer() {
this.isUpdateDrawerShow = false;
},
// ====================================Update End===========================================
// ====================================Create Start===========================================
async confirmDeleteItemDialog({ item }) {
if (!item || !item.id) {
window.vtoast.fail("数据异常");
return
}
return await window.confirmDialog({ title: "删除", content: "确定删除吗?" });
},
async doDeleteItem({ item }) {
const { id } = item;
await window.vtoast.loading("删除学生");
await window.jianghuAxios({
data: {
appData: {
pageId: 'uiAction',
actionId: 'deleteItem',
actionData: {},
where: { id }
}
}
});
await window.vtoast.success("删除学生成功");
},
// ====================================Update End===========================================
dialogIsOpen() {
return window.dialogIsOpen;
},
}
})
</script>
<style scoped>
</style>
{% endblock %}
-327
View File
@@ -1,327 +0,0 @@
{% extends 'template/jhTemplate.html'%}
{% block vue_template %}
<jh-layout>
<!-- 页面主要内容 -->
<v-container class="fullScreen d-flex flex-column pa-xs-0 pa-0">
<v-row class="ma-0 pa-xs-4 align-center flex-none pt-0 " :class="{'pa-4': !isMobile, 'pb-0': !isMobile, 'pa-2': isMobile}">
<v-col cols="12" xs="4" sm="4" md="4" xl="4" class="pl-0">
<v-btn color="success" small dark class="elevation-0 mr-2" @click="doUiAction('startCreateItem')">新增</v-btn>
<span class="body-2">共{{ tableData.length }}条记录</span>
</v-col>
<v-spacer></v-spacer>
<v-col cols="12" xs="8" sm="3" md="2" xl="2" class="pa-xs-0 pa-xs-2 col-sm-8-flex pl-0">
<classSelectDialog />
</v-col>
<v-col cols="12" xs="8" sm="3" md="2" xl="2" class="pa-xs-0 pa-xs-2 col-sm-8-flex pl-0">
<v-select class="cus-v-input mr-2" v-model="currentTableGenderType" :items="[{value: 'all', text: '全部'}, ...constantCollection.gender]"
prefix="性别:" dense item-text="text" item-value="value" dense outlined></v-select>
</v-col>
<v-col cols="12" xs="8" sm="4" md="3" xl="3" class="pa-xs-0 pa-xs-2 col-sm-8-flex">
<v-text-field v-model="searchInput" label="表格过滤" class="cus-v-input" dense outlined></v-text-field>
</v-col>
</v-row>
<v-data-table
fixed-header
:headers="headers"
:items="tableData"
:search="searchInput"
:footer-props="{ itemsPerPageOptions: [20, 40, 60, 100, -1] }"
:items-per-page="20"
mobile-breakpoint="0"
:loading="isTableLoading"
checkbox-color="success"
class="elevation-0 mt-0 mb-xs-4 flex-fill d-flex flex-column">
<template v-slot:item.gender="{ item }">
{{ getConstantCollectionItemText('gender', item.gender) }}
</template>
<template v-slot:item.level="{ item }">
{{ getConstantCollectionItemText('level', item.level) }}
</template>
<template v-slot:item.action="{ item }">
<v-btn small class="mr-2 success" @click="doUiAction('startUpdateItem', {item})">
修改
</v-btn>
<v-btn small class="mr-2 error" @click="doUiAction('deleteItem', {item})">
删除
</v-btn>
</template>
</v-data-table>
</v-container>
<!-- 编辑抽屉 -->
<v-navigation-drawer v-model="isEditDrawerShow" absolute temporary right width="80%" hide-overlay
v-click-outside="{ closeConditional: () => !dialogIsOpen(), }"
class="elevation-24">
<v-form v-model="isFormValid" v-if="isEditDrawerShow" ref="form" lazy-validation>
<v-row>
<span class="title pa-6">{{ editItem.id ? "修改" : "新增" }}信息</span>
<v-spacer></v-spacer>
<v-btn class="mt-7 mr-8 elevation-0" fab x-small @click="isEditDrawerShow = false">
<v-icon dark>mdi-close</v-icon>
</v-btn>
</v-row>
<v-row class="pa-0 ma-0 pa-xs-4 pb-xs-4 flex-none">
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="学生ID" v-model="editItem.studentId" :rules="requireRules"></v-text-field>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-select class="cus-v-input mr-2" dense outlined clearable label="班级ID" v-model="editItem.classId" :items="constantCollection.classId"></v-select>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="学生名字" v-model="editItem.name"></v-text-field>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-select class="cus-v-input mr-2" dense outlined clearable label="年级" v-model="editItem.level" :items="constantCollection.level"></v-select>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-select class="cus-v-input mr-2" dense outlined clearable label="性别" v-model="editItem.gender" :items="constantCollection.gender"></v-select>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-menu class="cus-v-input mr-2" offset-y max-width="290">
<template v-slot:activator="{ on, attrs }">
<v-text-field class="cus-v-input mr-2" dense outlined v-on="on" label="出生日期" v-model="editItem.dateOfBirth"></v-text-field>
</template>
<v-date-picker color="success" elevation="20" v-model="editItem.dateOfBirth"></v-date-picker>
</v-menu>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="身高" v-model="editItem.bodyHeight"></v-text-field>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-select class="cus-v-input mr-2" dense outlined clearable label="学生状态" v-model="editItem.studentStatus" :items="constantCollection.studentStatus"></v-select>
</v-col>
<v-col cols="12" sm="12" md="4" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="备注" v-model="editItem.remarks"></v-text-field>
</v-col>
</v-row>
<v-row class="justify-end pr-6">
<v-btn v-if="editItem.id" color="success" small @click="doUiAction('updateItem')" :style="{width: isMobile ? 'calc(100% - 45px)' : '200px'}" :class="{'mb-2': isMobile, 'mr-4': isMobile}">修改</v-btn>
<v-btn v-if="!editItem.id" small @click="doUiAction('insertItem')" :style="{width: isMobile ? 'calc(100% - 45px)' : '200px'}" :class="{'mb-2': isMobile, 'mr-4': isMobile}">创建</v-btn>
<v-btn class="ml-2" small @click="isEditDrawerShow = false" :style="{width: isMobile ? 'calc(100% - 45px)' : '200px'}" :class="{'mr-4': isMobile}">取消</v-btn>
</v-row>
</v-form>
</v-navigation-drawer>
</jh-layout>
{% endblock %}
{% block vue_body %}
<script>
window.registerData({
// 组件的 数据
classSelectDialog_shown: false,
classSelectDialog_title: "班级",
classSelectDialog_selected: null,
classSelectDialog_filterText: null,
classSelectDialog_dataList: [
{ value: "2021-01级-01班", text: "2021-01级-01班" },
{ value: "2021-01级-02班", text: "2021-01级-02班" },
{ value: "2021-02级-01班", text: "2021-02级-01班" },
{ value: "2021-02级-02班", text: "2021-02级-02班" },
{ value: "2021-03级-01班", text: "2021-03级-01班" },
{ value: "2021-03级-02班", text: "2021-03级-02班" },
],
// page的 数据
isFormValid: true,
requireRules: [
v => !!v || 'This is required',
],
constantCollection: {
gender: [{"value": "male", "text": "男"}, {"value": "female", "text": "女"}],
classId: [
{"value": "2021-01级-01班", "text": "2021-01级-01班"}, {"value": "2021-01级-02班", "text": "2021-01级-02班"},
{"value": "2021-02级-01班", "text": "2021-02级-01班"}, {"value": "2021-02级-02班", "text": "2021-02级-02班"},
{"value": "2021-03级-01班", "text": "2021-03级-01班"}, {"value": "2021-03级-02班", "text": "2021-03级-02班"}
],
level: [{"value": "01", "text": "一年级"}, {"value": "02", "text": "二年级"}, {"value": "03", "text": "三年级"}],
icType: [{"value": "身份证", "text": "身份证"}, {"value": "护照", "text": "护照"}],
enrollmentType: [{"value": "正常升学", "text": "正常升学"}, {"value": "借读", "text": "借读"}],
studentStatus: [{"value": "正常", "text": "正常"}, {"value": "退学", "text": "退学"}]
},
currentTableGenderType: 'all',
isEditDrawerShow: false,
searchInput: null,
isTableLoading: true,
tableDataFromBackend: [],
headers: [
{text: "学生ID", value: "studentId", width: 120, class: 'fixed', cellClass: 'fixed'},
{text: "班级ID", value: "classId", width: 140},
{text: "学生名字", value: "name", width: 120},
{text: "年级", value: "level", width: 120},
{text: "性别", value: "gender", width: 120},
{text: "出生日期", value: "dateOfBirth", width: 120},
{text: "身高", value: "bodyHeight", width: 120},
{text: "学生状态", value: "studentStatus", width: 120},
{text: "备注", value: "remarks", width: 120},
{text: "操作者", value: "operationByUser", width: 120},
{text: "操作时间", value: "operationAt", width: 250},
{text: '操作', value: 'action', align: 'center', sortable: false, width: 200, class: 'fixed', cellClass: 'fixed'},
],
editItem: {},
})
</script>
{% include 'layout/jhLayout.html' %}
{% include 'common/resetTableMaxHeight.html' %}
{% include 'component/classSelectDialog.html' %}
<script type="module">
new Vue({
el: '#app',
template: '#app-template',
vueComponent: 'page',
vuetify: new Vuetify(),
mixins: [window.jianghuUiActionMixins],
data: window.vueData,
computed: {
isMobile() {
return window.innerWidth < 600;
},
tableData() {
let dataList = this.tableDataFromBackend;
if (this.currentTableGenderType && this.currentTableGenderType !== 'all') {
dataList = dataList.filter(({gender}) => gender === this.currentTableGenderType);
}
if (this.classSelectDialog_selected) {
dataList = dataList.filter(({classId}) => classId === this.classSelectDialog_selected);
}
return dataList;
},
},
watch: {},
mounted() {
this.doUiAction('refreshTableData');
},
methods: {
async refreshTableData() {
this.isTableLoading = true;
const result = await window.jianghuAxios({
data: {
appData: {
pageId: 'uiActionComponent',
actionId: 'selectItemList',
actionData: {},
where: {},
orderBy: [{column: 'operationAt', order: 'desc'}]
}
}
});
this.tableDataFromBackend = result.data.appData.rows;
this.isTableLoading = false;
},
async clearItemData() {
this.editItem = {};
},
// validate
prepareValidate() {
return this.$refs.form.validate();
},
async openCreateDialog() {
this.isEditDrawerShow = true;
},
async prepareCreateItem() {
delete this.editItem.id;
},
async doCreateItem() {
await window.vtoast.loading("新增学生");
await window.jianghuAxios({
data: {
appData: {
pageId: 'uiActionComponent',
actionId: 'insertItem',
actionData: this.editItem
}
}
})
await window.vtoast.success("新增学生成功");
},
async closeDrawerShow() {
this.isEditDrawerShow = false;
},
async prepareItemData({item}) {
this.editItem = { ...item };
},
async openUpdateDialog() {
this.isEditDrawerShow = true;
},
async doUpdateItem() {
const {id, ...actionData} = this.editItem;
await window.vtoast.loading("修改学生");
await window.jianghuAxios({
data: {
appData: {
pageId: 'uiActionComponent',
actionId: 'updateItem',
actionData: actionData,
where: {id}
}
}
})
await window.vtoast.success("修改学生成功");
},
async confirmDeleteItemDialog() {
return await window.confirmDialog({ title: "删除", content: "确定删除吗?" });
},
async doDeleteItem() {
const {id} = this.editItem;
await window.vtoast.loading("删除学生");
await window.jianghuAxios({
data: {
appData: {
pageId: 'uiActionComponent',
actionId: 'deleteItem',
actionData: {},
where: {id: id}
}
}
});
await window.vtoast.success("删除学生成功");
},
getConstantCollectionItemText(key, _value) {
const constantCollectionItemFind = this.constantCollection[key].find(
({ value }) => value === _value
);
if (constantCollectionItemFind) {
return constantCollectionItemFind.text;
}
return _value;
},
dialogIsOpen() {
return window.dialogIsOpen;
},
}
})
</script>
<style scoped>
</style>
{% endblock %}
+100 -96
View File
@@ -1,108 +1,112 @@
{% extends 'template/jhTemplate.html'%} {% extends 'template/jhTemplateV3.html'%}
{% block vue_template %} {% block vue_template %}
<jh-layout-v3>
<jh-layout> <template slot="serverSearch">
<v-row class="ma-0 align-center flex-none pa-0" :class="{'pa-2': !isMobile, 'pa-2': isMobile}" style="justify-content: end">
<v-col :class="{'pt-2': isMobile, 'pl-0': isMobile, 'pr-0': !isMobile}" style="max-width: 77px">
<!-- 页面主要内容 --> <v-btn
<v-container class="fullScreen d-flex flex-column pa-xs-0 pa-0"> class="elevation-0"
<v-row class="ma-0 pa-xs-4 align-center flex-none pt-0 " :class="{'pa-4': !isMobile, 'pb-0': !isMobile, 'pa-2': isMobile}"> color="success"
dark
<v-col cols="12" xs="4" sm="4" md="4" xl="4" class="pl-0"> @click="doUiAction('refreshTableData')"
<v-btn color="success" small dark class="elevation-0 mr-2" @click="doUiAction('startCreateItem')">新增</v-btn> >
<span class="body-2">共{{ tableData.length }}条记录</span> 查询
</v-col>
<v-spacer></v-spacer>
<!-- <v-col cols="12" xs="8" sm="4" md="3" xl="3" class="pa-xs-0 pa-xs-2 col-sm-8-flex">
<v-text-field v-model="serverSearchInput.classId" label="班级ID" class="cus-v-input" :class="{'mr-2': !isMobile}" dense outlined></v-text-field>
</v-col> -->
<v-btn
class="elevation-0"
color="success"
dark
@click="doUiAction('refreshTableData')"
>
查询
</v-btn>
</v-row>
<v-data-table fixed-header
:headers="headers"
:items="tableData"
:search="searchInput"
:footer-props="{ itemsPerPageOptions: [20, 40, 60, 100, -1] }"
:items-per-page="20"
mobile-breakpoint="0"
:loading="isTableLoading"
checkbox-color="success"
class="elevation-0 mt-0 mb-xs-4 flex-fill d-flex flex-column">
<!-- <template v-slot:item.level="{ item }">-->
<!-- {{ getConstantCollectionItemText('level', item.level) }}-->
<!-- </template>-->
<template v-slot:item.action="{ item }">
<v-btn small class="mr-2" :class="tableButton.color" v-for="tableButton of tableButtonList" @click="doUiAction(tableButton.action, {item})">
{{ tableButton.text }}
</v-btn>
</template>
</v-data-table>
</v-container>
<v-dialog v-model="dialog" fullscreen hide-overlay persistent transition="dialog-bottom-transition">
<v-card>
<v-toolbar dark color="primary">
<v-btn icon dark @click="dialog = false">
<v-icon>mdi-close</v-icon>
</v-btn>
<v-toolbar-title>流程编辑</v-toolbar-title>
<v-spacer></v-spacer>
<v-toolbar-items>
<v-btn dark text @click="doUiAction(dialogSaveInfoAction)">
保存
</v-btn> </v-btn>
</v-toolbar-items> </v-col>
</v-toolbar> </v-row>
<v-list three-line subheader> </template>
<v-row class="pa-0 ma-0 pa-xs-4 pb-xs-4 flex-none">
<v-col cols="12" sm="12" md="3" xl="3" class="pa-xs-0 pb-xs-4 pb-3"> <!-- 页面主要内容 -->
<v-text-field class="cus-v-input mr-2" dense outlined label="流程名" v-model="editItem['workflowName']" :rules="requireRules"> <v-container class="fullScreen d-flex flex-column pa-xs-0 pa-0">
</v-text-field> <v-card>
<v-row class="ma-0 pa-xs-4 align-center flex-none pt-0 " :class="{'pa-4': !isMobile, 'pb-0': !isMobile, 'pa-2': isMobile}">
<v-col cols="12" xs="4" sm="4" md="4" xl="4" class="pl-0">
<v-btn color="success" small dark class="elevation-0 mr-2" @click="doUiAction('startCreateItem')">新增</v-btn>
<span class="body-2">共{{ tableData.length }}条记录</span>
</v-col> </v-col>
<v-col cols="12" sm="12" md="3" xl="3" class="pa-xs-0 pb-xs-4 pb-3"> <v-spacer></v-spacer>
<v-text-field class="cus-v-input mr-2" dense outlined label="分类" v-model="editItem['workflowCategory']" :rules="requireRules">
</v-text-field>
</v-col>
<v-col cols="12" sm="12" md="3" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<v-text-field class="cus-v-input mr-2" dense outlined label="备注" v-model="editItem['workflowRemark']">
</v-text-field>
</v-col>
</v-row> </v-row>
</v-list> <v-data-table fixed-header
<v-divider></v-divider> :headers="headers"
<v-list three-line subheader> :items="tableData"
<v-subheader>模板设置</v-subheader> :search="searchInput"
<v-list-item> :footer-props="{ itemsPerPageOptions: [20, 40, 60, 100, -1] }"
<tpl-form-design v-if="dialog" :form="editItem.workflowForm"> :items-per-page="20"
</tpl-form-design> mobile-breakpoint="0"
</v-list-item> :loading="isTableLoading"
</v-list> checkbox-color="success"
<v-list three-line subheader> class="elevation-0 mt-0 mb-xs-4 flex-fill d-flex flex-column">
<v-subheader>流程设置</v-subheader> <!-- <template v-slot:item.level="{ item }">-->
<v-list-item> <!-- {{ getConstantCollectionItemText('level', item.level) }}-->
<process-flow v-if="dialog" :data="editItem.workflowConfig" :user="constantCollection.userList" :group="constantCollection.groupList" :tpl="constantCollection.workflowFormList"> <!-- </template>-->
</process-flow> <template v-slot:item.action="{ item }">
</v-list-item> <v-btn small class="mr-2" :class="tableButton.color" v-for="tableButton of tableButtonList" @click="doUiAction(tableButton.action, {item})">
</v-list> {{ tableButton.text }}
</v-card> </v-btn>
</v-dialog> </template>
</v-data-table>
</v-card>
</v-container>
</jh-layout> <v-dialog v-model="dialog" fullscreen hide-overlay persistent transition="dialog-bottom-transition">
<v-card>
<v-toolbar dark color="primary">
<v-btn icon dark @click="dialog = false" class="ml-2">
<v-icon>mdi-close</v-icon>
</v-btn>
<v-toolbar-title>流程编辑</v-toolbar-title>
<v-spacer></v-spacer>
<v-toolbar-items>
<v-btn dark text @click="doUiAction(dialogSaveInfoAction)">
保存
</v-btn>
</v-toolbar-items>
</v-toolbar>
<v-list three-line subheader>
<v-row class="pa-0 ma-0 pa-xs-4 pb-xs-4 flex-none">
<v-col cols="12" sm="12" md="3" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<span style="color: #3F4254;" :style="{'line-height': isMobile ? '20px' : '42px', 'font-weight': isMobile ? 400 : 500}">流程名</span>
<v-text-field class="cus-v-input mr-2" dense filled single-line label="流程名" v-model="editItem['workflowName']" :rules="requireRules">
</v-text-field>
</v-col>
<v-col cols="12" sm="12" md="3" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<span style="color: #3F4254;" :style="{'line-height': isMobile ? '20px' : '42px', 'font-weight': isMobile ? 400 : 500}">分类</span>
<v-text-field class="cus-v-input mr-2" dense filled single-line label="分类" v-model="editItem['workflowCategory']" :rules="requireRules">
</v-text-field>
</v-col>
<v-col cols="12" sm="12" md="3" xl="3" class="pa-xs-0 pb-xs-4 pb-3">
<span style="color: #3F4254;" :style="{'line-height': isMobile ? '20px' : '42px', 'font-weight': isMobile ? 400 : 500}">备注</span>
<v-text-field class="cus-v-input mr-2" dense filled single-line label="备注" v-model="editItem['workflowRemark']">
</v-text-field>
</v-col>
</v-row>
</v-list>
<v-divider></v-divider>
<v-list three-line subheader>
<v-subheader>模板设置</v-subheader>
<v-list-item>
<tpl-form-design v-if="dialog" :form="editItem.workflowForm">
</tpl-form-design>
</v-list-item>
</v-list>
<v-list three-line subheader>
<v-subheader>流程设置</v-subheader>
<v-list-item>
<process-flow v-if="dialog" :data="editItem.workflowConfig" :user="constantCollection.userList" :group="constantCollection.groupList" :tpl="constantCollection.workflowFormList">
</process-flow>
</v-list-item>
</v-list>
</v-card>
</v-dialog>
</jh-layout-v3>
{% endblock %} {% endblock %}
+1 -1
View File
@@ -21,7 +21,7 @@ module.exports = appInfo => {
appLogo: `${appId}/public/img/logo.png`, appLogo: `${appId}/public/img/logo.png`,
appType: 'single', appType: 'single',
appDirectoryLink: '/', appDirectoryLink: '/',
indexPage: `/${appId}/page/manual`, indexPage: `/${appId}/page/workflowManagement`,
loginPage: `/${appId}/page/login`, loginPage: `/${appId}/page/login`,
helpPage: `/${appId}/page/help`, helpPage: `/${appId}/page/help`,
uploadDir, uploadDir,
+565 -467
View File
File diff suppressed because it is too large. Load diff
+1 -1
View File
@@ -9,7 +9,7 @@
}, },
"dependencies": { "dependencies": {
"egg": "^2.15.1", "egg": "^2.15.1",
"@jianghujs/jianghu": "3.0.4", "@jianghujs/jianghu": "3.0.7",
"egg-scripts": "^2.11.0" "egg-scripts": "^2.11.0"
}, },
"devDependencies": { "devDependencies": {