提交 5b62ab9b 编写于 作者: 刘英杰's avatar 刘英杰

Merge remote-tracking branch 'origin/pc'

流水线 #23385 已通过 ,包含阶段
in 1 minute 和 32 second
因为 它太大了无法显示 源差异 。您可以改为 查看blob。
export * from "./postApiCommonFileUpload";
export * from "./getApiCommonGetCommentContentSelect";
export * from "./getApiCommonGetPersonByCondiction";
export * from "./getApiCommonGetRoleSelect";
export * from "./getApiCommonGetPlaceTypeSelect";
export * from "./getApiCommonGetPlaceSelect";
export * from "./getApiCommonGetKeyByActivityList";
export * from "./getApiCommonGetSexSelect";
export * from "./postApiCommonFileUpload";
export * from "./getApiCommonGetCommentContentSelect";
export * from "./getApiCommonGetPersonByCondiction";
export * from "./getApiCommonGetRoleSelect";
export * from "./getApiCommonGetPlaceTypeSelect";
export * from "./getApiCommonGetPlaceSelect";
export * from "./getApiCommonGetKeyByActivityList";
export * from "./getApiCommonGetSexSelect";
......@@ -8,6 +8,7 @@ export declare function getApiGetTokenInfo(): import("axios").AxiosPromise<{
msg: string;
msg_detail: string;
response: {
userid: string;
cardNumber: string;
name: string;
type: any;
......
import { type UserType } from "../../interface";
/**
* WX单点
* /api/sso/wx
......@@ -20,9 +19,6 @@ export declare function getApiSsoWx(params: GetApiSsoWxParams): import("axios").
};
}>;
interface GetApiSsoWxParams {
userType: UserType;
code: string;
sign: string;
timestamp: string;
token: string;
}
export {};
......@@ -5,10 +5,7 @@ import request from "@/plugins/request";
*/
export function getApiSsoWx(params) {
const paramsInput = {
...params.userType,
code: params.code,
sign: params.sign,
timestamp: params.timestamp,
token: params.token,
};
return request.get(`/api/sso/wx`, {
params: paramsInput,
......
export * from "./getApiLoginCheckLoginTest";
export * from "./getApiSsoPc";
export * from "./getApiSsoWx";
export * from "./getApiSsoWxsan";
export * from "./getApiGetTokenInfo";
export * from "./getApiRefreshToken";
export * from "./getApiLoginCheckLoginTest";
export * from "./getApiSsoPc";
export * from "./getApiSsoWx";
export * from "./getApiSsoWxsan";
export * from "./getApiGetTokenInfo";
export * from "./getApiRefreshToken";
......@@ -3,18 +3,24 @@
* /api/PlaceType/GetPlaceTypeInfo
*/
export declare function getApiPlaceTypeGetPlaceTypeInfo(params: GetApiPlaceTypeGetPlaceTypeInfoParams): import("axios").AxiosPromise<{
id: string;
place_type_name: string;
time_split: number;
service_interval_time: string;
instructions: string;
read_time: string;
is_enable: number;
is_del: number;
createby: string;
createtime: string;
modifyby: string;
modify_time: string;
code: number;
status: string;
msg: string;
msg_detail: string;
response: {
id: string;
place_type_name: string;
time_split: number;
service_interval_time: string;
instructions: string;
read_time: number;
is_enable: number;
is_del: number;
createby: string;
createtime: string;
modifyby: string;
modify_time: string;
};
}>;
interface GetApiPlaceTypeGetPlaceTypeInfoParams {
id?: string;
......
......@@ -33,7 +33,7 @@ export declare function getApiPlaceTypeGetPlaceTypeList(params: GetApiPlaceTypeG
time_split: number;
service_interval_time: string;
instructions: string;
read_time: string;
read_time: number;
is_enable: number;
is_del: number;
createby: string;
......
export * from "./getApiPlaceTypeGetPlaceTypeList";
export * from "./getApiPlaceTypeGetPlaceTypeInfo";
export * from "./postApiPlaceTypePlaceTypeSave";
export * from "./getApiPlaceTypePlaceTypeDel";
export * from "./getApiPlaceTypePlaceTypeEnable";
export * from "./getApiPlaceTypeGetPlaceTypeList";
export * from "./getApiPlaceTypeGetPlaceTypeInfo";
export * from "./postApiPlaceTypePlaceTypeSave";
export * from "./getApiPlaceTypePlaceTypeDel";
export * from "./getApiPlaceTypePlaceTypeEnable";
export * from "./Commodity";
export * from "./Common";
export * from "./Key";
export * from "./Login";
export * from "./Place";
export * from "./PlaceType";
export * from "./Role";
export * from "./SysConfig";
export * from "./Commodity";
export * from "./Common";
export * from "./Key";
export * from "./Login";
export * from "./Place";
export * from "./PlaceType";
export * from "./Role";
export * from "./SysConfig";
......@@ -4,7 +4,7 @@ export interface PlaceType {
time_split?: number;
service_interval_time?: string;
instructions?: string;
read_time?: string;
read_time?: number;
is_enable?: number;
is_del?: number;
createby?: string;
......
import { type UserType, type RoleAndPowerViewModel } from "../../interface";
export interface UserJwtViewModel {
userid?: string;
cardNumber?: string;
name?: string;
type?: UserType;
......
export * from "./apiTypes/Commodity";
export * from "./apiTypes/CommodityListMessageModel";
export * from "./apiTypes/Option";
export * from "./apiTypes/TableTitle";
export * from "./apiTypes/CommodityMessageModel";
export * from "./apiTypes/CommodityMessageModelPageModel";
export * from "./apiTypes/Int64MessageModel";
export * from "./apiTypes/PlaceFile";
export * from "./apiTypes/PlaceFileMessageModel";
export * from "./apiTypes/SelectResponses";
export * from "./apiTypes/SelectResponsesListMessageModel";
export * from "./apiTypes/PersonResponse";
export * from "./apiTypes/KeyResponse";
export * from "./apiTypes/KeyResponseListMessageModel";
export * from "./apiTypes/KeySearchRequest";
export * from "./apiTypes/Key";
export * from "./apiTypes/KeyMessageModel";
export * from "./apiTypes/KeyMessageModelPageModel";
export * from "./apiTypes/KeyViewModel";
export * from "./apiTypes/KeyViewModelMessageModel";
export * from "./apiTypes/StringMessageModel";
export * from "./apiTypes/KeyOperateRequest";
export * from "./apiTypes/KeyTrackSearchRequest";
export * from "./apiTypes/KeyTrack";
export * from "./apiTypes/KeyTrackMessageModel";
export * from "./apiTypes/KeyTrackMessageModelPageModel";
export * from "./apiTypes/TokenViewModel";
export * from "./apiTypes/ComplexTokenViewModel";
export * from "./apiTypes/ComplexTokenViewModelMessageModel";
......@@ -10,12 +33,20 @@ export * from "./apiTypes/RoleAndPowerViewModel";
export * from "./apiTypes/UserJwtViewModel";
export * from "./apiTypes/UserJwtViewModelMessageModel";
export * from "./apiTypes/TokenViewModelMessageModel";
export * from "./apiTypes/Option";
export * from "./apiTypes/TableTitle";
export * from "./apiTypes/PlaceSearchRequest";
export * from "./apiTypes/Place";
export * from "./apiTypes/PlaceMessageModel";
export * from "./apiTypes/PlaceMessageModelPageModel";
export * from "./apiTypes/PlaceViewModel";
export * from "./apiTypes/PlaceViewModelMessageModel";
export * from "./apiTypes/PlaceRequest";
export * from "./apiTypes/PlaceTimeViewModel";
export * from "./apiTypes/PlaceTimeViewModelListMessageModel";
export * from "./apiTypes/PlaceOutResponse";
export * from "./apiTypes/PlaceOutResponseMessageModel";
export * from "./apiTypes/PlaceType";
export * from "./apiTypes/PlaceTypeMessageModel";
export * from "./apiTypes/PlaceTypeMessageModelPageModel";
export * from "./apiTypes/StringMessageModel";
export * from "./apiTypes/RolePower";
export * from "./apiTypes/RolePowerListMessageModel";
export * from "./apiTypes/PlaceSysconfig";
......
export * from "./apiTypes/Commodity";
export * from "./apiTypes/CommodityListMessageModel";
export * from "./apiTypes/Option";
export * from "./apiTypes/TableTitle";
export * from "./apiTypes/CommodityMessageModel";
export * from "./apiTypes/CommodityMessageModelPageModel";
export * from "./apiTypes/Int64MessageModel";
export * from "./apiTypes/PlaceFile";
export * from "./apiTypes/PlaceFileMessageModel";
export * from "./apiTypes/SelectResponses";
export * from "./apiTypes/SelectResponsesListMessageModel";
export * from "./apiTypes/PersonResponse";
export * from "./apiTypes/KeyResponse";
export * from "./apiTypes/KeyResponseListMessageModel";
export * from "./apiTypes/KeySearchRequest";
export * from "./apiTypes/Key";
export * from "./apiTypes/KeyMessageModel";
export * from "./apiTypes/KeyMessageModelPageModel";
export * from "./apiTypes/KeyViewModel";
export * from "./apiTypes/KeyViewModelMessageModel";
export * from "./apiTypes/StringMessageModel";
export * from "./apiTypes/KeyOperateRequest";
export * from "./apiTypes/KeyTrackSearchRequest";
export * from "./apiTypes/KeyTrack";
export * from "./apiTypes/KeyTrackMessageModel";
export * from "./apiTypes/KeyTrackMessageModelPageModel";
export * from "./apiTypes/TokenViewModel";
export * from "./apiTypes/ComplexTokenViewModel";
export * from "./apiTypes/ComplexTokenViewModelMessageModel";
......@@ -10,12 +33,20 @@ export * from "./apiTypes/RoleAndPowerViewModel";
export * from "./apiTypes/UserJwtViewModel";
export * from "./apiTypes/UserJwtViewModelMessageModel";
export * from "./apiTypes/TokenViewModelMessageModel";
export * from "./apiTypes/Option";
export * from "./apiTypes/TableTitle";
export * from "./apiTypes/PlaceSearchRequest";
export * from "./apiTypes/Place";
export * from "./apiTypes/PlaceMessageModel";
export * from "./apiTypes/PlaceMessageModelPageModel";
export * from "./apiTypes/PlaceViewModel";
export * from "./apiTypes/PlaceViewModelMessageModel";
export * from "./apiTypes/PlaceRequest";
export * from "./apiTypes/PlaceTimeViewModel";
export * from "./apiTypes/PlaceTimeViewModelListMessageModel";
export * from "./apiTypes/PlaceOutResponse";
export * from "./apiTypes/PlaceOutResponseMessageModel";
export * from "./apiTypes/PlaceType";
export * from "./apiTypes/PlaceTypeMessageModel";
export * from "./apiTypes/PlaceTypeMessageModelPageModel";
export * from "./apiTypes/StringMessageModel";
export * from "./apiTypes/RolePower";
export * from "./apiTypes/RolePowerListMessageModel";
export * from "./apiTypes/PlaceSysconfig";
......
<template>
<!-- 通用新增、编辑Modal -->
<div>
<Modal
v-model="show"
:title="modalTitle"
:width="width"
:before-close="beforeClose">
<template>
<!-- Modal全局loading -->
<Spin size="large" fix v-if="loading"></Spin>
<Form
ref="form"
label-colon
:model="formData"
:rules="rules"
:label-width="formLabelWidth">
<Row>
<Col v-bind="grid" v-for="item in formItem.filter(a => a.type != 'file')" :key="item.id">
<FormItem :label="item.name" :prop="item.name">
<Input
v-if="item.type == 'input'"
v-model="formData[item.id]"
clearable
placeholder="请输入"/>
<Select
v-else-if="item.type == 'select'"
v-model="formData[item.id]"
clearable>
<Option
v-for="it in item.optList"
:key="it.value"
:value="it.value">{{ it.label }}</Option>
</Select>
<Switch
v-else-if="item.type == 'switch'"
v-model="formData[item['id']]"/>
</FormItem>
</Col>
<!-- 文件类型 -->
<Col span="12" v-for="(item, index) in formItem.filter(a => a.type == 'file')" :key="item.id">
<FormItem :label="item.name" :prop="item.name">
<Upload
multiple
action="#"
:before-upload="(file) => uploadFile(file, item.id, index)">
<Button
icon="ios-cloud-upload-outline"
:loading="uploadBtLoading[index]">选择文件</Button>
</Upload>
</FormItem>
</Col>
</Row>
</Form>
</template>
<template #footer>
<Button @click="onCancel">取消</Button>
<Button type="primary" @click="onSubmit">提交</Button>
</template>
</Modal>
</div>
</template>
<script>
export default {
props: {
// Modal全局loading
loading: { type: Boolean, default: false },
// 表单项、规则、label宽度
formItem: { type: Array, require: true },
formRule: { type: Object, default: () => {} },
formLabelWidth: { type: Number, default: 80 },
// Modal显示value
value: { type: Boolean, require: true },
// Modal宽度
width: { default: '520' },
},
watch: {
value(newVal) {
this.show = newVal
},
},
data() {
return {
// Modal显示value
show: this.value,
modalTitle: '编辑',
// 表单数据
formData: {},
rules: {},
grid: {
xl: 12,
lg: 12,
md: 24,
sm: 24,
xs: 24
},
// 需要转换开关的formItem列表
switchTransformList: [],
// 上传按钮loading
uploadBtLoading: [],
}
},
computed: {},
created() {},
mounted() {},
methods: {
/**
* Modal打开初始化
* @param {String} addOrEdit add.新增 edit.编辑
*/
modalInit(addOrEdit = 'add', row) {
if (addOrEdit == 'add') {
this.modalTitle = '新增'
this.formData = row ? Object.assign({}, row) : {}
} else if (addOrEdit == 'edit') {
this.modalTitle = '编辑'
this.formData = Object.assign({}, row)
// switch值转换
this.switchTransformList = this.formItem.filter(a => a.type == 'switch').map(a => a.id)
this.switchTransformList.forEach(a => {
this.formData[a] = this.formData[a] == 1
})
}
// 设置上传按钮loading
this.formItem.forEach(a => {
if (a.type == 'file') {
this.uploadBtLoading.push(false)
}
})
},
// 上传文件
uploadFile(file, id, i) {
this.uploadBtLoading[i] = true
let fd = new FormData()
fd.append('file', file)
this.asc.postApiCommonFileUpload(file).then(res => {
console.log('上传后', res)
})
return false
},
// Modal关闭前回调
beforeClose() {
this.$emit('onClose')
},
// 取消
onCancel() {
this.$emit('onCancel')
this.$emit('onClose')
},
// 提交
onSubmit() {
let obj = Object.assign({}, this.formData)
this.switchTransformList.forEach(a => {
obj[a] = obj[a] ? 1 : 0
})
this.$emit('onSubmit', obj)
},
},
}
</script>
<style scoped lang="less">
.ivu-form-item{
padding-right: 15px;
}
</style>
\ No newline at end of file
<template>
<!-- 通用Table -->
<div>
<Table
class="ivu-mt"
:columns="tableColumns"
:data="tableData"
:loading="tableLoading"
:size="tableSize"
>
<template slot-scope="{ row }" slot="status">
<Switch size="large" v-model="row.status" :true-value="1" :false-value="0" @on-change="switchChange(row)">
<span type="md-checkmark" slot="open" >启用</span>
<span type="md-close" slot="close">停用</span>
</Switch>
</template>
<template slot-scope="{ row }" slot="action">
<Button type="info" size="small" @click="edit(row)">编辑</Button>
<Poptip confirm transfer title="是否确认删除?" @on-ok="del(row)">
<Button type="error" size="small" style="margin-left: 20px">删除</Button>
</Poptip>
</template>
</Table>
<div class="ivu-text-center ivu-mt">
<Page
:total="dataCount"
:current.sync="pageIndex"
:page-size="pageSize"
:page-size-opts="pageSizeOpts"
show-total
show-sizer
@on-change="handleChangePage"
@on-page-size-change="handleChangePageSize"
/>
</div>
</div>
</template>
<script>
export default {
props: {
tableColumns: { type: Array, require: true },
tableData: { type: Array, require: true },
tableLoading: { type: Boolean, default: false },
tableSize: { type: String, default: 'default' },
dataCount: { type: Number, require: true },
pageIndex: { type: Number, require: true },
pageSize: { type: Number, require: true },
pageSizeOpts: { type: Array, default: () => [10, 20, 50, 100] },
},
data() {
return {}
},
computed: {},
created() {},
mounted() {},
methods: {
// 编辑行
edit(row) {
this.$emit('rowEdit', row)
},
// 删除行
del(row) {
this.$emit('rowDelete', row)
},
// 翻页
handleChangePage(val) {
this.$emit('onPageChange', val)
},
// 更改每页长度
handleChangePageSize(val) {
this.$emit('onPageSizeChange', val)
},
},
}
</script>
<style scoped lang="less">
</style>
\ No newline at end of file
<template>
<!-- 场地管理 -->
<div>
<Card ref="card">
<TableFrom />
<Button type="primary" class="ivu-ml-8" @click="add"><Icon type="md-add"/>新增</Button>
<Table
:columns="columns"
:data="tableData"
class="ivu-mt"
:loading="loading"
:size="tableSize"
>
<template slot-scope="{ row }" slot="status">
<Switch size="large" v-model="row.status" :true-value="1" :false-value="0" @on-change="switchChange(row)">
<span type="md-checkmark" slot="open" >启用</span>
<span type="md-close" slot="close">停用</span>
</Switch>
</template>
<template slot-scope="{ row }" slot="action">
<Button type="info" @click="edit(row)">编辑</Button>
<Poptip confirm transfer title="你确定删除吗?" @on-ok="del(row)" @on-cancel="cancel">
<Button type="error" style="margin-left: 20px">删除</Button>
</Poptip>
</template>
</Table>
<div class="ivu-text-center ivu-mt">
<Page
:total="total"
:current.sync="params.pageIndex"
show-total
show-sizer
:page-size="params.pageSize"
@on-change="handleChangePage"
@on-page-size-change="handleChangePageSize"
/>
</div>
<CTable
:tableColumns="tableColumns.filter(a => a.show)"
:tableData="tableData"
:tableLoading="tableLoading"
:tableSize="tableSize"
:dataCount="dataCount"
:pageIndex="params.pageIndex"
:pageSize="params.pageSize"
@rowEdit="rowEdit"
@rowDelete="rowDelete"
@onPageChange="onPageChange"
@onPageSizeChange="onPageSizeChange"></CTable>
<!-- 新增修改 -->
<AddEditDrawer ref="addEdit" @getData="getData"/>
<!-- <AddEditDrawer ref="addEdit" @getData="getData"/> -->
<CEditModal
ref="ceditmodal"
v-model="editModalshow"
:formItem="formItem"
:loading="editModalLoading"
:formLabelWidth="100"
:width="800"
@onClose="editModalshow = false"
@onSubmit="modalSubmit"></CEditModal>
</Card>
</div>
</template>
<script>
import AddEditDrawer from './component/addEditDrawer.vue'
import TableFrom from './component/table-from.vue'
export default {
name: 'list',
components: { AddEditDrawer, TableFrom },
data(){
return {
grid: {
xl: 8,
lg: 12,
md: 24,
sm: 24,
xs: 24
},
columns:[
{
title: '序号',
type: 'index',
align: 'center',
show: true,
width: 80
},
{
title: '班级编号',
key: 'class_code',
align: 'center',
show: true,
minWidth: 100,
},
{
title: '班级名称',
key: 'class_name',
align: 'center',
show: true,
minWidth: 150,
},
{
title: '年级',
key: 'grade',
align: 'center',
show: true,
minWidth: 100,
},
{
title: '培养层次',
key: 'training',
align: 'center',
show: true,
minWidth: 120,
},
{
title: '辅导员工号',
key: 'counselor_card',
align: 'center',
show: true,
minWidth: 150,
},
{
title: '辅导员姓名',
key: 'counselor_name',
align: 'center',
show: true,
minWidth: 120,
},
{
title: '班主任工号',
key: 'head_teacher_card',
align: 'center',
show: true,
minWidth: 150,
},
{
title: '班主任姓名',
key: 'head_teacher_name',
align: 'center',
show: true,
minWidth: 120,
},
{
title: '院系名称',
key: 'college_name',
align: 'center',
show: true,
minWidth: 200,
},
{
title: '状态',
key: 'status',
align: 'center',
slot: 'status',
show: true,
minWidth: 130,
},
{
title: '操作',
align: 'center',
minWidth: 180,
fixed: 'right',
show: true,
slot: 'action'
}
],
import AddEditDrawer from './component/addEditDrawer.vue'
import TableFrom from './component/table-from.vue'
import CTable from '@/components/CTable.vue'
import CEditModal from '@/components/CEditModal.vue'
export default {
name: 'list',
components: { AddEditDrawer, TableFrom, CTable, CEditModal },
data(){
return {
grid: {
xl: 8,
lg: 12,
md: 24,
sm: 24,
xs: 24
},
tableColumns:[
{ type: 'index', title: '序号', align: 'center', width: 80, show: true, fixed: 'left' },
{ key: 'place_code', title: '编号', align: 'center', minWidth: 150, show: true },
{ key: 'place_name', title: '场地名称', align: 'center', minWidth: 150, show: true },
{ key: 'place_type_id', title: '场地类型id', align: 'center', minWidth: 150, show: false },
{ key: 'place_type_name', title: '场地类型名称', align: 'center', minWidth: 150, show: true },
{ key: 'place_address', title: '场地地址', align: 'center', minWidth: 300, show: true },
{ key: 'building', title: '楼栋', align: 'center', minWidth: 150, show: true },
{ key: 'floor', title: '楼', align: 'center', minWidth: 80, show: true },
{ key: 'room', title: '房间', align: 'center', minWidth: 80, show: true },
{ key: 'acreage', title: '面积', align: 'center', minWidth: 80, show: true },
{ key: 'capacity', title: '容纳人数', align: 'center', minWidth: 100, show: true },
{ key: 'threshold', title: '最低申请人数', align: 'center', minWidth: 130, show: true },
{ key: 'sex', title: '性别', align: 'center', minWidth: 80, show: true },
{ key: 'key_num', title: '钥匙库存数', align: 'center', minWidth: 150, show: true },
{ key: 'key_lend_num', title: '钥匙已借出数', align: 'center', minWidth: 150, show: true },
{ key: 'key_loanable_num', title: '钥匙可借出数', align: 'center', minWidth: 150, show: true },
{ key: 'description', title: '场地描述', align: 'center', minWidth: 150, show: true },
{ key: 'file_id', title: '附件', align: 'center', minWidth: 150, show: false },
{ key: 'is_enable', title: '启用', align: 'center', minWidth: 150, show: true },
{ slot: 'action', title: '操作', align: 'center', minWidth: 150, show: true, fixed: 'right' },
],
tableLoading: false,
tableData:[],
tableSize: 'default',
tableFullscreen: false,
dataCount: 0,
collapse: false,
params:{
pageIndex: 1,
pageSize: 10,
place_type_id: '',
place_code_name: '',
sex: '',
},
editModalshow: false,
editModalLoading: false,
// 新增编辑表单项
formItem: [
{ id: 'place_code', name: '编号', type: 'input', require: false, optList: [] },
{ id: 'place_name', name: '场地名称', type: 'input', require: false, optList: [] },
// { id: 'place_type_id', name: '场地类型id', type: 'input', require: false, optList: [] },
{ id: 'place_type_name', name: '场地类型名称', type: 'input', require: false, optList: [] },
{ id: 'place_address', name: '场地地址', type: 'input', require: false, optList: [] },
{ id: 'building', name: '楼栋', type: 'input', require: false, optList: [] },
{ id: 'floor', name: '楼', type: 'input', require: false, optList: [] },
{ id: 'room', name: '房间', type: 'input', require: false, optList: [] },
{ id: 'acreage', name: '面积', type: 'input', require: false, optList: [] },
{ id: 'capacity', name: '容纳人数', type: 'input', require: false, optList: [] },
{ id: 'threshold', name: '最低申请人数', type: 'input', require: false, optList: [] },
{ id: 'sex', name: '性别', type: 'select', require: false, optList: [{label:'男',value:'男'},{label:'女',value:'女'}] },
{ id: 'key_num', name: '钥匙库存数', type: 'input', require: false, optList: [] },
{ id: 'key_lend_num', name: '钥匙已借出数', type: 'input', require: false, optList: [] },
{ id: 'key_loanable_num', name: '钥匙可借出数', type: 'input', require: false, optList: [] },
{ id: 'description', name: '场地描述', type: 'input', require: false, optList: [] },
{ id: 'file_id', name: '附件', type: 'file', require: false, optList: [] },
{ id: 'is_enable', name: '启用', type: 'switch', require: false, optList: [] },
],
defaultFormData: {
id: "",
place_code: "",
place_name: "",
place_type_id: "",
place_address: "",
building: "",
floor: "",
room: "",
acreage: "",
capacity: "",
threshold: "",
sex: "",
description: "",
is_enable: true,
is_del: "",
createby: "",
createtime: "",
modifyby: "",
modify_time: "",
file_list: []
},
}
},
// 查询条件初始化
created(){},
mounted(){
this.getData()
},
methods: {
// 查询
getData(){
this.params.place_type_id = this.params.place_type_id ? this.params.place_type_id : ""
this.params.place_code_name = this.params.place_code_name ? this.params.place_code_name : ""
this.params.sex = this.params.sex ? this.params.sex : ""
loading: false,
tableData:[
{ },
],
tableSize: 'default',
tableFullscreen: false,
total: 0,
collapse: false,
params:{
pageIndex: 1,
pageSize: 10,
college_id: '',
grade: '',
classId_Name: '',
status: ''
this.tableLoading = true
this.asc.postApiPlaceGetPlaceList(this.params).then(res => {
// console.log('查询数据', res)
this.tableData = res.response.data
this.dataCount = res.response.data_count
this.tableLoading = false
})
},
// 新增
add(){
this.editModalshow = true
this.$refs.ceditmodal.modalInit('add', this.defaultFormData)
},
// 编辑
rowEdit(row){
// console.log('编辑行', row)
this.editModalshow = true
this.editModalLoading = true
this.asc.getApiPlaceGetPlaceInfo({id:row.id}).then(res => {
// console.log('编辑详情', res)
this.$refs.ceditmodal.modalInit('edit', res.response)
this.editModalLoading = false
})
},
// 新增编辑提交
modalSubmit(val) {
// console.log('modal提交', val)
this.$Modal.confirm({
title: '提示',
content: '是否确定提交?',
loading: true,
onOk: () => {
this.asc.postApiPlacePlaceSave(val).then(res => {
console.log('保存信息', res)
if (res.code == 1) {
this.$Message.success(res.response)
this.editModalshow = false
this.getData()
} else {
this.$Message.error(res.msg_detail)
}
}).finally(() => {
this.$Modal.remove()
})
}
}
})
},
// 查询条件初始化
created(){
// 删除
rowDelete(row) {
// console.log('删除', row);
this.asc.getApiPlacePlaceDel({id:row.id, is_del:1}).then(res => {
// console.log('删除行后', res)
if (res.code == 1) {
this.$Message.success(res.msg)
this.getData()
} else {
this.$Message.error(res.msg_detail)
}
})
},
mounted(){
// 更改页码
onPageChange(val) {
this.params.pageIndex = val
this.getData()
},
methods: {
// 查询
getData(){
this.params.college_id = this.params.college_id == undefined ? "" : this.params.college_id
this.params.grade = this.params.grade == undefined ? "" : this.params.grade
// this.params.classCodeOrName = this.params.classCodeOrName == undefined ? "" : this.params.classCodeOrName
this.params.classId_Name = this.params.classId_Name == undefined ? "" : this.params.classId_Name
this.params.status = this.params.status == undefined ? "" : this.params.status
// this.loading = true
this.params.pageIndex = 1
},
// 新增
add(){
this.$refs.addEdit.add()
},
// 修改
edit(row){
this.$refs.addEdit.edit(row)
},
// 删除
del(row) {
console.log('删除');
this.$Message.info('删除成功');
},
// 取消删除
cancel () {
this.$Message.info('You click cancel');
},
// 切换第几页
handleChangePage(pageNumber) {
this.params.pageIndex = pageNumber
this.getData()
},
// 切换每页条数
handleChangePageSize(size){
this.current = 1;
this.params.pageSize = size
this.getData()
},
}
// 更改每页条数
onPageSizeChange(val){
this.params.pageSize = val
if (this.params.pageIndex == 1) {
this.onPageChange(1)
}
},
}
</script>
\ No newline at end of file
}
</script>
<style scoped lang="less">
</style>
\ No newline at end of file
<template>
<!-- 场地类型管理 -->
<div>
<Card ref="card">
<TableFrom />
<Button type="primary" class="ivu-ml-8" @click="add"><Icon type="md-add"/>新增</Button>
<Table
:columns="columns"
:data="tableData"
class="ivu-mt"
:loading="loading"
:size="tableSize"
>
<template slot-scope="{ row }" slot="status">
<Switch size="large" v-model="row.status" :true-value="1" :false-value="0" @on-change="switchChange(row)">
<span type="md-checkmark" slot="open" >启用</span>
<span type="md-close" slot="close">停用</span>
</Switch>
</template>
<template slot-scope="{ row }" slot="action">
<Button type="info" @click="edit(row)">编辑</Button>
<Poptip confirm transfer title="你确定删除吗?" @on-ok="del(row)" @on-cancel="cancel">
<Button type="error" style="margin-left: 20px">删除</Button>
</Poptip>
</template>
</Table>
<div class="ivu-text-center ivu-mt">
<Page
:total="total"
:current.sync="params.pageIndex"
show-total
show-sizer
:page-size="params.pageSize"
@on-change="handleChangePage"
@on-page-size-change="handleChangePageSize"
/>
</div>
<CTable
:tableColumns="tableColumns"
:tableData="tableData"
:tableLoading="tableLoading"
:tableSize="tableSize"
:dataCount="dataCount"
:pageIndex="params.pageIndex"
:pageSize="params.pageSize"
@rowEdit="rowEdit"
@rowDelete="rowDelete"
@onPageChange="onPageChange"
@onPageSizeChange="onPageSizeChange"></CTable>
<!-- 新增修改 -->
<AddEditDrawer ref="addEdit" @getData="getData"/>
......@@ -43,178 +25,177 @@
<script>
import AddEditDrawer from './component/addEditDrawer.vue'
import TableFrom from './component/table-from.vue'
export default {
name: 'list',
components: { AddEditDrawer, TableFrom },
data(){
return {
grid: {
xl: 8,
lg: 12,
md: 24,
sm: 24,
xs: 24
import AddEditDrawer from './component/addEditDrawer.vue'
import TableFrom from './component/table-from.vue'
import CTable from '@/components/CTable.vue'
export default {
name: 'list',
components: { AddEditDrawer, TableFrom, CTable },
data(){
return {
grid: {
xl: 8,
lg: 12,
md: 24,
sm: 24,
xs: 24
},
tableColumns:[
{
title: '序号',
type: 'index',
align: 'center',
show: true,
width: 80
},
columns:[
{
title: '序号',
type: 'index',
align: 'center',
show: true,
width: 80
},
{
title: '班级编号',
key: 'class_code',
align: 'center',
show: true,
minWidth: 100,
},
{
title: '班级名称',
key: 'class_name',
align: 'center',
show: true,
minWidth: 150,
},
{
title: '年级',
key: 'grade',
align: 'center',
show: true,
minWidth: 100,
},
{
title: '培养层次',
key: 'training',
align: 'center',
show: true,
minWidth: 120,
},
{
title: '辅导员工号',
key: 'counselor_card',
align: 'center',
show: true,
minWidth: 150,
},
{
title: '辅导员姓名',
key: 'counselor_name',
align: 'center',
show: true,
minWidth: 120,
},
{
title: '班主任工号',
key: 'head_teacher_card',
align: 'center',
show: true,
minWidth: 150,
},
{
title: '班主任姓名',
key: 'head_teacher_name',
align: 'center',
show: true,
minWidth: 120,
},
{
title: '院系名称',
key: 'college_name',
align: 'center',
show: true,
minWidth: 200,
},
{
title: '状态',
key: 'status',
align: 'center',
slot: 'status',
show: true,
minWidth: 130,
},
{
title: '操作',
align: 'center',
minWidth: 180,
fixed: 'right',
show: true,
slot: 'action'
}
],
loading: false,
tableData:[
{ },
],
tableSize: 'default',
tableFullscreen: false,
total: 0,
collapse: false,
params:{
pageIndex: 1,
pageSize: 10,
college_id: '',
grade: '',
classId_Name: '',
status: ''
{
title: '班级编号',
key: 'class_code',
align: 'center',
show: true,
minWidth: 100,
},
{
title: '班级名称',
key: 'class_name',
align: 'center',
show: true,
minWidth: 150,
},
{
title: '年级',
key: 'grade',
align: 'center',
show: true,
minWidth: 100,
},
{
title: '培养层次',
key: 'training',
align: 'center',
show: true,
minWidth: 120,
},
{
title: '辅导员工号',
key: 'counselor_card',
align: 'center',
show: true,
minWidth: 150,
},
{
title: '辅导员姓名',
key: 'counselor_name',
align: 'center',
show: true,
minWidth: 120,
},
{
title: '班主任工号',
key: 'head_teacher_card',
align: 'center',
show: true,
minWidth: 150,
},
{
title: '班主任姓名',
key: 'head_teacher_name',
align: 'center',
show: true,
minWidth: 120,
},
{
title: '院系名称',
key: 'college_name',
align: 'center',
show: true,
minWidth: 200,
},
{
title: '状态',
key: 'status',
align: 'center',
slot: 'status',
show: true,
minWidth: 130,
},
{
title: '操作',
align: 'center',
minWidth: 180,
fixed: 'right',
show: true,
slot: 'action'
}
],
tableLoading: false,
tableData:[],
tableSize: 'default',
tableFullscreen: false,
dataCount: 0,
collapse: false,
params:{
pageIndex: 1,
pageSize: 10,
college_id: '',
grade: '',
classId_Name: '',
status: ''
}
}
},
// 查询条件初始化
created(){},
mounted(){
this.getData()
},
methods: {
// 查询
getData(){
this.params.college_id = this.params.college_id ? this.params.college_id : ""
this.params.grade = this.params.grade ? this.params.grade : ""
this.params.classId_Name = this.params.classId_Name ? this.params.classId_Name : ""
this.params.status = this.params.status ? this.params.status : ""
this.params.pageIndex = 1
},
// 新增
add(){
this.$refs.addEdit.add()
},
// 查询条件初始化
created(){
// 修改
rowEdit(row){
this.$refs.addEdit.edit(row)
},
mounted(){
// 删除
rowDelete(row) {
console.log('删除');
this.$Message.info('删除成功');
},
// 取消删除
cancel () {
this.$Message.info('You click cancel');
},
// 切换第几页
onPageChange(val) {
this.params.pageIndex = val
this.getData()
},
methods: {
// 查询
getData(){
this.params.college_id = this.params.college_id == undefined ? "" : this.params.college_id
this.params.grade = this.params.grade == undefined ? "" : this.params.grade
// this.params.classCodeOrName = this.params.classCodeOrName == undefined ? "" : this.params.classCodeOrName
this.params.classId_Name = this.params.classId_Name == undefined ? "" : this.params.classId_Name
this.params.status = this.params.status == undefined ? "" : this.params.status
// this.loading = true
this.params.pageIndex = 1
},
// 新增
add(){
this.$refs.addEdit.add()
},
// 修改
edit(row){
this.$refs.addEdit.edit(row)
},
// 删除
del(row) {
console.log('删除');
this.$Message.info('删除成功');
},
// 取消删除
cancel () {
this.$Message.info('You click cancel');
},
// 切换第几页
handleChangePage(pageNumber) {
this.params.pageIndex = pageNumber
this.getData()
},
// 切换每页条数
handleChangePageSize(size){
this.current = 1;
this.params.pageSize = size
this.getData()
},
}
// 切换每页条数
onPageSizeChange(val){
this.params.pageSize = val
if (this.params.pageIndex == 1) {
this.onPageChange(1)
}
},
}
</script>
\ No newline at end of file
}
</script>
<style scoped lang="less">
</style>
\ No newline at end of file
......@@ -71,6 +71,7 @@ const refreshToken = async () => {
// 请求拦截器
service.interceptors.request.use(
config => {
// console.log('配置', config)
// 在请求发送之前做一些处理
// const token = util.cookies.get('token');
let token = util.cookies.get('site-management-token')
......
Markdown 格式
0% or
您添加了 0 人 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册 或