master
parent
63a1e546ee
commit
687172a352
@ -0,0 +1,34 @@
|
||||
import request from "@/utils/request";
|
||||
|
||||
export function index(params) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: '/api/admin/study-audio-department/index',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export function save(data) {
|
||||
return request({
|
||||
url: '/api/admin/study-audio-department/save',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function show(params) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: '/api/admin/study-audio-department/show',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function destroy(params) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: '/api/admin/study-audio-department/destroy',
|
||||
params
|
||||
})
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
import request from "@/utils/request";
|
||||
|
||||
export function index(params) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: '/api/admin/study-point/index',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export function save(data) {
|
||||
return request({
|
||||
url: '/api/admin/study-point/save',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function show(params) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: '/api/admin/study-point/show',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function destroy(params) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: '/api/admin/study-point/destroy',
|
||||
params
|
||||
})
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
import request from "@/utils/request";
|
||||
|
||||
export function index(params) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: '/api/admin/study-question/index',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export function save(data) {
|
||||
return request({
|
||||
url: '/api/admin/study-question/save',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function show(params) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: '/api/admin/study-question/show',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function destroy(params) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: '/api/admin/study-question/destroy',
|
||||
params
|
||||
})
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
import request from "@/utils/request";
|
||||
|
||||
export function index(params) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: '/api/admin/study-audio/index',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export function save(data) {
|
||||
return request({
|
||||
url: '/api/admin/study-audio/save',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function show(params) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: '/api/admin/study-audio/show',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function destroy(params) {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: '/api/admin/study-audio/destroy',
|
||||
params
|
||||
})
|
||||
}
|
||||
@ -0,0 +1,231 @@
|
||||
<template>
|
||||
<div>
|
||||
<!-- 编辑-->
|
||||
<xy-dialog :is-show.sync="isShow" title="党支部编辑" type="form" :form="detail" :rules="rules" @submit="editor"
|
||||
ref="addActivity">
|
||||
|
||||
<template v-slot:pid>
|
||||
<div class="xy-table-item">
|
||||
<div class="xy-table-item-label">
|
||||
上级名称
|
||||
</div>
|
||||
<div class="xy-table-item-content">
|
||||
<el-select clearable placeholder="请选择党支部" v-model="detail.pid" style="width: 300px;">
|
||||
<el-option value="" label="根目录">
|
||||
</el-option>
|
||||
<el-option v-for="(item,index) of listParty" :key="item.id" :value="item.id" :label="item.name">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template v-slot:name>
|
||||
<div class="xy-table-item">
|
||||
<div class="xy-table-item-label">
|
||||
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>支部名称
|
||||
</div>
|
||||
<div class="xy-table-item-content">
|
||||
<el-input clearable placeholder="请填写支部名称" v-model="detail.name" style="width: 300px;" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template v-slot:activity_list_id>
|
||||
<div class="xy-table-item">
|
||||
<div class="xy-table-item-label">
|
||||
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>所属系统
|
||||
</div>
|
||||
<div class="xy-table-item-content">
|
||||
<el-select clearable v-model="detail.activity_list_id" @change="changeActivity" style="width: 300px;">
|
||||
<el-option v-for="(item,index) of listActivity" :key="item.id" :value="item.id" :label="item.name">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template v-slot:type>
|
||||
<div class="xy-table-item">
|
||||
<div class="xy-table-item-label">
|
||||
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>类型
|
||||
</div>
|
||||
<div class="xy-table-item-content">
|
||||
<el-select clearable v-model="detail.type">
|
||||
<el-option value="部门" label="部门"></el-option>
|
||||
<el-option value="板块" label="板块"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<template v-slot:myindex>
|
||||
<div class="xy-table-item">
|
||||
<div class="xy-table-item-label">排序
|
||||
</div>
|
||||
<div class="xy-table-item-content">
|
||||
<el-input clearable placeholder="请填写排序" v-model="detail.myindex" style="width: 60px;" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</xy-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
save,
|
||||
show,
|
||||
index
|
||||
} from "@/api/party/partyBranch";
|
||||
|
||||
export default {
|
||||
props: {
|
||||
listActivity: Array
|
||||
},
|
||||
data() {
|
||||
|
||||
return {
|
||||
listParty: [],
|
||||
isShow: false,
|
||||
id: "",
|
||||
type: "add",
|
||||
detail: {
|
||||
activity_list_id: "",
|
||||
pid: "",
|
||||
name: "",
|
||||
type: "",
|
||||
myindex: 1,
|
||||
id:""
|
||||
},
|
||||
rules: {
|
||||
name: [{
|
||||
required: true,
|
||||
message: "支部名称必填",
|
||||
tigger:"blur"
|
||||
}],
|
||||
type: [{
|
||||
required: true,
|
||||
message: "选择类型",
|
||||
tigger:"change"
|
||||
}],
|
||||
activity_list_id: [{
|
||||
required: true,
|
||||
message: "选择类型"
|
||||
}]
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
isShow(newVal) {
|
||||
if (newVal) {
|
||||
if (this.type === 'editor') {
|
||||
this.getDetail()
|
||||
}
|
||||
} else {
|
||||
this.id = ''
|
||||
this.form.id = ''
|
||||
this.type = ''
|
||||
this.$refs['addActivity'].reset()
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
changeActivity(e){
|
||||
this.load(e);
|
||||
},
|
||||
load(e) {
|
||||
index({
|
||||
page_size: 999,
|
||||
activity_list_id: e,
|
||||
page: 1
|
||||
}).then(res => {
|
||||
this.listParty = res.data;
|
||||
})
|
||||
},
|
||||
async getDetail() {
|
||||
let res = await show({
|
||||
id: this.id
|
||||
})
|
||||
Object.assign(this.detail, res);
|
||||
},
|
||||
editor() {
|
||||
save(this.detail).then(res => {
|
||||
this.isShow = false
|
||||
this.$Message.success("操作成功");
|
||||
this.$emit('refresh')
|
||||
})
|
||||
},
|
||||
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
let that = this;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.contract-add-plan {
|
||||
min-height: 30px;
|
||||
border: 1px solid #dcdee2;
|
||||
border-radius: 4px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
align-content: center;
|
||||
|
||||
padding: 0 8px;
|
||||
|
||||
&-no-plan {
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
color: #CDD0D5;
|
||||
}
|
||||
}
|
||||
|
||||
.xy-table-item-label {
|
||||
width: 140px;
|
||||
}
|
||||
|
||||
.xy-table-item-price {
|
||||
position: relative;
|
||||
|
||||
&::after {
|
||||
z-index: 1;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
content: '(元)'
|
||||
}
|
||||
|
||||
::v-deep .el-input__clear {
|
||||
position: relative;
|
||||
right: 30px;
|
||||
z-index: 2;
|
||||
}
|
||||
}
|
||||
|
||||
.xy-table-item-price-wan {
|
||||
position: relative;
|
||||
|
||||
&::after {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
content: '(万元)'
|
||||
}
|
||||
|
||||
::v-deep .el-input__clear {
|
||||
position: relative;
|
||||
right: 46px;
|
||||
z-index: 2;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,8 @@
|
||||
<template>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
@ -0,0 +1,8 @@
|
||||
<template>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
@ -0,0 +1,8 @@
|
||||
<template>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
@ -0,0 +1,144 @@
|
||||
<template>
|
||||
<div>
|
||||
<lx-header icon="md-apps" style="margin-bottom: 10px; border: 0px; margin-top: 15px" text="党支部管理">
|
||||
<div slot="content"></div>
|
||||
<slot>
|
||||
<div class="selects">
|
||||
<div style="display: flex;align-items: center;">
|
||||
<span style="padding: 0 6px;word-break: keep-all;">
|
||||
活动
|
||||
</span>
|
||||
<Select v-model="select.activity_list_id" style="width: 180px;">
|
||||
<Option v-for="(item,index) of listActivity" :key="item.id" :value="item.id" :label="item.name">
|
||||
</Option>
|
||||
</Select>
|
||||
</div>
|
||||
<div>
|
||||
<span style="padding: 0 6px;word-break: keep-all;">
|
||||
关键字
|
||||
</span>
|
||||
<Input v-model="select.keyword" placeholder="请输入关键字" style="width: 180px"></Input>
|
||||
</div>
|
||||
|
||||
<Button style="margin-left: 10px" type="primary" @click="select={page:1,keyword:''}">重置
|
||||
</Button>
|
||||
<Button style="margin-left: 10px" type="primary" @click="doSearch">查询</Button>
|
||||
<Button style="margin-left: 10px" type="primary" @click="add">新增</Button>
|
||||
</div>
|
||||
</slot>
|
||||
</lx-header>
|
||||
|
||||
|
||||
<xy-table :list="list" :total="total" :table-item="table" @delete="deleteitem"
|
||||
@editor="(row)=>{$refs['addBranch'].id = row.id;$refs['addBranch'].isShow = true;$refs['addBranch'].type = 'editor'}">
|
||||
<template v-slot:btns v-if="type==0 ">
|
||||
|
||||
</template>
|
||||
</xy-table>
|
||||
<addBranch ref="addBranch" :listActivity="listActivity" @refresh="load()"></addBranch>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
index,
|
||||
destroy,
|
||||
show
|
||||
} from "@/api/party/partyBranch";
|
||||
import {
|
||||
index as activityIndex
|
||||
} from "@/api/activity/index";
|
||||
|
||||
import addBranch from '@/views/party/components/addBranch'
|
||||
export default {
|
||||
components: {
|
||||
addBranch
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
select: {
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
keyword: '',
|
||||
activity_list_id: ""
|
||||
},
|
||||
listActivity: [],
|
||||
total: 0,
|
||||
list: [],
|
||||
table: [{
|
||||
prop: 'name',
|
||||
label: '上级支部名称',
|
||||
align: 'left',
|
||||
}, {
|
||||
prop: 'name',
|
||||
label: '支部名称',
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
prop: 'created_at',
|
||||
label: '创建信息',
|
||||
width: 190,
|
||||
formatter: (v1, v2, value) => {
|
||||
return this.$moment(value).format("YYYY-MM-DD HH:mm:ss");
|
||||
}
|
||||
}
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
async loadActivity() {
|
||||
const res = await activityIndex({
|
||||
page: 1,
|
||||
page_size: 999
|
||||
})
|
||||
this.listActivity = res.data;
|
||||
},
|
||||
doSearch() {
|
||||
this.select.page = 1;
|
||||
this.load();
|
||||
},
|
||||
add() {
|
||||
this.$refs['addBranch'].isShow = true
|
||||
},
|
||||
pageSizeChange(e) {
|
||||
this.select.page_size = e;
|
||||
this.select.page = 1;
|
||||
this.load();
|
||||
},
|
||||
async load() {
|
||||
const res = await index(this.select)
|
||||
this.total = res.total
|
||||
this.list = res.data
|
||||
},
|
||||
deleteitem(row) {
|
||||
destroy({
|
||||
id: row.id
|
||||
}).then(res => {
|
||||
this.load();
|
||||
this.$Message.success("操作成功");
|
||||
})
|
||||
},
|
||||
pageChange(e) {
|
||||
this.select.page = e
|
||||
this.load()
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.load();
|
||||
this.loadActivity()
|
||||
},
|
||||
created() {}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.selects {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
&>div {
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,159 @@
|
||||
<template>
|
||||
<div>
|
||||
<lx-header icon="md-apps" style="margin-bottom: 10px; border: 0px; margin-top: 15px" text="打卡点位管理">
|
||||
<div slot="content"></div>
|
||||
<slot>
|
||||
<div class="selects">
|
||||
<div style="display: flex;align-items: center;">
|
||||
<span style="padding: 0 6px;word-break: keep-all;">
|
||||
项目
|
||||
</span>
|
||||
<Select v-model="select.activity_list_id" style="width: 180px;">
|
||||
<Option v-for="(item,index) of listActivity" :key="item.id" :value="item.id" :label="item.name">
|
||||
</Option>
|
||||
</Select>
|
||||
</div>
|
||||
<div>
|
||||
<span style="padding: 0 6px;word-break: keep-all;">
|
||||
关键字
|
||||
</span>
|
||||
<Input v-model="select.keyword" placeholder="请输入关键字" style="width: 180px"></Input>
|
||||
</div>
|
||||
|
||||
<Button style="margin-left: 10px" type="primary" @click="select={page:1,keyword:''}">重置
|
||||
</Button>
|
||||
<Button style="margin-left: 10px" type="primary" @click="doSearch">查询</Button>
|
||||
<Button style="margin-left: 10px" type="primary" @click="add">新增</Button>
|
||||
</div>
|
||||
</slot>
|
||||
</lx-header>
|
||||
|
||||
|
||||
<xy-table :list="list" :total="total" :table-item="table" @delete="deleteitem"
|
||||
@editor="(row)=>{$refs['addActivityUser'].id = row.id;$refs['addActivityUser'].isShow = true;$refs['addActivityUser'].type = 'editor'}">
|
||||
<template v-slot:btns v-if="type==0 ">
|
||||
|
||||
</template>
|
||||
</xy-table>
|
||||
<addActivityUser ref="addActivityUser" :listActivity="listActivity" @refresh="load()"></addActivityUser>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
index,
|
||||
destroy,
|
||||
show
|
||||
} from "@/api/activity/activityOrder";
|
||||
import {
|
||||
index as activityIndex
|
||||
} from "@/api/activity/index";
|
||||
|
||||
|
||||
import addActivityUser from '@/views/activity/components/addActivityUser'
|
||||
export default {
|
||||
components: {
|
||||
addActivityUser
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
select: {
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
keyword: '',
|
||||
activity_list_id: ""
|
||||
},
|
||||
listActivity: [],
|
||||
total: 0,
|
||||
list: [],
|
||||
table: [{
|
||||
prop: 'activity_list.name',
|
||||
label: '活动名称',
|
||||
fixed: 'left',
|
||||
align: 'left'
|
||||
}, {
|
||||
prop: 'name',
|
||||
label: '用户名称',
|
||||
align: 'left',
|
||||
|
||||
|
||||
}, {
|
||||
prop: 'username',
|
||||
label: '登录账号',
|
||||
align: 'center'
|
||||
}, {
|
||||
prop: 'mobile',
|
||||
label: '手机号',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'created_at',
|
||||
label: '创建信息',
|
||||
width: 190,
|
||||
formatter: (v1, v2, value) => {
|
||||
return this.$moment(value).format("YYYY-MM-DD HH:mm:ss");
|
||||
}
|
||||
}
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
async loadActivity() {
|
||||
const res = await activityIndex({
|
||||
page: 1,
|
||||
page_size: 999
|
||||
})
|
||||
this.listActivity = res.data;
|
||||
},
|
||||
doSearch() {
|
||||
this.select.page = 1;
|
||||
this.load();
|
||||
},
|
||||
add() {
|
||||
this.$refs['addActivityUser'].isShow = true
|
||||
},
|
||||
pageSizeChange(e) {
|
||||
this.select.page_size = e;
|
||||
this.select.page = 1;
|
||||
this.load();
|
||||
},
|
||||
async load() {
|
||||
const res = await index(this.select)
|
||||
this.total = res.total
|
||||
this.list = res.data
|
||||
},
|
||||
deleteitem(row) {
|
||||
destroy({
|
||||
id: row.id
|
||||
}).then(res => {
|
||||
this.load();
|
||||
this.$Message.success("操作成功");
|
||||
})
|
||||
},
|
||||
pageChange(e) {
|
||||
this.select.page = e
|
||||
this.load()
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.load();
|
||||
this.loadActivity()
|
||||
},
|
||||
created() {
|
||||
let type = parseInt(this.$route.path.split("_")[1]);
|
||||
this.type = this.select.is_auth = type;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.selects {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
&>div {
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,159 @@
|
||||
<template>
|
||||
<div>
|
||||
<lx-header icon="md-apps" style="margin-bottom: 10px; border: 0px; margin-top: 15px" text="学习题目管理">
|
||||
<div slot="content"></div>
|
||||
<slot>
|
||||
<div class="selects">
|
||||
<div style="display: flex;align-items: center;">
|
||||
<span style="padding: 0 6px;word-break: keep-all;">
|
||||
活动
|
||||
</span>
|
||||
<Select v-model="select.activity_list_id" style="width: 180px;">
|
||||
<Option v-for="(item,index) of listActivity" :key="item.id" :value="item.id" :label="item.name">
|
||||
</Option>
|
||||
</Select>
|
||||
</div>
|
||||
<div>
|
||||
<span style="padding: 0 6px;word-break: keep-all;">
|
||||
关键字
|
||||
</span>
|
||||
<Input v-model="select.keyword" placeholder="请输入关键字" style="width: 180px"></Input>
|
||||
</div>
|
||||
|
||||
<Button style="margin-left: 10px" type="primary" @click="select={page:1,keyword:''}">重置
|
||||
</Button>
|
||||
<Button style="margin-left: 10px" type="primary" @click="doSearch">查询</Button>
|
||||
<Button style="margin-left: 10px" type="primary" @click="add">新增</Button>
|
||||
</div>
|
||||
</slot>
|
||||
</lx-header>
|
||||
|
||||
|
||||
<xy-table :list="list" :total="total" :table-item="table" @delete="deleteitem"
|
||||
@editor="(row)=>{$refs['addActivityUser'].id = row.id;$refs['addActivityUser'].isShow = true;$refs['addActivityUser'].type = 'editor'}">
|
||||
<template v-slot:btns v-if="type==0 ">
|
||||
|
||||
</template>
|
||||
</xy-table>
|
||||
<addActivityUser ref="addActivityUser" :listActivity="listActivity" @refresh="load()"></addActivityUser>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
index,
|
||||
destroy,
|
||||
show
|
||||
} from "@/api/activity/activityOrder";
|
||||
import {
|
||||
index as activityIndex
|
||||
} from "@/api/activity/index";
|
||||
|
||||
|
||||
import addActivityUser from '@/views/activity/components/addActivityUser'
|
||||
export default {
|
||||
components: {
|
||||
addActivityUser
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
select: {
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
keyword: '',
|
||||
activity_list_id: ""
|
||||
},
|
||||
listActivity: [],
|
||||
total: 0,
|
||||
list: [],
|
||||
table: [{
|
||||
prop: 'activity_list.name',
|
||||
label: '活动名称',
|
||||
fixed: 'left',
|
||||
align: 'left'
|
||||
}, {
|
||||
prop: 'name',
|
||||
label: '用户名称',
|
||||
align: 'left',
|
||||
|
||||
|
||||
}, {
|
||||
prop: 'username',
|
||||
label: '登录账号',
|
||||
align: 'center'
|
||||
}, {
|
||||
prop: 'mobile',
|
||||
label: '手机号',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'created_at',
|
||||
label: '创建信息',
|
||||
width: 190,
|
||||
formatter: (v1, v2, value) => {
|
||||
return this.$moment(value).format("YYYY-MM-DD HH:mm:ss");
|
||||
}
|
||||
}
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
async loadActivity() {
|
||||
const res = await activityIndex({
|
||||
page: 1,
|
||||
page_size: 999
|
||||
})
|
||||
this.listActivity = res.data;
|
||||
},
|
||||
doSearch() {
|
||||
this.select.page = 1;
|
||||
this.load();
|
||||
},
|
||||
add() {
|
||||
this.$refs['addActivityUser'].isShow = true
|
||||
},
|
||||
pageSizeChange(e) {
|
||||
this.select.page_size = e;
|
||||
this.select.page = 1;
|
||||
this.load();
|
||||
},
|
||||
async load() {
|
||||
const res = await index(this.select)
|
||||
this.total = res.total
|
||||
this.list = res.data
|
||||
},
|
||||
deleteitem(row) {
|
||||
destroy({
|
||||
id: row.id
|
||||
}).then(res => {
|
||||
this.load();
|
||||
this.$Message.success("操作成功");
|
||||
})
|
||||
},
|
||||
pageChange(e) {
|
||||
this.select.page = e
|
||||
this.load()
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.load();
|
||||
this.loadActivity()
|
||||
},
|
||||
created() {
|
||||
let type = parseInt(this.$route.path.split("_")[1]);
|
||||
this.type = this.select.is_auth = type;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.selects {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
&>div {
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,159 @@
|
||||
<template>
|
||||
<div>
|
||||
<lx-header icon="md-apps" style="margin-bottom: 10px; border: 0px; margin-top: 15px" text="学习资源管理">
|
||||
<div slot="content"></div>
|
||||
<slot>
|
||||
<div class="selects">
|
||||
<div style="display: flex;align-items: center;">
|
||||
<span style="padding: 0 6px;word-break: keep-all;">
|
||||
活动
|
||||
</span>
|
||||
<Select v-model="select.activity_list_id" style="width: 180px;">
|
||||
<Option v-for="(item,index) of listActivity" :key="item.id" :value="item.id" :label="item.name">
|
||||
</Option>
|
||||
</Select>
|
||||
</div>
|
||||
<div>
|
||||
<span style="padding: 0 6px;word-break: keep-all;">
|
||||
关键字
|
||||
</span>
|
||||
<Input v-model="select.keyword" placeholder="请输入关键字" style="width: 180px"></Input>
|
||||
</div>
|
||||
|
||||
<Button style="margin-left: 10px" type="primary" @click="select={page:1,keyword:''}">重置
|
||||
</Button>
|
||||
<Button style="margin-left: 10px" type="primary" @click="doSearch">查询</Button>
|
||||
<Button style="margin-left: 10px" type="primary" @click="add">新增</Button>
|
||||
</div>
|
||||
</slot>
|
||||
</lx-header>
|
||||
|
||||
|
||||
<xy-table :list="list" :total="total" :table-item="table" @delete="deleteitem"
|
||||
@editor="(row)=>{$refs['addActivityUser'].id = row.id;$refs['addActivityUser'].isShow = true;$refs['addActivityUser'].type = 'editor'}">
|
||||
<template v-slot:btns v-if="type==0 ">
|
||||
|
||||
</template>
|
||||
</xy-table>
|
||||
<addActivityUser ref="addActivityUser" :listActivity="listActivity" @refresh="load()"></addActivityUser>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
index,
|
||||
destroy,
|
||||
show
|
||||
} from "@/api/activity/activityOrder";
|
||||
import {
|
||||
index as activityIndex
|
||||
} from "@/api/activity/index";
|
||||
|
||||
|
||||
import addActivityUser from '@/views/activity/components/addActivityUser'
|
||||
export default {
|
||||
components: {
|
||||
addActivityUser
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
select: {
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
keyword: '',
|
||||
activity_list_id: ""
|
||||
},
|
||||
listActivity: [],
|
||||
total: 0,
|
||||
list: [],
|
||||
table: [{
|
||||
prop: 'activity_list.name',
|
||||
label: '活动名称',
|
||||
fixed: 'left',
|
||||
align: 'left'
|
||||
}, {
|
||||
prop: 'name',
|
||||
label: '用户名称',
|
||||
align: 'left',
|
||||
|
||||
|
||||
}, {
|
||||
prop: 'username',
|
||||
label: '登录账号',
|
||||
align: 'center'
|
||||
}, {
|
||||
prop: 'mobile',
|
||||
label: '手机号',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'created_at',
|
||||
label: '创建信息',
|
||||
width: 190,
|
||||
formatter: (v1, v2, value) => {
|
||||
return this.$moment(value).format("YYYY-MM-DD HH:mm:ss");
|
||||
}
|
||||
}
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
async loadActivity() {
|
||||
const res = await activityIndex({
|
||||
page: 1,
|
||||
page_size: 999
|
||||
})
|
||||
this.listActivity = res.data;
|
||||
},
|
||||
doSearch() {
|
||||
this.select.page = 1;
|
||||
this.load();
|
||||
},
|
||||
add() {
|
||||
this.$refs['addActivityUser'].isShow = true
|
||||
},
|
||||
pageSizeChange(e) {
|
||||
this.select.page_size = e;
|
||||
this.select.page = 1;
|
||||
this.load();
|
||||
},
|
||||
async load() {
|
||||
const res = await index(this.select)
|
||||
this.total = res.total
|
||||
this.list = res.data
|
||||
},
|
||||
deleteitem(row) {
|
||||
destroy({
|
||||
id: row.id
|
||||
}).then(res => {
|
||||
this.load();
|
||||
this.$Message.success("操作成功");
|
||||
})
|
||||
},
|
||||
pageChange(e) {
|
||||
this.select.page = e
|
||||
this.load()
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.load();
|
||||
this.loadActivity()
|
||||
},
|
||||
created() {
|
||||
let type = parseInt(this.$route.path.split("_")[1]);
|
||||
this.type = this.select.is_auth = type;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.selects {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
&>div {
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in new issue