Commit e652a79f by swl

feat: gx

parent f753d41b
No preview for this file type
No preview for this file type
const domain = { const domain = {
// dev: "http://192.168.3.87:8881", // 姚镇接口 // dev: "http://192.168.3.87:8881", // 姚镇接口
// dev: "http://81.69.231.72:8881", // 姚镇接口 // dev: "http://81.69.231.72:8881", // 姚镇接口
// dev: "http://81.69.231.72:8881", // 测试接口 dev: "http://81.69.231.72:8881", // 测试接口
dev: "https://exam.smart-zj.cn:9100/smartExam/", // 新正式接口 // dev: "https://exam.smart-zj.cn:9100/smartExam/", // 新正式接口
}; };
// 腾讯地图 key // 腾讯地图 key
const map = { const map = {
......
...@@ -6,7 +6,6 @@ import "element-ui/lib/theme-chalk/index.css"; ...@@ -6,7 +6,6 @@ import "element-ui/lib/theme-chalk/index.css";
import { getToken } from "./utils/auth"; import { getToken } from "./utils/auth";
import "default-passive-events"; import "default-passive-events";
import store from "./store"; import store from "./store";
Vue.use(ElementUI); Vue.use(ElementUI);
Vue.config.productionTip = false; Vue.config.productionTip = false;
......
...@@ -294,6 +294,49 @@ const routes = [ ...@@ -294,6 +294,49 @@ const routes = [
meta: ["核酸采样结果"], meta: ["核酸采样结果"],
component: () => import("@/views/NucleicAcid/result.vue"), component: () => import("@/views/NucleicAcid/result.vue"),
}, },
// 便民生活圈
{
path: "/livingCircle/serviceType",
name: "serviceType",
meta: ["服务类型管理"],
component: () => import("@/views/livingCircle/serviceType.vue"),
},
{
path: "/livingCircle/searchTerms",
name: "serviceType",
meta: ["推荐搜索词管理"],
component: () => import("@/views/livingCircle/searchTerms.vue"),
},
{
path: "/livingCircle/serviceInfo",
name: "serviceType",
meta: ["服务信息管理"],
component: () => import("@/views/livingCircle/serviceInfo.vue"),
},
{
path: "/livingCircle/enter",
name: "enter",
meta: ["商家入驻审核"],
component: () => import("@/views/livingCircle/enter.vue"),
},
{
path: "/livingCircle/report",
name: "report",
meta: ["市民上报审核"],
component: () => import("@/views/livingCircle/report.vue"),
},
{
path: "/livingCircle/help",
name: "help",
meta: ["邻里求助审核"],
component: () => import("@/views/livingCircle/help.vue"),
},
{
path: "/livingCircle/helpInfo",
name: "helpInfo",
meta: ["邻里求助信息管理"],
component: () => import("@/views/livingCircle/helpInfo.vue"),
},
], ],
}, },
]; ];
......
...@@ -5,9 +5,9 @@ import { TokenKey } from "@/utils/auth"; ...@@ -5,9 +5,9 @@ import { TokenKey } from "@/utils/auth";
const config = { const config = {
// proxy: "https://exam.smart-zj.cn:9100/exam/", // 新线上地址 // proxy: "https://exam.smart-zj.cn:9100/exam/", // 新线上地址
// proxy: "http://81.69.231.72:8881", // 测试地址 proxy: "http://81.69.231.72:8881", // 测试地址
// proxy: "http://192.168.3.87:8881", //本地 // proxy: "http://192.168.3.87:8881", //本地
proxy: "https://exam.smart-zj.cn:9100/smartExam", // 新正式接口zs // proxy: "https://exam.smart-zj.cn:9100/smartExam", // 新正式接口zs
// proxy: "http://81.69.231.72:9089/", // 测试地址 // proxy: "http://81.69.231.72:9089/", // 测试地址
// proxy1: "http://81.69.231.72:8881/admin-api", // 测试地址 // proxy1: "http://81.69.231.72:8881/admin-api", // 测试地址
// proxy1: "https://exam.smart-zj.cn:9100/smartExam/admin-api", // 新正式接口 // proxy1: "https://exam.smart-zj.cn:9100/smartExam/admin-api", // 新正式接口
......
<template>
<div>
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane
:label="`我的待办 ( ${taskData.myTask} )`"
name="1"
></el-tab-pane>
<el-tab-pane
:label="`我的已办 ( ${taskData.finishedTask} )`"
name="2"
></el-tab-pane>
<el-tab-pane
:label="`所有任务 ( ${taskData.allTask} )`"
name="3"
></el-tab-pane>
</el-tabs>
<div class="table-wrapper">
<table-template
:tableData="tableData"
:tableColumns="tableColumns"
:loading="loading"
:pagination="pagination"
@Jump="jumpPage"
>
<el-table-column slot="icon" label="照片" align="center">
<template slot-scope="scope">
<el-image
style="width: 30px; height: 30px"
:src="scope.row.icon"
:preview-src-list="[scope.row.icon]"
>
</el-image>
</template>
</el-table-column>
<el-table-column slot="url" label="营业执照" align="center">
<template slot-scope="scope">
<el-image
style="width: 30px; height: 30px"
:src="scope.row.url"
:preview-src-list="[scope.row.url]"
>
</el-image>
</template>
</el-table-column>
<el-table-column slot="url1" label="身份证照片" align="center">
<template slot-scope="scope">
<el-image
style="width: 30px; height: 30px"
:src="scope.row.icon"
:preview-src-list="[scope.row.url1]"
>
</el-image>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="350" align="center">
<template slot-scope="scope">
<el-button type="primary" size="mini" round @click="view(scope.row)"
>查看</el-button
>
<el-button
type="success"
size="mini"
round
@click="pass(scope.row)"
class="btn"
>通过
</el-button>
<el-popconfirm
title="确定拒绝此申请吗?"
@confirm="deny(scope.row)"
>
<el-button type="danger" size="mini" round slot="reference"
>拒绝
</el-button>
</el-popconfirm>
</template>
</el-table-column>
</table-template>
</div>
</div>
</template>
<script>
import tableTemplate from "@/components/Table";
export default {
name: "enter",
components: { tableTemplate },
data() {
return {
taskData: {
myTask: 1,
finishedTask: 2,
allTask: 3,
},
activeName: "1",
loading: false,
tableData: [
{
name: "服务名称",
type: "所属类型",
icon: require("@/assets/1.png"),
wx: "1",
},
],
tableColumns: [
{
key: "name",
label: "商家名称",
},
{
key: "type",
label: "经营类型",
},
{
key: "address",
label: "详细地址",
},
{
key: "icon",
label: "照片",
type: "slot",
},
{
key: "phone",
label: "联系电话",
},
{
key: "url",
label: "营业执照",
type: "slot",
},
{
key: "url1",
label: "身份证",
type: "slot",
},
],
pagination: {
total: 0,
pageSize: 10,
currentPage: 1,
},
rules: {
name: [{ required: true, message: "请输入活动名称", trigger: "blur" }],
},
};
},
methods: {
init() {},
pass() {},
deny() {},
view() {},
handleClick() {
this.loading = true;
this.init();
this.loading = false;
console.log("this.init();--->", this.activeName);
},
jumpPage() {
this.init();
},
},
};
</script>
<style lang="stylus" scoped>
@import '~@/stylus/common';
.btn{
margin-right 10px
}
</style>
<template>
<div>
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane
:label="`我的待办 ( ${taskData.myTask} )`"
name="1"
></el-tab-pane>
<el-tab-pane
:label="`我的已办 ( ${taskData.finishedTask} )`"
name="2"
></el-tab-pane>
<el-tab-pane
:label="`所有任务 ( ${taskData.allTask} )`"
name="3"
></el-tab-pane>
</el-tabs>
<div class="table-wrapper">
<table-template
:tableData="tableData"
:tableColumns="tableColumns"
:loading="loading"
:pagination="pagination"
@Jump="jumpPage"
>
<el-table-column slot="icon" label="照片" align="center">
<template slot-scope="scope">
<el-image
style="width: 30px; height: 30px"
:src="scope.row.icon"
:preview-src-list="[scope.row.icon]"
>
</el-image>
</template>
</el-table-column>
<el-table-column slot="url" label="营业执照" align="center">
<template slot-scope="scope">
<el-image
style="width: 30px; height: 30px"
:src="scope.row.url"
:preview-src-list="[scope.row.url]"
>
</el-image>
</template>
</el-table-column>
<el-table-column slot="url1" label="身份证照片" align="center">
<template slot-scope="scope">
<el-image
style="width: 30px; height: 30px"
:src="scope.row.icon"
:preview-src-list="[scope.row.url1]"
>
</el-image>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="350" align="center">
<template slot-scope="scope">
<el-button type="primary" size="mini" round @click="view(scope.row)"
>查看</el-button
>
<el-button
type="success"
size="mini"
round
@click="pass(scope.row)"
class="btn"
>通过
</el-button>
<el-popconfirm
title="确定拒绝此申请吗?"
@confirm="deny(scope.row)"
>
<el-button type="danger" size="mini" round slot="reference"
>拒绝
</el-button>
</el-popconfirm>
</template>
</el-table-column>
</table-template>
</div>
</div>
</template>
<script>
import tableTemplate from "@/components/Table";
export default {
name: "enter",
components: { tableTemplate },
data() {
return {
taskData: {
myTask: 1,
finishedTask: 2,
allTask: 3,
},
activeName: "1",
loading: false,
tableData: [
{
name: "服务名称",
type: "所属类型",
icon: require("@/assets/1.png"),
wx: "1",
},
],
tableColumns: [
{
key: "name",
label: "商家名称",
},
{
key: "type",
label: "经营类型",
},
{
key: "address",
label: "详细地址",
},
{
key: "icon",
label: "照片",
type: "slot",
},
{
key: "phone",
label: "联系电话",
},
{
key: "url",
label: "营业执照",
type: "slot",
},
{
key: "url1",
label: "身份证",
type: "slot",
},
],
pagination: {
total: 0,
pageSize: 10,
currentPage: 1,
},
rules: {
name: [{ required: true, message: "请输入活动名称", trigger: "blur" }],
},
};
},
methods: {
init() {},
pass() {},
deny() {},
view() {},
handleClick() {
this.loading = true;
this.init();
this.loading = false;
console.log("this.init();--->", this.activeName);
},
jumpPage() {
this.init();
},
},
};
</script>
<style lang="stylus" scoped>
@import '~@/stylus/common';
.btn{
margin-right 10px
}
</style>
<template>
<div>
<div class="search-wrapper">
<el-form
:inline="true"
:model="searchForm"
class="search_form"
style="text-align: left"
>
<el-form-item label="用户名称">
<el-input
v-model="searchForm.name"
placeholder="请输入用户名称"
@keyup.enter.native="onSubmit"
></el-input>
</el-form-item>
<el-form-item label="需求类型">
<el-select
v-model="searchForm.typeId"
placeholder="请选择需求类型"
@change="onSubmit"
size="medium"
>
<el-option
v-for="item in TypeList"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-form>
</div>
<div class="table-wrapper">
<table-template
:tableData="tableData"
:tableColumns="tableColumns"
:loading="loading"
:pagination="pagination"
@Jump="jumpPage"
>
<el-table-column slot="icon" label="服务图标" align="center">
<template slot-scope="scope">
<el-image
style="width: 30px; height: 30px"
:src="scope.row.icon"
:preview-src-list="[scope.row.icon]"
>
</el-image>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="350" align="center">
<template slot-scope="scope">
<el-button type="primary" size="mini" round @click="view(scope.row)"
>查看</el-button
>
<el-button
type="success"
size="mini"
class="btn"
round
@click="edit(scope.row)"
>编辑</el-button
>
<el-popconfirm title="确定删除此数据吗?" @confirm="del(scope.row)">
<el-button type="warning" size="mini" round slot="reference"
>删除</el-button
>
</el-popconfirm>
</template>
</el-table-column>
</table-template>
</div>
<el-dialog title="编辑" :visible.sync="dialogVisible" width="30%">
<el-form
:model="dataForm"
:rules="rules"
ref="ruleForm"
label-width="100px"
class="demo-ruleForm"
>
<el-form-item label="服务名称" prop="name">
<el-input v-model="dataForm.name"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="dialogVisible = false"
>确 定</el-button
>
</span>
</el-dialog>
</div>
</template>
<script>
import TableTemplate from "@/components/Table";
export default {
components: { TableTemplate },
data() {
return {
searchForm: {},
TypeList: [],
loading: false,
tableData: [
{
name: "服务名称",
type: "所属类型",
icon: require("@/assets/1.png"),
wx: "1",
},
],
tableColumns: [
{
key: "name",
label: "用户名称",
},
{
key: "type",
label: "需求类型",
},
{
key: "desc",
label: "需求描述",
},
{
key: "address",
label: "详细地址",
},
{
key: "icon",
label: "照片",
type: "slot",
},
{
key: "phone",
label: "联系电话",
},
{
key: "wx",
label: "微信号",
},
],
pagination: {
total: 0,
pageSize: 10,
currentPage: 1,
},
rules: {
name: [{ required: true, message: "请输入活动名称", trigger: "blur" }],
},
dataForm: {},
dialogVisible: false,
};
},
watch: {
dialogVisible(val) {
if (!val) {
this.$refs.ruleForm.resetFields();
}
},
},
created() {
this.init();
},
methods: {
init() {},
onSubmit() {},
jumpPage() {
this.init();
},
view() {
this.dialogVisible = true;
},
edit() {
this.dialogVisible = true;
},
del() {},
},
};
</script>
<style lang="stylus" scoped>
@import '~@/stylus/common';
.btn{
margin-right 10px
}
</style>
<template>
<div>
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane
:label="`我的待办 ( ${taskData.myTask} )`"
name="1"
></el-tab-pane>
<el-tab-pane
:label="`我的已办 ( ${taskData.finishedTask} )`"
name="2"
></el-tab-pane>
<el-tab-pane
:label="`所有任务 ( ${taskData.allTask} )`"
name="3"
></el-tab-pane>
</el-tabs>
<div class="table-wrapper">
<table-template
:tableData="tableData"
:tableColumns="tableColumns"
:loading="loading"
:pagination="pagination"
@Jump="jumpPage"
>
<el-table-column slot="icon" label="照片" align="center">
<template slot-scope="scope">
<el-image
style="width: 30px; height: 30px"
:src="scope.row.icon"
:preview-src-list="[scope.row.icon]"
>
</el-image>
</template>
</el-table-column>
<el-table-column slot="url" label="营业执照" align="center">
<template slot-scope="scope">
<el-image
style="width: 30px; height: 30px"
:src="scope.row.url"
:preview-src-list="[scope.row.url]"
>
</el-image>
</template>
</el-table-column>
<el-table-column slot="url1" label="身份证照片" align="center">
<template slot-scope="scope">
<el-image
style="width: 30px; height: 30px"
:src="scope.row.icon"
:preview-src-list="[scope.row.url1]"
>
</el-image>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="350" align="center">
<template slot-scope="scope">
<el-button type="primary" size="mini" round @click="view(scope.row)"
>查看</el-button
>
<el-button
type="success"
size="mini"
round
@click="pass(scope.row)"
class="btn"
>通过
</el-button>
<el-popconfirm
title="确定拒绝此申请吗?"
@confirm="deny(scope.row)"
>
<el-button type="danger" size="mini" round slot="reference"
>拒绝
</el-button>
</el-popconfirm>
</template>
</el-table-column>
</table-template>
</div>
</div>
</template>
<script>
import tableTemplate from "@/components/Table";
export default {
name: "enter",
components: { tableTemplate },
data() {
return {
taskData: {
myTask: 1,
finishedTask: 2,
allTask: 3,
},
activeName: "1",
loading: false,
tableData: [
{
name: "服务名称",
type: "所属类型",
icon: require("@/assets/1.png"),
wx: "1",
},
],
tableColumns: [
{
key: "name",
label: "商家名称",
},
{
key: "type",
label: "经营类型",
},
{
key: "address",
label: "详细地址",
},
{
key: "icon",
label: "照片",
type: "slot",
},
{
key: "phone",
label: "联系电话",
},
{
key: "url",
label: "营业执照",
type: "slot",
},
{
key: "url1",
label: "身份证",
type: "slot",
},
],
pagination: {
total: 0,
pageSize: 10,
currentPage: 1,
},
rules: {
name: [{ required: true, message: "请输入活动名称", trigger: "blur" }],
},
};
},
methods: {
init() {},
pass() {},
deny() {},
view() {},
handleClick() {
this.loading = true;
this.init();
this.loading = false;
console.log("this.init();--->", this.activeName);
},
jumpPage() {
this.init();
},
},
};
</script>
<style lang="stylus" scoped>
@import '~@/stylus/common';
.btn{
margin-right 10px
}
</style>
<template>
<div>
<div class="search-wrapper">
<el-form
:inline="true"
:model="searchForm"
class="search_form"
style="text-align: left"
>
<el-form-item label="推荐搜索词">
<el-input
v-model="searchForm.name"
placeholder="请输入推荐搜索词"
@keyup.enter.native="onSubmit"
></el-input>
</el-form-item>
</el-form>
</div>
<div class="table-wrapper">
<table-template
:tableData="tableData"
:tableColumns="tableColumns"
:loading="loading"
:pagination="pagination"
@Jump="jumpPage"
>
<el-table-column slot="icon" label="服务图标" align="center">
<template slot-scope="scope">
<el-image
style="width: 30px; height: 30px"
:src="scope.row.icon"
:preview-src-list="[scope.row.icon]"
>
</el-image>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="350" align="center">
<template slot-scope="scope">
<el-button
type="success"
size="mini"
class="btn"
round
@click="view(scope.row)"
>编辑</el-button
>
<el-popconfirm title="确定删除此数据吗?" @confirm="del(scope.row)">
<el-button type="warning" size="mini" round slot="reference"
>删除</el-button
>
</el-popconfirm>
</template>
</el-table-column>
</table-template>
</div>
<el-dialog title="编辑" :visible.sync="dialogVisible" width="30%">
<el-form
:model="dataForm"
:rules="rules"
ref="ruleForm"
label-width="100px"
class="demo-ruleForm"
>
<el-form-item label="服务名称" prop="name">
<el-input v-model="dataForm.name"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="dialogVisible = false"
>确 定</el-button
>
</span>
</el-dialog>
</div>
</template>
<script>
import TableTemplate from "@/components/Table";
export default {
components: { TableTemplate },
data() {
return {
searchForm: {},
TypeList: [],
loading: false,
tableData: [
{
name: "便利店",
sort: "1",
},
],
tableColumns: [
{
key: "name",
label: "推荐搜索词",
},
{
key: "sort",
label: "排序",
},
],
pagination: {
total: 0,
pageSize: 10,
currentPage: 1,
},
rules: {
name: [{ required: true, message: "请输入活动名称", trigger: "blur" }],
},
dataForm: {},
dialogVisible: false,
};
},
watch: {
dialogVisible(val) {
if (!val) {
this.$refs.ruleForm.resetFields();
}
},
},
created() {
this.init();
},
methods: {
init() {},
onSubmit() {},
jumpPage() {
this.init();
},
view() {
this.dialogVisible = true;
},
del() {},
},
};
</script>
<style lang="stylus" scoped>
@import '~@/stylus/common';
.btn{
margin-right 10px
}
</style>
<template>
<div>
<div class="search-wrapper">
<el-form
:inline="true"
:model="searchForm"
class="search_form"
style="text-align: left"
>
<el-form-item label="地点名称">
<el-input
v-model="searchForm.name"
placeholder="请输入地点名称"
@keyup.enter.native="onSubmit"
></el-input>
</el-form-item>
<el-form-item>
<el-upload
action="#"
:http-request="uploadSubmit"
:limit="1"
ref="upload"
:show-file-list="false"
>
<el-button type="primary">批量导入 </el-button>
</el-upload>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="addAddress">新增地点</el-button>
</el-form-item>
</el-form>
</div>
<div class="medium">
<div class="table-wrapper leftTree">
<el-tree
:data="treeData"
:props="defaultProps"
@node-click="handleNodeClick"
></el-tree>
</div>
<div class="table-wrapper rightTable">
<table-template
:tableData="tableData"
:tableColumns="tableColumns"
:loading="loading"
:pagination="pagination"
@Jump="jumpPage"
:indexShow="true"
>
<el-table-column slot="icon" label="服务图标" align="center">
<template slot-scope="scope">
<el-image
style="width: 30px; height: 30px"
:src="scope.row.icon"
:preview-src-list="[scope.row.icon]"
>
</el-image>
</template>
</el-table-column>
<el-table-column
fixed="right"
label="操作"
width="350"
align="center"
>
<template slot-scope="scope">
<el-button
type="success"
size="mini"
class="btn"
round
@click="view(scope.row)"
>编辑</el-button
>
<el-popconfirm
title="确定删除此数据吗?"
@confirm="del(scope.row)"
>
<el-button type="warning" size="mini" round slot="reference"
>删除</el-button
>
</el-popconfirm>
</template>
</el-table-column>
</table-template>
</div>
</div>
<el-dialog title="编辑" :visible.sync="dialogVisible" width="30%">
<el-form
:model="dataForm"
:rules="rules"
ref="ruleForm"
label-width="100px"
class="demo-ruleForm"
>
<el-form-item label="服务名称" prop="name">
<el-input v-model="dataForm.name"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="dialogVisible = false"
>确 定</el-button
>
</span>
</el-dialog>
</div>
</template>
<script>
import TableTemplate from "@/components/Table";
export default {
components: { TableTemplate },
data() {
return {
searchForm: {},
TypeList: [],
loading: false,
tableData: [
{
name: "便利店",
sort: "1",
},
],
tableColumns: [
{
key: "name",
label: "地点名称",
},
{
key: "type",
label: "地点类型",
},
{
key: "lng",
label: "经度",
},
{
key: "lat",
label: "纬度",
},
{
key: "address",
label: "详细地址",
},
{
key: "icon",
label: "照片",
type: "slot",
},
{
key: "phone",
label: "联系电话",
},
{
key: "openTime",
label: "开店时间",
},
{
key: "closeTime",
label: "闭店时间",
},
],
pagination: {
total: 0,
pageSize: 10,
currentPage: 1,
},
rules: {
name: [{ required: true, message: "请输入活动名称", trigger: "blur" }],
},
dataForm: {},
dialogVisible: false,
defaultProps: {
children: "children",
label: "label",
},
treeData: [
{
label: "一级 1",
children: [
{
label: "二级 1-1",
children: [
{
label: "三级 1-1-1",
},
],
},
],
},
{
label: "一级 2",
children: [
{
label: "二级 2-1",
children: [
{
label: "三级 2-1-1",
},
],
},
{
label: "二级 2-2",
children: [
{
label: "三级 2-2-1",
},
],
},
],
},
{
label: "一级 3",
children: [
{
label: "二级 3-1",
children: [
{
label: "三级 3-1-1",
},
],
},
{
label: "二级 3-2",
children: [
{
label: "三级 3-2-1",
},
],
},
],
},
],
};
},
watch: {
dialogVisible(val) {
if (!val) {
this.$refs.ruleForm.resetFields();
}
},
},
created() {
this.init();
},
methods: {
init() {},
onSubmit() {},
jumpPage() {
this.init();
},
view() {
this.dialogVisible = true;
},
del() {},
// 新增地点
addAddress() {},
uploadSubmit(file) {
let formData = new FormData();
formData.append("file", file.file);
// importAlgorithm(formData)
// .then((res) => {
// if (res.success) {
// this.$message.success("导入成功");
// this.$refs.upload.clearFiles();
// } else {
// this.$message.warning(res.errMsg || "导入失败");
// this.$refs.upload.clearFiles();
// }
// })
// .catch(() => {
// this.$message.warning("导入失败");
// this.$refs.upload.clearFiles();
// })
// .finally(() => {
// this.init();
// });
},
handleNodeClick(data) {
console.log(data);
},
},
};
</script>
<style lang="stylus" scoped>
@import '~@/stylus/common';
.btn{
margin-right 10px
}
.medium{
display flex
.leftTree{
background #fff !important
width 280px
margin-right 15px
}
.rightTable{
flex-grow 1
}
}
</style>
<template>
<div>
<div class="search-wrapper">
<el-form
:inline="true"
:model="searchForm"
class="search_form"
style="text-align: left"
>
<el-form-item label="服务名称">
<el-input
v-model="searchForm.name"
placeholder="请输入服务名称"
@keyup.enter.native="onSubmit"
></el-input>
</el-form-item>
<el-form-item label="服务类型">
<el-select
v-model="searchForm.typeId"
placeholder="请选择服务类型"
@change="onSubmit"
size="medium"
>
<el-option
v-for="item in TypeList"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-form>
</div>
<div class="table-wrapper">
<table-template
:tableData="tableData"
:tableColumns="tableColumns"
:loading="loading"
:pagination="pagination"
@Jump="jumpPage"
>
<el-table-column slot="icon" label="服务图标" align="center">
<template slot-scope="scope">
<el-image
style="width: 30px; height: 30px"
:src="scope.row.icon"
:preview-src-list="[scope.row.icon]"
>
</el-image>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="350" align="center">
<template slot-scope="scope">
<el-button
type="success"
size="mini"
class="btn"
round
@click="view(scope.row)"
>编辑</el-button
>
<el-popconfirm title="确定删除此数据吗?" @confirm="del(scope.row)">
<el-button type="warning" size="mini" round slot="reference"
>删除</el-button
>
</el-popconfirm>
</template>
</el-table-column>
</table-template>
</div>
<el-dialog title="编辑" :visible.sync="dialogVisible" width="30%">
<el-form
:model="dataForm"
:rules="rules"
ref="ruleForm"
label-width="100px"
class="demo-ruleForm"
>
<el-form-item label="服务名称" prop="name">
<el-input v-model="dataForm.name"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="dialogVisible = false"
>确 定</el-button
>
</span>
</el-dialog>
</div>
</template>
<script>
import TableTemplate from "@/components/Table";
export default {
components: { TableTemplate },
data() {
return {
searchForm: {},
TypeList: [],
loading: false,
tableData: [
{
name: "服务名称",
type: "所属类型",
icon: require("@/assets/1.png"),
sort: "1",
},
],
tableColumns: [
{
key: "name",
label: "服务名称",
},
{
key: "type",
label: "所属类型",
},
{
key: "icon",
label: "服务图标",
type: "slot",
},
{
key: "sort",
label: "排序",
},
],
pagination: {
total: 0,
pageSize: 10,
currentPage: 1,
},
rules: {
name: [{ required: true, message: "请输入活动名称", trigger: "blur" }],
},
dataForm: {},
dialogVisible: false,
};
},
watch: {
dialogVisible(val) {
if (!val) {
this.$refs.ruleForm.resetFields();
}
},
},
created() {
this.init();
},
methods: {
init() {},
onSubmit() {},
jumpPage() {
this.init();
},
view() {
this.dialogVisible = true;
},
del() {},
},
};
</script>
<style lang="stylus" scoped>
@import '~@/stylus/common';
.btn{
margin-right 10px
}
</style>
const env = process.env.NODE_ENV === "production"; const env = process.env.NODE_ENV === "production";
const publicPath = env ? "/manage-h5/" : "/"; //正式 // const publicPath = env ? "/manage-h5/" : "/"; //正式
// const publicPath = env ? "/smartExam-h5/" : "/"; //测试 const publicPath = env ? "/smartExam-h5/" : "/"; //测试
module.exports = { module.exports = {
publicPath, publicPath,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment