咨询信息 咨询分类
This commit is contained in:
parent
831f2becc0
commit
798504339c
44
src/api/manage/category.js
Normal file
44
src/api/manage/category.js
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询资讯分类列表
|
||||||
|
export function listCategory(query) {
|
||||||
|
return request({
|
||||||
|
url: '/manage/category/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询资讯分类详细
|
||||||
|
export function getCategory(id) {
|
||||||
|
return request({
|
||||||
|
url: '/manage/category/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增资讯分类
|
||||||
|
export function addCategory(data) {
|
||||||
|
return request({
|
||||||
|
url: '/manage/category',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改资讯分类
|
||||||
|
export function updateCategory(data) {
|
||||||
|
return request({
|
||||||
|
url: '/manage/category',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除资讯分类
|
||||||
|
export function delCategory(id) {
|
||||||
|
return request({
|
||||||
|
url: '/manage/category/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
44
src/api/manage/info.js
Normal file
44
src/api/manage/info.js
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询资讯信息列表
|
||||||
|
export function listInfo(query) {
|
||||||
|
return request({
|
||||||
|
url: '/manage/info/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询资讯信息详细
|
||||||
|
export function getInfo(id) {
|
||||||
|
return request({
|
||||||
|
url: '/manage/info/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增资讯信息
|
||||||
|
export function addInfo(data) {
|
||||||
|
return request({
|
||||||
|
url: '/manage/info',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改资讯信息
|
||||||
|
export function updateInfo(data) {
|
||||||
|
return request({
|
||||||
|
url: '/manage/info',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除资讯信息
|
||||||
|
export function delInfo(id) {
|
||||||
|
return request({
|
||||||
|
url: '/manage/info/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
@ -23,8 +23,14 @@ export function uploadScriptInfo(data) {
|
|||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 咨询图标
|
||||||
|
export function picUpload(data) {
|
||||||
|
return request({
|
||||||
|
url: '/manage/info/picUpload',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
//海报视频上传
|
//海报视频上传
|
||||||
export function updatePoserHeads(data) {
|
export function updatePoserHeads(data) {
|
||||||
return request({
|
return request({
|
||||||
|
|||||||
589
src/views/manage/category/index.vue
Normal file
589
src/views/manage/category/index.vue
Normal file
@ -0,0 +1,589 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form
|
||||||
|
:model="queryParams"
|
||||||
|
ref="queryForm"
|
||||||
|
size="small"
|
||||||
|
:inline="true"
|
||||||
|
v-show="showSearch"
|
||||||
|
label-width="100px"
|
||||||
|
>
|
||||||
|
<el-form-item label="资讯分类编码" prop="infoCategoryCode">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.infoCategoryCode"
|
||||||
|
placeholder="请输入资讯分类编码"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资讯分类名称" prop="infoCategoryName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.infoCategoryName"
|
||||||
|
placeholder="请输入资讯分类名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="资讯分类排序" prop="infoCategorySort">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.infoCategorySort"
|
||||||
|
placeholder="请输入资讯分类排序"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资讯创建人" prop="infoCategoryCreator">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.infoCategoryCreator"
|
||||||
|
placeholder="请输入资讯创建人"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资讯创建时间" prop="infoCategoryCreateTime">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="queryParams.infoCategoryCreateTime"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择资讯创建时间">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="修改人" prop="infoCategoryReviser">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.infoCategoryReviser"
|
||||||
|
placeholder="请输入修改人"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="修改时间" prop="infoCategoryModifyTime">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="queryParams.infoCategoryModifyTime"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择修改时间">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item> -->
|
||||||
|
<el-form-item>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
size="mini"
|
||||||
|
@click="handleQuery"
|
||||||
|
>搜索</el-button
|
||||||
|
>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
||||||
|
>重置</el-button
|
||||||
|
>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['manage:category:add']"
|
||||||
|
>新增</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
plain
|
||||||
|
icon="el-icon-edit"
|
||||||
|
size="mini"
|
||||||
|
:disabled="single"
|
||||||
|
@click="handleUpdate"
|
||||||
|
v-hasPermi="['manage:category:edit']"
|
||||||
|
>修改</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete"
|
||||||
|
v-hasPermi="['manage:category:remove']"
|
||||||
|
>删除</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<!-- <el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="mini"
|
||||||
|
@click="handleExport"
|
||||||
|
v-hasPermi="['manage:category:export']"
|
||||||
|
>导出</el-button>
|
||||||
|
</el-col> -->
|
||||||
|
<right-toolbar
|
||||||
|
:showSearch.sync="showSearch"
|
||||||
|
@queryTable="getList"
|
||||||
|
></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="categoryList"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
>
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<!-- <el-table-column label="主键id" align="center" prop="id" /> -->
|
||||||
|
<el-table-column
|
||||||
|
label="资讯分类编码"
|
||||||
|
align="center"
|
||||||
|
prop="infoCategoryCode"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="资讯分类名称"
|
||||||
|
align="center"
|
||||||
|
prop="infoCategoryName"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="资讯分类类型"
|
||||||
|
align="center"
|
||||||
|
prop="infoCatrgoryType"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="资讯分类排序"
|
||||||
|
align="center"
|
||||||
|
prop="infoCategorySort"
|
||||||
|
/>
|
||||||
|
<!-- <el-table-column label="资讯创建人" align="center" prop="infoCategoryCreator" />
|
||||||
|
<el-table-column label="资讯创建时间" align="center" prop="infoCategoryCreateTime" width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.infoCategoryCreateTime, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="修改人" align="center" prop="infoCategoryReviser" />
|
||||||
|
<el-table-column label="修改时间" align="center" prop="infoCategoryModifyTime" width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.infoCategoryModifyTime, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column> -->
|
||||||
|
<el-table-column
|
||||||
|
label="操作"
|
||||||
|
align="center"
|
||||||
|
class-name="small-padding fixed-width"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['manage:category:edit']"
|
||||||
|
>修改</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['manage:category:remove']"
|
||||||
|
>删除</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total > 0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 添加或修改资讯分类对话框 -->
|
||||||
|
<el-dialog :title="title" :visible.sync="addopen" width="1100px" append-to-body>
|
||||||
|
<el-form
|
||||||
|
ref="form"
|
||||||
|
:model="form"
|
||||||
|
:rules="rules"
|
||||||
|
label-width="110px"
|
||||||
|
:inline="true"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
v-for="(item, index) in form.infoCategory"
|
||||||
|
:key="index"
|
||||||
|
style="margin-top: 20px; border-bottom: 1px solid #f3f3f3"
|
||||||
|
>
|
||||||
|
<el-form-item
|
||||||
|
label="资讯分类名称"
|
||||||
|
:rules="rules.infoCategory.infoCategoryName"
|
||||||
|
:prop="`infoCategory.${index}.infoCategoryName`"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
maxlength="100"
|
||||||
|
style="width: 200px"
|
||||||
|
v-model="item.infoCategoryName"
|
||||||
|
placeholder="请输入资讯分类名称"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
label="资讯分类排序"
|
||||||
|
:rules="rules.infoCategory.infoCategorySort"
|
||||||
|
:prop="`infoCategory.${index}.infoCategorySort`"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model.number="item.infoCategorySort"
|
||||||
|
maxlength="5"
|
||||||
|
oninput="value=value.replace(/[^\d]/g,'')"
|
||||||
|
style="width: 200px"
|
||||||
|
placeholder="请输入资讯分类排序"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item
|
||||||
|
label="资讯分类类型"
|
||||||
|
:rules="rules.infoCategory.infoCatrgoryType"
|
||||||
|
:prop="`infoCategory.${index}.infoCatrgoryType`"
|
||||||
|
>
|
||||||
|
<el-select
|
||||||
|
v-model="item.infoCatrgoryType"
|
||||||
|
placeholder="请选择"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in options"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item> -->
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
circle
|
||||||
|
plain
|
||||||
|
icon="el-icon-circle-plus-outline"
|
||||||
|
@click="adddisease"
|
||||||
|
v-if="index == 0"
|
||||||
|
></el-button>
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
circle
|
||||||
|
plain
|
||||||
|
@click="deldisease(index)"
|
||||||
|
v-if="index != 0"
|
||||||
|
>
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</el-form>
|
||||||
|
<!-- <el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-form-item label="资讯分类编码" prop="infoCategoryCode">
|
||||||
|
<el-input v-model="form.infoCategoryCode" placeholder="请输入资讯分类编码" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资讯分类名称" prop="infoCategoryName">
|
||||||
|
<el-input v-model="form.infoCategoryName" placeholder="请输入资讯分类名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资讯分类排序" prop="infoCategorySort">
|
||||||
|
<el-input v-model="form.infoCategorySort" placeholder="请输入资讯分类排序" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资讯创建人" prop="infoCategoryCreator">
|
||||||
|
<el-input v-model="form.infoCategoryCreator" placeholder="请输入资讯创建人" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资讯创建时间" prop="infoCategoryCreateTime">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="form.infoCategoryCreateTime"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择资讯创建时间">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="修改人" prop="infoCategoryReviser">
|
||||||
|
<el-input v-model="form.infoCategoryReviser" placeholder="请输入修改人" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="修改时间" prop="infoCategoryModifyTime">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="form.infoCategoryModifyTime"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择修改时间">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form> -->
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
<!-- 修改 -->
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
|
||||||
|
<el-form-item label="资讯分类名称" prop="infoCategoryName">
|
||||||
|
<el-input
|
||||||
|
v-model="form.infoCategoryName"
|
||||||
|
placeholder="请输入资讯分类名称"
|
||||||
|
style="width: 250px"
|
||||||
|
maxlength="100"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="资讯分类排序" prop="infoCategorySort">
|
||||||
|
<el-input
|
||||||
|
oninput="value=value.replace(/[^\d]/g,'')"
|
||||||
|
v-model.number="form.infoCategorySort"
|
||||||
|
placeholder="请输入分类排序"
|
||||||
|
style="width: 250px"
|
||||||
|
maxlength="5"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资讯分类类型" prop="infoCatrgoryType">
|
||||||
|
<el-select
|
||||||
|
v-model="form.infoCatrgoryType"
|
||||||
|
placeholder="请选择"
|
||||||
|
style="width: 250px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in options"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listCategory, getCategory, delCategory, addCategory, updateCategory } from "@/api/manage/category";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Category",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
value: "HEALTH_NOUS",
|
||||||
|
label: "健康常识",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "NURSING_NEWS",
|
||||||
|
label: "护理新闻",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 资讯分类表格数据
|
||||||
|
categoryList: [],
|
||||||
|
infoCategory: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
addopen:false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
infoCategoryCode: null,
|
||||||
|
infoCategoryName: null,
|
||||||
|
infoCatrgoryType: null,
|
||||||
|
infoCategorySort: null,
|
||||||
|
infoCategoryCreator: null,
|
||||||
|
infoCategoryCreateTime: null,
|
||||||
|
infoCategoryReviser: null,
|
||||||
|
infoCategoryModifyTime: null
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
infoCategory: {
|
||||||
|
infoCategoryName: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请选择资讯分类名称",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
|
||||||
|
// infoCatrgoryType: [
|
||||||
|
// {
|
||||||
|
// required: true,
|
||||||
|
// message: "请选择资讯分类类型",
|
||||||
|
// trigger: "blur",
|
||||||
|
// },
|
||||||
|
// ],
|
||||||
|
infoCategorySort: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请选择资讯分类排序",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
infoCategoryName: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请选择资讯分类名称",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
|
||||||
|
// infoCatrgoryType: [
|
||||||
|
// {
|
||||||
|
// required: true,
|
||||||
|
// message: "请选择资讯分类类型",
|
||||||
|
// trigger: "blur",
|
||||||
|
// },
|
||||||
|
// ],
|
||||||
|
infoCategorySort: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请选择资讯分类排序",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询资讯分类列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listCategory(this.queryParams).then(response => {
|
||||||
|
this.categoryList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.addopen = false;
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
infoCategory: [
|
||||||
|
{
|
||||||
|
|
||||||
|
infoCategoryName: null,
|
||||||
|
// infoCatrgoryType: null,
|
||||||
|
infoCategorySort: null,
|
||||||
|
|
||||||
|
},
|
||||||
|
],
|
||||||
|
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.id)
|
||||||
|
this.single = selection.length !== 1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.reset();
|
||||||
|
this.addopen = true;
|
||||||
|
this.title = "添加资讯分类";
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset();
|
||||||
|
const id = row.id || this.ids
|
||||||
|
getCategory(id).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改资讯分类";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//删除deldisease
|
||||||
|
deldisease(index) {
|
||||||
|
this.form.infoCategory.splice(index, 1);
|
||||||
|
},
|
||||||
|
adddisease() {
|
||||||
|
var obj = {
|
||||||
|
infoCategoryName: "",
|
||||||
|
// infoCatrgoryType: "",
|
||||||
|
infoCategorySort: "",
|
||||||
|
};
|
||||||
|
if (this.form.infoCategory.length == 5) {
|
||||||
|
this.$message.error("最多只能5条");
|
||||||
|
} else {
|
||||||
|
this.form.infoCategory.push(obj);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.id != null) {
|
||||||
|
updateCategory(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addCategory(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.addopen = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const ids = row.id || this.ids;
|
||||||
|
this.$modal.confirm('是否确认删除资讯分类编号为"' + ids + '"的数据项?').then(function () {
|
||||||
|
return delCategory(ids);
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => { });
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('manage/category/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `category_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
967
src/views/manage/info/index.vue
Normal file
967
src/views/manage/info/index.vue
Normal file
@ -0,0 +1,967 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form
|
||||||
|
:model="queryParams"
|
||||||
|
ref="queryForm"
|
||||||
|
size="small"
|
||||||
|
:inline="true"
|
||||||
|
v-show="showSearch"
|
||||||
|
label-width="68px"
|
||||||
|
>
|
||||||
|
<el-form-item label="资讯标题" prop="infoTitle">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.infoTitle"
|
||||||
|
placeholder="请输入资讯标题"
|
||||||
|
maxlength="100"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="资讯分类" prop="infoCategoryId">
|
||||||
|
<el-button
|
||||||
|
type=""
|
||||||
|
v-if="queryParams.infoCategoryName == '请选择资讯分类'"
|
||||||
|
@click="clickitem()"
|
||||||
|
style="
|
||||||
|
width: 250px;
|
||||||
|
text-align: left;
|
||||||
|
height: 36px;
|
||||||
|
color: #c0c4cc;
|
||||||
|
overflow: hidden;
|
||||||
|
"
|
||||||
|
>{{ queryParams.infoCategoryName }}</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
@click="clickitem()"
|
||||||
|
type=""
|
||||||
|
v-else
|
||||||
|
style="
|
||||||
|
width: 250px;
|
||||||
|
text-align: left;
|
||||||
|
height: 36px;
|
||||||
|
padding-left: -10px;
|
||||||
|
overflow: hidden;
|
||||||
|
"
|
||||||
|
>{{ queryParams.infoCategoryName }}</el-button
|
||||||
|
>
|
||||||
|
</el-form-item>
|
||||||
|
<!-- </el-form-item> -->
|
||||||
|
<el-form-item label="资讯编码" prop="infoCode">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.infoCode"
|
||||||
|
placeholder="请输入资讯编码"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<!-- <el-form-item label="资讯所属分类id" prop="infoCategoryId">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.infoCategoryId"
|
||||||
|
placeholder="请输入资讯所属分类id"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资讯标题" prop="infoTitle">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.infoTitle"
|
||||||
|
placeholder="请输入资讯标题"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资讯编码" prop="infoCode">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.infoCode"
|
||||||
|
placeholder="请输入资讯编码"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="咨询点击次数" prop="infoClickCount">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.infoClickCount"
|
||||||
|
placeholder="请输入咨询点击次数"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资讯跳转路径" prop="infoJumpLink">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.infoJumpLink"
|
||||||
|
placeholder="请输入资讯跳转路径"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资讯来源" prop="infoSource">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.infoSource"
|
||||||
|
placeholder="请输入资讯来源"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资讯缩略图地址" prop="infoMainThumbnailUrl">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.infoMainThumbnailUrl"
|
||||||
|
placeholder="请输入资讯缩略图地址"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资讯负缩略图1地址" prop="infoNegativeOneThumbnailUrl">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.infoNegativeOneThumbnailUrl"
|
||||||
|
placeholder="请输入资讯负缩略图1地址"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资讯负缩略图2地址" prop="infoNegativeTwoThumbnailUrl">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.infoNegativeTwoThumbnailUrl"
|
||||||
|
placeholder="请输入资讯负缩略图2地址"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资讯大图地址" prop="infoLargePictureUrl">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.infoLargePictureUrl"
|
||||||
|
placeholder="请输入资讯大图地址"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资讯排序" prop="infoSort">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.infoSort"
|
||||||
|
placeholder="请输入资讯排序"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资讯创建人" prop="infoCreator">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.infoCreator"
|
||||||
|
placeholder="请输入资讯创建人"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资讯创建时间" prop="infoCreateTime">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="queryParams.infoCreateTime"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择资讯创建时间">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资讯修改人" prop="infoReviser">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.infoReviser"
|
||||||
|
placeholder="请输入资讯修改人"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资讯修改时间" prop="infoModifyTime">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="queryParams.infoModifyTime"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择资讯修改时间">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item> -->
|
||||||
|
<el-form-item>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
size="mini"
|
||||||
|
@click="handleQuery"
|
||||||
|
>搜索</el-button
|
||||||
|
>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
||||||
|
>重置</el-button
|
||||||
|
>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['manage:info:add']"
|
||||||
|
>新增</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
plain
|
||||||
|
icon="el-icon-edit"
|
||||||
|
size="mini"
|
||||||
|
:disabled="single"
|
||||||
|
@click="handleUpdate"
|
||||||
|
v-hasPermi="['manage:info:edit']"
|
||||||
|
>修改</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete"
|
||||||
|
v-hasPermi="['manage:info:remove']"
|
||||||
|
>删除</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<!-- <el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="mini"
|
||||||
|
@click="handleExport"
|
||||||
|
v-hasPermi="['manage:info:export']"
|
||||||
|
>导出</el-button>
|
||||||
|
</el-col> -->
|
||||||
|
<right-toolbar
|
||||||
|
:showSearch.sync="showSearch"
|
||||||
|
@queryTable="getList"
|
||||||
|
></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="infoList"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
>
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<!-- <el-table-column label="主键id" align="center" prop="id" /> -->
|
||||||
|
<el-table-column label="资讯标题" align="center" prop="infoTitle" />
|
||||||
|
<el-table-column label="资讯编码" align="center" prop="infoCode" />
|
||||||
|
<el-table-column label="资讯分类" align="center" prop="infoCategoryId" />
|
||||||
|
<!-- <el-table-column label="资讯图文内容,富文本" align="center" prop="infoContent" />
|
||||||
|
<el-table-column label="咨询点击次数" align="center" prop="infoClickCount" />
|
||||||
|
<el-table-column label="资讯跳转路径" align="center" prop="infoJumpLink" />
|
||||||
|
<el-table-column label="资讯来源" align="center" prop="infoSource" />
|
||||||
|
<el-table-column label="资讯缩略图地址" align="center" prop="infoMainThumbnailUrl" />
|
||||||
|
<el-table-column label="资讯负缩略图1地址" align="center" prop="infoNegativeOneThumbnailUrl" />
|
||||||
|
<el-table-column label="资讯负缩略图2地址" align="center" prop="infoNegativeTwoThumbnailUrl" />
|
||||||
|
<el-table-column label="资讯大图地址" align="center" prop="infoLargePictureUrl" /> -->
|
||||||
|
<el-table-column label="资讯排序" align="center" prop="infoSort" />
|
||||||
|
<!-- <el-table-column label="资讯创建人" align="center" prop="infoCreator" />
|
||||||
|
<el-table-column label="资讯创建时间" align="center" prop="infoCreateTime" width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.infoCreateTime, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="资讯修改人" align="center" prop="infoReviser" />
|
||||||
|
<el-table-column label="资讯修改时间" align="center" prop="infoModifyTime" width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.infoModifyTime, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column> -->
|
||||||
|
<el-table-column
|
||||||
|
label="操作"
|
||||||
|
align="center"
|
||||||
|
class-name="small-padding fixed-width"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['manage:info:edit']"
|
||||||
|
>修改</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['manage:info:remove']"
|
||||||
|
>删除</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total > 0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 添加或修改资讯信息对话框 -->
|
||||||
|
<!-- <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-form-item label="资讯所属分类id" prop="infoCategoryId">
|
||||||
|
<el-input v-model="form.infoCategoryId" placeholder="请输入资讯所属分类id" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资讯标题" prop="infoTitle">
|
||||||
|
<el-input v-model="form.infoTitle" placeholder="请输入资讯标题" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资讯编码" prop="infoCode">
|
||||||
|
<el-input v-model="form.infoCode" placeholder="请输入资讯编码" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资讯图文内容,富文本">
|
||||||
|
<editor v-model="form.infoContent" :min-height="192"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="咨询点击次数" prop="infoClickCount">
|
||||||
|
<el-input v-model="form.infoClickCount" placeholder="请输入咨询点击次数" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资讯跳转路径" prop="infoJumpLink">
|
||||||
|
<el-input v-model="form.infoJumpLink" placeholder="请输入资讯跳转路径" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资讯来源" prop="infoSource">
|
||||||
|
<el-input v-model="form.infoSource" placeholder="请输入资讯来源" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资讯缩略图地址" prop="infoMainThumbnailUrl">
|
||||||
|
<el-input v-model="form.infoMainThumbnailUrl" placeholder="请输入资讯缩略图地址" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资讯负缩略图1地址" prop="infoNegativeOneThumbnailUrl">
|
||||||
|
<el-input v-model="form.infoNegativeOneThumbnailUrl" placeholder="请输入资讯负缩略图1地址" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资讯负缩略图2地址" prop="infoNegativeTwoThumbnailUrl">
|
||||||
|
<el-input v-model="form.infoNegativeTwoThumbnailUrl" placeholder="请输入资讯负缩略图2地址" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资讯大图地址" prop="infoLargePictureUrl">
|
||||||
|
<el-input v-model="form.infoLargePictureUrl" placeholder="请输入资讯大图地址" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资讯排序" prop="infoSort">
|
||||||
|
<el-input v-model="form.infoSort" placeholder="请输入资讯排序" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资讯创建人" prop="infoCreator">
|
||||||
|
<el-input v-model="form.infoCreator" placeholder="请输入资讯创建人" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资讯创建时间" prop="infoCreateTime">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="form.infoCreateTime"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择资讯创建时间">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资讯修改人" prop="infoReviser">
|
||||||
|
<el-input v-model="form.infoReviser" placeholder="请输入资讯修改人" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资讯修改时间" prop="infoModifyTime">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="form.infoModifyTime"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择资讯修改时间">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog> -->
|
||||||
|
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="900px" append-to-body>
|
||||||
|
<el-form
|
||||||
|
ref="form"
|
||||||
|
:model="form"
|
||||||
|
:rules="rules"
|
||||||
|
label-width="140px"
|
||||||
|
:inline="true"
|
||||||
|
>
|
||||||
|
<el-form-item label="资讯标题" prop="infoTitle">
|
||||||
|
<el-input
|
||||||
|
v-model="form.infoTitle"
|
||||||
|
maxlength="100"
|
||||||
|
placeholder="请输入资讯标题"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资讯分类" prop="infoCategoryName">
|
||||||
|
<el-button
|
||||||
|
type=""
|
||||||
|
v-if="form.infoCategoryName == '请选择资讯分类'"
|
||||||
|
@click="clickinnerVisible()"
|
||||||
|
style="
|
||||||
|
width: 250px;
|
||||||
|
text-align: left;
|
||||||
|
height: 36px;
|
||||||
|
color: #c0c4cc;
|
||||||
|
overflow: hidden;
|
||||||
|
"
|
||||||
|
>{{ form.infoCategoryName }}</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
@click="clickinnerVisible()"
|
||||||
|
type=""
|
||||||
|
v-else
|
||||||
|
style="
|
||||||
|
width: 250px;
|
||||||
|
text-align: left;
|
||||||
|
height: 36px;
|
||||||
|
padding-left: -10px;
|
||||||
|
overflow: hidden;
|
||||||
|
"
|
||||||
|
>{{ form.infoCategoryName }}</el-button
|
||||||
|
>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="资讯图标" prop="infoMainThumbnailUrl">
|
||||||
|
<stationAcatar
|
||||||
|
style="width: 208px"
|
||||||
|
@imgUrl="imgUrl"
|
||||||
|
:img="form.infoMainThumbnailUrl"
|
||||||
|
:type="'infoMainThumbnailUrl'"
|
||||||
|
/>
|
||||||
|
<!-- <el-input v-model="form.leadThumbnailUrl" placeholder="请输入资讯主缩略图地址" /> -->
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="显示顺序" prop="infoSort">
|
||||||
|
<el-input
|
||||||
|
v-model="form.infoSort"
|
||||||
|
placeholder="请输入显示顺序"
|
||||||
|
style="width: 250px"
|
||||||
|
oninput="value=value.replace(/[^\d]/g,'')"
|
||||||
|
maxLength="5"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="资讯图文内容" prop="content">
|
||||||
|
<editor
|
||||||
|
@imgs="imgs"
|
||||||
|
maxlength="300"
|
||||||
|
:min-height="102"
|
||||||
|
placeholder="请输入资讯图文内容"
|
||||||
|
style="width: 80%; margin-left: 18%; margin-top: -5%"
|
||||||
|
v-model="form.content"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
<!-- 选择资讯 -->
|
||||||
|
<el-dialog
|
||||||
|
title="选择资讯"
|
||||||
|
:visible.sync="innerVisible"
|
||||||
|
width="1000px"
|
||||||
|
append-to-body
|
||||||
|
:before-close="innerVisiblecancel"
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
ref="queryForm"
|
||||||
|
:model="informationqueryParams"
|
||||||
|
:rules="rules"
|
||||||
|
label-width="80px"
|
||||||
|
:inline="true"
|
||||||
|
>
|
||||||
|
<el-form-item
|
||||||
|
label="资讯分类编码"
|
||||||
|
prop="infoCategoryCode"
|
||||||
|
label-width="120"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model="informationqueryParams.infoCategoryCode"
|
||||||
|
placeholder="请输入资讯分类编码"
|
||||||
|
clearable
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
label="资讯分类名称"
|
||||||
|
prop="infoCategoryName"
|
||||||
|
label-width="120"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model="informationqueryParams.infoCategoryName"
|
||||||
|
placeholder="请输入资讯分类名称"
|
||||||
|
clearable
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
size="mini"
|
||||||
|
@click="informationInfoinfo"
|
||||||
|
>搜索</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
icon="el-icon-refresh"
|
||||||
|
size="mini"
|
||||||
|
@click="addresetQuerylist"
|
||||||
|
>重置</el-button
|
||||||
|
>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-table
|
||||||
|
:data="infolist"
|
||||||
|
@cell-dblclick="nurseclick"
|
||||||
|
v-loading="loading"
|
||||||
|
>
|
||||||
|
<el-table-column label="请选择" width="100" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
style="width: 15px; height: 15px"
|
||||||
|
v-if="form.informationCategoryId == scope.row.id"
|
||||||
|
circle
|
||||||
|
@click="nurseclick(scope.row)"
|
||||||
|
></el-button>
|
||||||
|
<el-button
|
||||||
|
v-else
|
||||||
|
style="width: 15px; height: 15px"
|
||||||
|
circle
|
||||||
|
@click="nurseclick(scope.row)"
|
||||||
|
></el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
property="infoCategoryCode"
|
||||||
|
label="资讯分类编码"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
property="infoCategoryName"
|
||||||
|
label="资讯名称"
|
||||||
|
align="center"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<!-- <el-table-column
|
||||||
|
property="hospitalAddress"
|
||||||
|
label="医院地址"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
|
</el-table-column> -->
|
||||||
|
<!-- <el-table-column
|
||||||
|
property="hospitalIntroduce"
|
||||||
|
label="医院介绍"
|
||||||
|
align="center"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
>
|
||||||
|
</el-table-column> -->
|
||||||
|
<!-- <el-table-column
|
||||||
|
property="phone"
|
||||||
|
label="联系电话"
|
||||||
|
align="center"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
>
|
||||||
|
</el-table-column> -->
|
||||||
|
</el-table>
|
||||||
|
<pagination
|
||||||
|
v-show="total2 > 0"
|
||||||
|
:total="total2"
|
||||||
|
:page.sync="informationqueryParams.pageNum"
|
||||||
|
:limit.sync="informationqueryParams.pageSize"
|
||||||
|
@pagination="informationInfoinfo"
|
||||||
|
/>
|
||||||
|
</el-dialog>
|
||||||
|
<!-- 搜索选择资讯 -->
|
||||||
|
<el-dialog
|
||||||
|
title="选择资讯"
|
||||||
|
:visible.sync="innerVisiblezx"
|
||||||
|
width="1000px"
|
||||||
|
append-to-body
|
||||||
|
:before-close="innerVisiblecancelzx"
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
ref="queryForm"
|
||||||
|
:model="informationqueryParams"
|
||||||
|
:rules="rules"
|
||||||
|
label-width="80px"
|
||||||
|
:inline="true"
|
||||||
|
>
|
||||||
|
<el-form-item
|
||||||
|
label="资讯分类编码"
|
||||||
|
prop="infoCategoryCode"
|
||||||
|
label-width="120"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model="informationqueryParams.infoCategoryCode"
|
||||||
|
placeholder="请输入资讯分类编码"
|
||||||
|
clearable
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
label="资讯分类名称"
|
||||||
|
prop="infoCategoryName"
|
||||||
|
label-width="120"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model="informationqueryParams.infoCategoryName"
|
||||||
|
placeholder="请输入资讯分类名称"
|
||||||
|
clearable
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
size="mini"
|
||||||
|
@click="informationInfoinfo"
|
||||||
|
>搜索</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
icon="el-icon-refresh"
|
||||||
|
size="mini"
|
||||||
|
@click="addresetQuerylist"
|
||||||
|
>重置</el-button
|
||||||
|
>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-table
|
||||||
|
:data="infolist"
|
||||||
|
@cell-dblclick="nurseclickzx"
|
||||||
|
v-loading="loading"
|
||||||
|
>
|
||||||
|
<el-table-column label="请选择" width="100" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
style="width: 15px; height: 15px"
|
||||||
|
v-if="queryParams.informationCategoryId == scope.row.id"
|
||||||
|
circle
|
||||||
|
@click="nurseclickzx(scope.row)"
|
||||||
|
></el-button>
|
||||||
|
<el-button
|
||||||
|
v-else
|
||||||
|
style="width: 15px; height: 15px"
|
||||||
|
circle
|
||||||
|
@click="nurseclickzx(scope.row)"
|
||||||
|
></el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
property="infoCategoryCode"
|
||||||
|
label="资讯分类编码"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
property="infoCategoryName"
|
||||||
|
label="资讯名称"
|
||||||
|
align="center"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<pagination
|
||||||
|
v-show="total2 > 0"
|
||||||
|
:total="total2"
|
||||||
|
:page.sync="informationqueryParams.pageNum"
|
||||||
|
:limit.sync="informationqueryParams.pageSize"
|
||||||
|
@pagination="informationInfoinfo"
|
||||||
|
/>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listInfo, getInfo, delInfo, addInfo, updateInfo } from "@/api/manage/info";
|
||||||
|
import { listCategory } from "@/api/manage/category";
|
||||||
|
|
||||||
|
import stationAcatar from "../../system/stationAvatar/index.vue";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Info",
|
||||||
|
components: { stationAcatar },
|
||||||
|
|
||||||
|
data() {
|
||||||
|
|
||||||
|
|
||||||
|
return {
|
||||||
|
|
||||||
|
innerVisible: false,
|
||||||
|
innerVisiblezx: false,
|
||||||
|
imgs:'',
|
||||||
|
informationqueryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
infoCategoryCode: "",
|
||||||
|
infoCategoryName: "",
|
||||||
|
informationCategoryId: "",
|
||||||
|
},
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
total2: 0,
|
||||||
|
infolist: [],
|
||||||
|
// 资讯信息表格数据
|
||||||
|
infoList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
|
||||||
|
infoCategoryId: null,
|
||||||
|
infoTitle: null,
|
||||||
|
infoCode: null,
|
||||||
|
infoContent: null,
|
||||||
|
infoClickCount: null,
|
||||||
|
infoJumpLink: null,
|
||||||
|
infoSource: null,
|
||||||
|
infoMainThumbnailUrl: null,
|
||||||
|
infoNegativeOneThumbnailUrl: null,
|
||||||
|
infoNegativeTwoThumbnailUrl: null,
|
||||||
|
infoLargePictureUrl: null,
|
||||||
|
infoSort: null,
|
||||||
|
infoCreator: null,
|
||||||
|
infoCreateTime: null,
|
||||||
|
infoReviser: null,
|
||||||
|
infoModifyTime: null
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {
|
||||||
|
},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
// infoTitle: [
|
||||||
|
// { required: true, message: "角色名称不能为空", trigger: "blur" }
|
||||||
|
// ],
|
||||||
|
infoCategoryName: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请选择资讯分类",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
infoTitle: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请选择资讯标题",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
infoMainThumbnailUrl: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
trigger: "blur",
|
||||||
|
message: "请选择缩略图",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
infoSort: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
trigger: "blur",
|
||||||
|
message: "请输入显示顺序",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
content: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请输入资讯图文内容",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 新增按钮
|
||||||
|
clickinnerVisible() {
|
||||||
|
this.informationInfoinfo();
|
||||||
|
this.innerVisible = true;
|
||||||
|
},
|
||||||
|
imgUrl(imgUrl) {
|
||||||
|
console.log(imgUrl,'imgUrl')
|
||||||
|
this.form.infoMainThumbnailUrl = imgUrl;
|
||||||
|
},
|
||||||
|
// imgs(item) {
|
||||||
|
// this.imgsurl.pictureUrlList.push(item);
|
||||||
|
// },
|
||||||
|
|
||||||
|
|
||||||
|
innerVisiblecancel() {
|
||||||
|
this.innerVisible = false;
|
||||||
|
},
|
||||||
|
innerVisiblecancelzx() {
|
||||||
|
this.innerVisiblezx = false;
|
||||||
|
},
|
||||||
|
//重置
|
||||||
|
addresetQuery() {
|
||||||
|
this.queryParams = {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
infoCategoryCode: "",
|
||||||
|
informationTitle: "",
|
||||||
|
infoCategoryName: "",
|
||||||
|
};
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
addresetQuerylist() {
|
||||||
|
this.informationqueryParams = {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
infoCategoryCode: "",
|
||||||
|
infoCategoryName: "",
|
||||||
|
};
|
||||||
|
this.informationInfoinfo();
|
||||||
|
},
|
||||||
|
informationInfoinfo() {
|
||||||
|
listCategory(this.informationqueryParams).then((response) => {
|
||||||
|
this.infolist = response.rows;
|
||||||
|
this.total2 = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
clickitem() {
|
||||||
|
this.informationInfoinfo();
|
||||||
|
this.innerVisiblezx = true;
|
||||||
|
},
|
||||||
|
nurseclick(row) {
|
||||||
|
// this.form.informationCategoryId = row.id;
|
||||||
|
this.form.infoCategoryName = row.infoCategoryName;
|
||||||
|
this.innerVisible = false;
|
||||||
|
},
|
||||||
|
nurseclickzx(row) {
|
||||||
|
// this.queryParams.informationCategoryId = row.id;
|
||||||
|
this.queryParams.infoCategoryName = row.infoCategoryName;
|
||||||
|
this.innerVisiblezx = false;
|
||||||
|
},
|
||||||
|
/** 查询资讯信息列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listInfo(this.queryParams).then(response => {
|
||||||
|
this.infoList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
infoCategoryId: null,
|
||||||
|
infoTitle: null,
|
||||||
|
infoCode: null,
|
||||||
|
infoContent: null,
|
||||||
|
infoClickCount: null,
|
||||||
|
infoJumpLink: null,
|
||||||
|
infoSource: null,
|
||||||
|
infoMainThumbnailUrl: null,
|
||||||
|
infoNegativeOneThumbnailUrl: null,
|
||||||
|
infoNegativeTwoThumbnailUrl: null,
|
||||||
|
infoLargePictureUrl: null,
|
||||||
|
infoSort: null,
|
||||||
|
infoCreator: null,
|
||||||
|
infoCreateTime: null,
|
||||||
|
infoReviser: null,
|
||||||
|
infoModifyTime: null
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.id)
|
||||||
|
this.single = selection.length !== 1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.reset();
|
||||||
|
this.open = true;
|
||||||
|
this.title = "添加资讯信息";
|
||||||
|
this.form.infoCategoryName= "请选择资讯分类";
|
||||||
|
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset();
|
||||||
|
const id = row.id || this.ids
|
||||||
|
getInfo(id).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改资讯信息";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
console.log(this.form,'this.form')
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.id != null) {
|
||||||
|
updateInfo(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addInfo(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const ids = row.id || this.ids;
|
||||||
|
this.$modal.confirm('是否确认删除资讯信息编号为"' + ids + '"的数据项?').then(function () {
|
||||||
|
return delInfo(ids);
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => { });
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('manage/info/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `info_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@ -127,6 +127,7 @@ import {
|
|||||||
uploadVideoUrl,
|
uploadVideoUrl,
|
||||||
uploadTrainingCategoryPicture,
|
uploadTrainingCategoryPicture,
|
||||||
updatePoserHeads,
|
updatePoserHeads,
|
||||||
|
picUpload,
|
||||||
uploadUrl,
|
uploadUrl,
|
||||||
uploadFilefm,
|
uploadFilefm,
|
||||||
uploadScriptInfo
|
uploadScriptInfo
|
||||||
@ -401,6 +402,23 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
else if(this.types == "infoMainThumbnailUrl"){
|
||||||
|
let formDatanew = new FormData();
|
||||||
|
formDatanew.append("file", this.previews.data);
|
||||||
|
picUpload(formDatanew).then(response => {
|
||||||
|
if (response.code == 200) {
|
||||||
|
this.options.img = process.env.VUE_APP_BASE_API + response.msg;
|
||||||
|
this.$emit("imgUrl", response.msg);
|
||||||
|
this.openimg = false;
|
||||||
|
} else {
|
||||||
|
setTimeout(e => {
|
||||||
|
this.openimg = false;
|
||||||
|
}, 1000);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
else {
|
else {
|
||||||
updateNurseStationHeads(formData).then(response => {
|
updateNurseStationHeads(formData).then(response => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user