parent
49bd49331c
commit
311b6773c4
@ -0,0 +1,142 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<Drawer width="46" title="图片集合" :closable="false" v-model="drawer">
|
||||||
|
<Button @click="
|
||||||
|
$refs['addImg'].setForm(
|
||||||
|
['map_point_id', 'activity_list_id'],
|
||||||
|
[select.filter[0].value, 9]
|
||||||
|
),
|
||||||
|
$refs['addImg'].setType('add'),
|
||||||
|
$refs['addImg'].show()
|
||||||
|
">新增</Button>
|
||||||
|
|
||||||
|
<xy-table style="margin-top: 20px" :total="total" :list="list" :table-item="talbe" :is-page="false"
|
||||||
|
@pageSizeChange="pageSizeChange" @pageIndexChange="pageChange" @delete="row => destroy({
|
||||||
|
table_name: 'map_point_images',
|
||||||
|
id: row.id,
|
||||||
|
activity_list_id: 9
|
||||||
|
}).then(_ => getList())" @editor="
|
||||||
|
(row) => {
|
||||||
|
$refs['addImg'].setForm(
|
||||||
|
['map_point_id', 'activity_list_id'],
|
||||||
|
[select.filter[0].value, 9]
|
||||||
|
);
|
||||||
|
$refs['addImg'].setId(row.id);
|
||||||
|
$refs['addImg'].setType('editor');
|
||||||
|
$refs['addImg'].show();
|
||||||
|
}
|
||||||
|
">
|
||||||
|
</xy-table>
|
||||||
|
</Drawer>
|
||||||
|
|
||||||
|
<add-img ref="addImg" @refresh="getList"></add-img>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
index,
|
||||||
|
destroy
|
||||||
|
} from "@/api/index";
|
||||||
|
|
||||||
|
import addImg from "./addImg.vue";
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
addImg,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
drawer: false,
|
||||||
|
select: {
|
||||||
|
page: 1,
|
||||||
|
page_size: 999,
|
||||||
|
activity_list_id: 9,
|
||||||
|
table_name: "map_point_images",
|
||||||
|
with_relations:["image"],
|
||||||
|
filter: [{
|
||||||
|
key: "map_point_id",
|
||||||
|
value: 9,
|
||||||
|
op: "eq",
|
||||||
|
}, ],
|
||||||
|
},
|
||||||
|
total: 0,
|
||||||
|
list: [],
|
||||||
|
talbe: [{
|
||||||
|
prop: "name",
|
||||||
|
label: "标题",
|
||||||
|
minWidth: 220,
|
||||||
|
align: "left",
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
prop: "img",
|
||||||
|
label: "图片",
|
||||||
|
minWidth: 130,
|
||||||
|
align: "center",
|
||||||
|
customFn: (row) => {
|
||||||
|
return ( <div><img src={row.image?.url} style = 'width:120px;' /> </div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
prop: "created_at",
|
||||||
|
label: "创建信息",
|
||||||
|
width: 190,
|
||||||
|
formatter: (v1, v2, value) => {
|
||||||
|
return this.$moment(value).format("YYYY-MM-DD HH:mm:ss");
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "updated_at",
|
||||||
|
label: "更新时间",
|
||||||
|
align: "left",
|
||||||
|
width: 190,
|
||||||
|
formatter: (v1, v2, value) => {
|
||||||
|
return this.$moment(value).format("YYYY-MM-DD HH:mm:ss");
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
destroy,
|
||||||
|
show() {
|
||||||
|
this.drawer = true;
|
||||||
|
},
|
||||||
|
hidden() {
|
||||||
|
this.drawer = false;
|
||||||
|
},
|
||||||
|
setMapPointId(value) {
|
||||||
|
this.select.filter[0].value = value;
|
||||||
|
},
|
||||||
|
|
||||||
|
async getList() {
|
||||||
|
const res = await index(this.select);
|
||||||
|
this.total = res.total;
|
||||||
|
this.list = res.data;
|
||||||
|
},
|
||||||
|
|
||||||
|
pageSizeChange(e) {
|
||||||
|
this.select.page_size = e;
|
||||||
|
this.select.page = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
pageChange(e) {
|
||||||
|
this.select.page = e
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
},
|
||||||
|
computed: {},
|
||||||
|
watch: {
|
||||||
|
drawer(newVal) {
|
||||||
|
if (newVal) {
|
||||||
|
this.getList();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss"></style>
|
||||||
@ -0,0 +1,134 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<Drawer width="46" title="vr看展" :closable="false" v-model="drawer">
|
||||||
|
<Button @click="
|
||||||
|
$refs['addVr'].setForm(
|
||||||
|
['map_point_id', 'activity_list_id'],
|
||||||
|
[select.filter[0].value, 9]
|
||||||
|
),
|
||||||
|
$refs['addVr'].setType('add'),
|
||||||
|
$refs['addVr'].show()
|
||||||
|
">新增</Button>
|
||||||
|
|
||||||
|
<xy-table style="margin-top: 20px" :total="total" :list="list" :table-item="talbe" :is-page="false"
|
||||||
|
@pageSizeChange="pageSizeChange" @pageIndexChange="pageChange" @delete="row => destroy({
|
||||||
|
table_name: 'map_point_contents',
|
||||||
|
id: row.id,
|
||||||
|
activity_list_id: 9
|
||||||
|
}).then(_ => getList())" @editor="
|
||||||
|
(row) => {
|
||||||
|
$refs['addVr'].setForm(
|
||||||
|
['map_point_id', 'activity_list_id'],
|
||||||
|
[select.filter[0].value, 9]
|
||||||
|
);
|
||||||
|
$refs['addVr'].setId(row.id);
|
||||||
|
$refs['addVr'].setType('editor');
|
||||||
|
$refs['addVr'].show();
|
||||||
|
}
|
||||||
|
">
|
||||||
|
</xy-table>
|
||||||
|
</Drawer>
|
||||||
|
|
||||||
|
<add-vr ref="addVr" @refresh="getList"></add-vr>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
index,
|
||||||
|
destroy
|
||||||
|
} from "@/api/index";
|
||||||
|
|
||||||
|
import addVr from "./addVr.vue";
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
addVr,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
drawer: false,
|
||||||
|
select: {
|
||||||
|
page: 1,
|
||||||
|
page_size: 999,
|
||||||
|
activity_list_id: 9,
|
||||||
|
table_name: "map_point_contents",
|
||||||
|
filter: [{
|
||||||
|
key: "map_point_id",
|
||||||
|
value: 7,
|
||||||
|
op: "eq",
|
||||||
|
}, ],
|
||||||
|
},
|
||||||
|
total: 0,
|
||||||
|
list: [],
|
||||||
|
talbe: [{
|
||||||
|
prop: "name",
|
||||||
|
label: "标题",
|
||||||
|
minWidth: 220,
|
||||||
|
align: "left",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "url",
|
||||||
|
label: "跳转地址",
|
||||||
|
minWidth: 220,
|
||||||
|
align: "left",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "created_at",
|
||||||
|
label: "创建信息",
|
||||||
|
width: 190,
|
||||||
|
formatter: (v1, v2, value) => {
|
||||||
|
return this.$moment(value).format("YYYY-MM-DD HH:mm:ss");
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "updated_at",
|
||||||
|
label: "更新时间",
|
||||||
|
align: "left",
|
||||||
|
width: 190,
|
||||||
|
formatter: (v1, v2, value) => {
|
||||||
|
return this.$moment(value).format("YYYY-MM-DD HH:mm:ss");
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
destroy,
|
||||||
|
show() {
|
||||||
|
this.drawer = true;
|
||||||
|
},
|
||||||
|
hidden() {
|
||||||
|
this.drawer = false;
|
||||||
|
},
|
||||||
|
setMapPointId(value) {
|
||||||
|
this.select.filter[0].value = value;
|
||||||
|
},
|
||||||
|
|
||||||
|
async getList() {
|
||||||
|
const res = await index(this.select);
|
||||||
|
this.total = res.total;
|
||||||
|
this.list = res.data;
|
||||||
|
},
|
||||||
|
|
||||||
|
pageSizeChange(e) {
|
||||||
|
this.select.page_size = e;
|
||||||
|
this.select.page = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
pageChange(e) {
|
||||||
|
this.select.page = e
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
},
|
||||||
|
computed: {},
|
||||||
|
watch: {
|
||||||
|
drawer(newVal) {
|
||||||
|
if (newVal) {
|
||||||
|
this.getList();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss"></style>
|
||||||
@ -0,0 +1,178 @@
|
|||||||
|
<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>
|
||||||
|
<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=" $refs['addQuestions'].setType('add'), $refs['addQuestions'].setForm(['activity_list_id'],[9]),$refs['addQuestions'].show()"
|
||||||
|
>新增</Button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</slot>
|
||||||
|
</lx-header>
|
||||||
|
|
||||||
|
<xy-table
|
||||||
|
:list="list"
|
||||||
|
:total="total"
|
||||||
|
:table-item="table"
|
||||||
|
@delete="deleteitem"
|
||||||
|
@editor="
|
||||||
|
(row) => {
|
||||||
|
$refs['addQuestions'].setForm(['activity_list_id'],[9]);
|
||||||
|
$refs['addQuestions'].setId(row.id);
|
||||||
|
$refs['addQuestions'].setType('editor')
|
||||||
|
$refs['addQuestions'].show();
|
||||||
|
}
|
||||||
|
"
|
||||||
|
@pageSizeChange="pageSizeChange"
|
||||||
|
@pageIndexChange="pageChange"
|
||||||
|
>
|
||||||
|
<template v-slot:btns v-if="type == 0"> </template>
|
||||||
|
</xy-table>
|
||||||
|
<addQuestions ref="addQuestions" @refresh="load"></addQuestions>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { index, destroy, show } from "@/api/party/studyQuestion";
|
||||||
|
import { index as activityIndex } from "@/api/activity/index";
|
||||||
|
|
||||||
|
import addQuestions from "@/views/xtdxhistoryRecoder/components/addQuestions.vue";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
addQuestions,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
select: {
|
||||||
|
page: 1,
|
||||||
|
page_size: 20,
|
||||||
|
keyword: "",
|
||||||
|
// activity_list_id: 7,
|
||||||
|
activity_list_id: 9,
|
||||||
|
},
|
||||||
|
listActivity: [],
|
||||||
|
total: 0,
|
||||||
|
list: [],
|
||||||
|
table: [
|
||||||
|
{
|
||||||
|
prop: "point.name",
|
||||||
|
label: "关联点位",
|
||||||
|
minWidth: 220,
|
||||||
|
align: "left",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "activity_list.name",
|
||||||
|
label: "项目名称",
|
||||||
|
minWidth: 220,
|
||||||
|
align: "left",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "title",
|
||||||
|
label: "题目",
|
||||||
|
minWidth: 220,
|
||||||
|
align: "left",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "created_at",
|
||||||
|
label: "创建信息",
|
||||||
|
width: 190,
|
||||||
|
formatter: (v1, v2, value) => {
|
||||||
|
return this.$moment(value).format("YYYY-MM-DD HH:mm:ss");
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: "updated_at",
|
||||||
|
label: "更新时间",
|
||||||
|
align: "left",
|
||||||
|
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();
|
||||||
|
},
|
||||||
|
|
||||||
|
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] || 0);
|
||||||
|
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