Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
2024-03-04 16:47:31 +08:00
commit 585deabf3c
7 changed files with 393 additions and 472 deletions

View File

@ -42,3 +42,13 @@ export function delMaterials(id) {
method: 'delete' method: 'delete'
}) })
} }
// 人群列表
export function crowdInfo(query) {
return request({
url: '/manage/crowdInfo/getList',
method: 'get',
params: query
})
}

View File

@ -59,9 +59,9 @@ export function delPropaganda(id) {
} }
// 左侧列表 // 左侧列表
export function listWechatTemplateNum(query) { export function selectNumByDept(query) {
return request({ return request({
url: '/system/department/listWechatTemplateNum', url: '/manage/propaganda/selectNumByDept',
method: 'get', method: 'get',
params: query params: query
}) })

View File

@ -17,7 +17,7 @@ export function serviceWayList(query) {
} }
// 查询服务方式内容详细 // 修改
export function getServicewaycontent(id) { export function getServicewaycontent(id) {
return request({ return request({
url: '/manage/servicewaycontent/' + id, url: '/manage/servicewaycontent/' + id,
@ -35,7 +35,7 @@ export function serviceWay(id) {
// 新增服务方式内容 // 新增服务方式内容
export function addServicewaycontent(data) { export function addServicewaycontent(data) {
return request({ return request({
url: '/manage/servicewaycontent', url: '/manage/servicewaycontent/add',
method: 'post', method: 'post',
data: data data: data
}) })
@ -51,7 +51,7 @@ export function addServiceWay(data) {
// 修改服务方式内容 // 修改服务方式内容
export function updateServicewaycontent(data) { export function updateServicewaycontent(data) {
return request({ return request({
url: '/manage/servicewaycontent', url: '/manage/servicewaycontent/edit',
method: 'put', method: 'put',
data: data data: data
@ -69,16 +69,16 @@ export function editServiceWay(data) {
// 删除服务方式内容 // 删除服务方式内容
export function delServicewaycontent(serviceContentId,id) { export function delServicewaycontent(id) {
return request({ return request({
url: `/manage/servicewaycontent/remove?serviceContentId=${serviceContentId}&id=${id}`, url: '/manage/servicewaycontent/remove/' + id,
method: 'delete' method: 'delete'
}) })
} }
// / 删除服务方式 // / 删除服务方式
export function removeServiceWay(id) { export function removeServiceWay(id) {
return request({ return request({
url: `/manage/servicewaycontent/removeServiceWay?id=${id}` , url: '/manage/servicewaycontent/removeServiceWay/id' ,
method: 'delete' method: 'delete'
}) })
} }

View File

@ -33,7 +33,7 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="素材来源" prop="materialsName"> <!-- <el-form-item label="素材来源" prop="materialsName">
<el-select <el-select
v-model="queryParams.materialsName" v-model="queryParams.materialsName"
placeholder="请选择素材来源" placeholder="请选择素材来源"
@ -46,13 +46,8 @@
> >
</el-option> </el-option>
</el-select> </el-select>
<!-- <el-input
v-model="queryParams.materialsName" </el-form-item> -->
placeholder="请输入素材来源"
clearable
@keyup.enter.native="handleQuery"
/> -->
</el-form-item>
<el-form-item> <el-form-item>
<el-button <el-button
@ -86,7 +81,6 @@
plain plain
icon="el-icon-delete" icon="el-icon-delete"
size="mini" size="mini"
:disabled="multiple"
@click="handleDelete" @click="handleDelete"
v-hasPermi="['manage:materials:remove']" v-hasPermi="['manage:materials:remove']"
>批量删除</el-button >批量删除</el-button
@ -97,251 +91,53 @@
@queryTable="getList" @queryTable="getList"
></right-toolbar> ></right-toolbar>
</el-row> </el-row>
<el-tabs v-model="activeName" type="card" @tab-click="handleClick"> <el-tabs
v-model="queryParams.materialsType"
type="card"
@tab-click="handleClick"
>
<el-tab-pane label="图片" name="IMAGE_TEXT"></el-tab-pane> <el-tab-pane label="图片" name="IMAGE_TEXT"></el-tab-pane>
<el-tab-pane label="视频" name="VIDEO"></el-tab-pane> <el-tab-pane label="视频" name="VIDEO"></el-tab-pane>
</el-tabs> </el-tabs>
<div class="bodytopxj"> <div class="bodytopxj">
<div class="bodylist" @click.stop="viewshow"> <div class="bodylist" v-for="item in materialsList" :key="item.id">
<el-checkbox v-model="checked"></el-checkbox> <el-checkbox
<img src="@/assets/system/userinfo.jpg" alt="" /> v-model="item.checked"
<div class="texttitle">测试素材封面</div> @change="changecheck($event, item)"
<div class="dataliat"> ></el-checkbox>
创建人/创建时间<span>张程程</span>/<span <div @click.stop="viewshow(item)">
>555555555555555555555555555555555555</span <img
> :src="baseUrl + item.materialsFilePath"
</div> alt=""
<div class="dataliat">素材来源</div> v-if="item.materialsFilePath && !item.videoCoverFilePath"
<div class="dataliat">标签暂无</div> />
<div class="label" @click.stop="labelchange">标签管理</div> <img
</div> :src="baseUrl + item.videoCoverFilePath"
<div class="bodylist"> alt=""
<img src="@/assets/system/userinfo.jpg" alt="" /> v-if="item.videoCoverFilePath && item.materialsFilePath"
<div class="texttitle">测试素材封面</div> />
<div class="dataliat"> <div class="texttitle">{{ item.name }}</div>
创建人/创建时间<span>张程程</span>/<span <div class="dataliat">
>555555555555555555555555555555555555</span 创建人/创建时间<span>{{ item.createBy }}</span
> >/<span>{{ item.createTime }}</span>
</div> </div>
<div class="dataliat">素材来源</div> <div class="dataliat">素材来源</div>
<div class="dataliat">标签暂无</div> <!-- <div class="dataliat">标签暂无</div> -->
<div class="label">标签管理</div> <div class="dataliat">标签
</div>
<div class="bodylist">
<img src="@/assets/system/userinfo.jpg" alt="" />
<div class="texttitle">测试素材封面</div>
<div class="dataliat">
创建人/创建时间<span>张程程</span>/<span
>555555555555555555555555555555555555</span
>
</div>
<div class="dataliat">素材来源</div>
<div class="dataliat">标签暂无</div>
<div class="label">标签管理</div>
</div>
<div class="bodylist">
<img src="@/assets/system/userinfo.jpg" alt="" />
<div class="texttitle">测试素材封面</div>
<div class="dataliat">
创建人/创建时间<span>张程程</span>/<span
>555555555555555555555555555555555555</span
>
</div>
<div class="dataliat">素材来源</div>
<div class="dataliat">标签暂无</div>
<div class="label">标签管理</div>
</div>
<div class="bodylist">
<img src="@/assets/system/userinfo.jpg" alt="" />
<div class="texttitle">测试素材封面</div>
<div class="dataliat">
创建人/创建时间<span>张程程</span>/<span
>555555555555555555555555555555555555</span
>
</div>
<div class="dataliat">素材来源</div>
<div class="dataliat">标签暂无</div>
<div class="label">标签管理</div>
</div>
<div class="bodylist">
<img src="@/assets/system/userinfo.jpg" alt="" />
<div class="texttitle">测试素材封面</div>
<div class="dataliat">
创建人/创建时间<span>张程程</span>/<span
>555555555555555555555555555555555555</span
>
</div>
<div class="dataliat">素材来源</div>
<div class="dataliat">标签暂无</div>
<div class="label">标签管理</div>
</div>
<div class="bodylist">
<img src="@/assets/system/userinfo.jpg" alt="" />
<div class="texttitle">测试素材封面</div>
<div class="dataliat">
创建人/创建时间<span>张程程</span>/<span
>555555555555555555555555555555555555</span
>
</div>
<div class="dataliat">素材来源</div>
<div class="dataliat">标签暂无</div>
<div class="label">标签管理</div>
</div>
<div class="bodylist">
<img src="@/assets/system/userinfo.jpg" alt="" />
<div class="texttitle">测试素材封面</div>
<div class="dataliat">
创建人/创建时间<span>张程程</span>/<span
>555555555555555555555555555555555555</span
>
</div>
<div class="dataliat">素材来源</div>
<div class="dataliat">标签暂无</div>
<div class="label">标签管理</div>
</div>
<div class="bodylist">
<img src="@/assets/system/userinfo.jpg" alt="" />
<div class="texttitle">测试素材封面</div>
<div class="dataliat">
创建人/创建时间<span>张程程</span>/<span
>555555555555555555555555555555555555</span
>
</div>
<div class="dataliat">素材来源</div>
<div class="dataliat">标签暂无</div>
<div class="label">标签管理</div>
</div>
<div class="bodylist"> <span v-if="item.indications">{{ item.indications }}</span>
<img src="@/assets/system/userinfo.jpg" alt="" /> <span v-if="item.drugName">{{ item.drugName }}</span>
<div class="texttitle">测试素材封面</div> <span v-if="item.applicableDiseases">{{ item.applicableDiseases }}</span>
<div class="dataliat"> <span v-if="item.surgicalName">{{ item.surgicalName }}</span>
创建人/创建时间<span>张程程</span>/<span <span v-if="item.inspectionItems">{{ item.inspectionItems }}</span>
>555555555555555555555555555555555555</span <span v-if="item.checkItems">{{ item.checkItems }}</span>
> </div>
</div> </div>
<div class="dataliat">素材来源</div>
<div class="dataliat">标签暂无</div> <div class="label" @click.stop="labelchange(item)">标签管理</div>
<div class="label">标签管理</div>
</div> </div>
</div> </div>
<!-- <el-table
v-loading="loading"
:data="materialsList"
@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="materialsName" />
<el-table-column
label="
素材类型图文IMAGE_TEXT视频VIDEO"
align="center"
prop="materialsType"
>
<template slot-scope="scope">
<dict-tag
:options="dict.type.materials_type"
:value="scope.row.materialsType"
/>
</template>
</el-table-column>
<el-table-column
label="素材选择AI生成AI_GENERATION手动上传MANUAL_UPLOAD"
align="center"
prop="materialsOption"
/>
<el-table-column
label="素材图片/者视频文件存放路径"
align="center"
prop="materialsFilePath"
>
<template slot-scope="scope">
<dict-tag
:options="dict.type.video_cover_type"
:value="scope.row.materialsFilePath"
/>
</template>
</el-table-column>
<el-table-column
label="视频封面类型视频首帧VIDEO_FIRST_FRAME手动上传MANUAL_UPLOAD"
align="center"
prop="videoCoverType"
width="100"
>
<template slot-scope="scope">
<image-preview
:src="scope.row.videoCoverType"
:width="50"
:height="50"
/>
</template>
</el-table-column>
<el-table-column
label="视频封面存放路径"
align="center"
prop="videoCoverFilePath"
/>
<el-table-column
label="素材摘要"
align="center"
prop="materialsAbstract"
/>
<el-table-column label="适用症状" align="center" prop="indications" />
<el-table-column
label="适用疾病"
align="center"
prop="applicableDiseases"
/>
<el-table-column label="药物名称" align="center" prop="drugName" />
<el-table-column label="手术名称" align="center" prop="surgicalName" />
<el-table-column label="检查项目" align="center" prop="checkItems" />
<el-table-column label="检验项目" align="center" prop="inspectionItems" />
<el-table-column label="所属人群表id" align="center" prop="crowdId">
<template slot-scope="scope">
<dict-tag
:options="dict.type.crowd_type"
:value="scope.row.crowdId"
/>
</template>
</el-table-column>
<el-table-column label="人群名称" align="center" prop="crowName" />
<el-table-column
label="素材状态全部ALL已上架LISTED未上架NOT_LISTED"
align="center"
prop="materialsStatus"
/>
<el-table-column label="素材备注" align="center" prop="materialsRemark" />
<el-table-column
label="素材排序,值越小排序越靠前"
align="center"
prop="materialsSort"
/>
<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:materials:edit']"
>修改</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['manage:materials:remove']"
>删除</el-button
>
</template>
</el-table-column>
</el-table> -->
<pagination <pagination
v-show="total > 0" v-show="total > 0"
@ -363,7 +159,7 @@
<el-form-item label="素材名称" prop="materialsName"> <el-form-item label="素材名称" prop="materialsName">
<el-input v-model="form.materialsName" placeholder="请输入素材名称" /> <el-input v-model="form.materialsName" placeholder="请输入素材名称" />
</el-form-item> </el-form-item>
<el-form-item label="素材类型"> <el-form-item label="素材类型" prop="materialsType">
<el-radio <el-radio
v-model="form.materialsType" v-model="form.materialsType"
label="IMAGE_TEXT" label="IMAGE_TEXT"
@ -379,38 +175,38 @@
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="素材上传" label="素材上传"
prop="materialsName111" prop="materialsFilePath"
v-if="form.materialsType == 'IMAGE_TEXT'" v-if="form.materialsType == 'IMAGE_TEXT'"
> >
<stationAcatar <stationAcatar
@imgUrl="imgUrl" @imgUrl="imgUrl"
:img="form.propagandaCoverPath" :img="form.materialsFilePath"
:type="'propagandaCoverUrl'" :type="'materialsCoverUrl'"
/> />
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="视频素材上传" label="视频素材上传"
prop="materialsName111" prop="materialsFilePath"
v-if="form.materialsType == 'VIDEO'" v-if="form.materialsType == 'VIDEO'"
> >
<stationAcatar <stationAcatar
style="width: 208px" style="width: 208px"
@imgUrl="imgUrl2" @imgUrl="imgUrl2"
:tovideo="form.posterVideoUrl" :tovideo="form.materialsFilePath"
:type="'posterVideoUrl'" :type="'materialsVideoUrl'"
v-if="open" v-if="open"
/> />
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="视频封面" label="视频封面"
prop="materialsName111" prop="videoCoverFilePath"
v-if="form.materialsType == 'VIDEO'" v-if="form.materialsType == 'VIDEO'"
> >
<stationAcatar <stationAcatar
@imgUrl="imgUrl" @imgUrl="imgUrl3"
:img="form.propagandaCoverPath" :img="form.videoCoverFilePath"
:type="'propagandaCoverUrl'" :type="'materialsCoverUrl'"
/> />
</el-form-item> </el-form-item>
@ -421,32 +217,7 @@
placeholder="请输入内容" placeholder="请输入内容"
/> />
</el-form-item> </el-form-item>
<!-- <el-form-item
label="素材选择AI生成AI_GENERATION手动上传MANUAL_UPLOAD"
>
<file-upload v-model="form.materialsOption" />
</el-form-item> -->
<!-- <el-form-item label="素材图片/者视频文件存放路径">
<el-radio-group v-model="form.materialsFilePath">
<el-radio
v-for="dict in dict.type.video_cover_type"
:key="dict.value"
:label="dict.value"
>{{ dict.label }}</el-radio
>
</el-radio-group>
</el-form-item>
<el-form-item
label="视频封面类型视频首帧VIDEO_FIRST_FRAME手动上传MANUAL_UPLOAD"
>
<image-upload v-model="form.videoCoverType" />
</el-form-item>
<el-form-item label="视频封面存放路径" prop="videoCoverFilePath">
<el-input
v-model="form.videoCoverFilePath"
placeholder="请输入视频封面存放路径"
/>
</el-form-item> -->
<el-form-item label="适用症状" prop="indications"> <el-form-item label="适用症状" prop="indications">
<el-input v-model="form.indications" placeholder="请输入适用症状" /> <el-input v-model="form.indications" placeholder="请输入适用症状" />
@ -472,40 +243,24 @@
placeholder="请输入检验项目" placeholder="请输入检验项目"
/> />
</el-form-item> </el-form-item>
<!-- <el-form-item label="所属人群表id" prop="crowdId">
<el-select v-model="form.crowdId" placeholder="请选择所属人群表id">
<el-option
v-for="dict in dict.type.crowd_type"
:key="dict.value"
:label="dict.label"
:value="parseInt(dict.value)"
></el-option>
</el-select>
</el-form-item> -->
<el-form-item label="人群名称" prop="crowName"> <el-form-item label="人群名称" prop="crowName">
<el-select v-model="form.crowName" placeholder="请选择" style="width: 381px;"> <el-select
v-model="form.crowName"
placeholder="请选择"
style="width: 381px"
@change="crowNamechange"
>
<el-option <el-option
v-for="item in optionscrowName" v-for="item in optionscrowName"
:key="item.value" :key="item.id"
:label="item.label" :label="item.crowdName"
:value="item.value" :value="item.id"
> >
</el-option> </el-option>
</el-select> </el-select>
<!-- <el-input v-model="form.crowName" placeholder="请输入人群名称" /> -->
</el-form-item> </el-form-item>
<!-- <el-form-item label="素材备注" prop="materialsRemark">
<el-input
v-model="form.materialsRemark"
placeholder="请输入素材备注"
/>
</el-form-item>
<el-form-item label="素材排序,值越小排序越靠前" prop="materialsSort">
<el-input
v-model="form.materialsSort"
placeholder="请输入素材排序,值越小排序越靠前"
/>
</el-form-item> -->
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button> <el-button type="primary" @click="submitForm"> </el-button>
@ -517,33 +272,34 @@
<div class="viewbody"> <div class="viewbody">
<div class="left"> <div class="left">
<video <video
v-if="activeName == 'VIDEO'" v-if="queryParams.materialsType == 'VIDEO'"
ref="myVideo" ref="myVideo"
:src="baseUrl + viewform.materialsFilePath"
controls controls
></video> ></video>
<img <img
src="@/assets/system/userinfo.jpg" :src="baseUrl + viewform.materialsFilePath"
alt="" alt=""
v-if="activeName == 'IMAGE_TEXT'" v-if="queryParams.materialsType == 'IMAGE_TEXT'"
/> />
</div> </div>
<div class="right"> <div class="right">
<div class="nametitle">素材名称</div> <div class="nametitle">素材名称</div>
<div class="nameitem">半蹲起立练习室早</div> <div class="nameitem">{{viewform.materialsName}}</div>
<div class="nametitle">创建人员</div> <div class="nametitle">创建人员</div>
<div class="nameitem">张宇</div> <div class="nameitem">{{viewform.createBy}}</div>
<div class="nametitle">创建时间</div> <div class="nametitle">创建时间</div>
<div class="nameitem">2024-1-25 15:42</div> <div class="nameitem">{{viewform.createTime}}</div>
<div class="nametitle">素材摘要</div> <div class="nametitle">素材摘要</div>
<div class="nameitem">88888888888888888888888888888888888</div> <div class="nameitem">{{viewform.materialsAbstract}}</div>
<div class="nametitle">素材标签</div> <div class="nametitle">素材标签</div>
<div class="nameitem">适用症状</div> <div class="nameitem">适用症状{{viewform.indications}}</div>
<div class="nameitem">药物名称</div> <div class="nameitem">药物名称{{viewform.drugName}}</div>
<div class="nameitem">适用疾病</div> <div class="nameitem">适用疾病{{viewform.applicableDiseases}}</div>
<div class="nameitem">手术名称</div> <div class="nameitem">手术名称{{viewform.surgicalName}}</div>
<div class="nameitem">检验项目</div> <div class="nameitem">检验项目{{viewform.inspectionItems}}</div>
<div class="nameitem">检查项目</div> <div class="nameitem">检查项目{{viewform.checkItems}}</div>
<div class="nameitem">人群</div> <div class="nameitem">人群{{viewform.crowName}}</div>
</div> </div>
</div> </div>
</el-dialog> </el-dialog>
@ -551,7 +307,7 @@
</template> </template>
<script> <script>
import { listMaterials, getMaterials, delMaterials, addMaterials, updateMaterials } from "@/api/manage/materials"; import { listMaterials, getMaterials, delMaterials, addMaterials, updateMaterials,crowdInfo } from "@/api/manage/materials";
import stationAcatar from "../../system/stationAvatar/index.vue"; import stationAcatar from "../../system/stationAvatar/index.vue";
export default { export default {
@ -560,6 +316,7 @@ export default {
dicts: ['crowd_type', 'materials_type', 'video_cover_type'], dicts: ['crowd_type', 'materials_type', 'video_cover_type'],
data() { data() {
return { return {
baseUrl: process.env.VUE_APP_BASE_API,
videoState: false, // videoState: false, //
// //
studyTime: { studyTime: {
@ -568,8 +325,9 @@ export default {
}, },
timer: {}, // timer: {}, //
pauseTimer: {}, // pauseTimer: {}, //
checked: true, checked: false,
openview: false,// openview: false,//
viewform: [],
activeName: 'IMAGE_TEXT', activeName: 'IMAGE_TEXT',
options: [{ options: [{
value: 'ALL', value: 'ALL',
@ -583,13 +341,13 @@ export default {
}], }],
// //
optionscrowName: [ optionscrowName: [
{ // {
value: '选项1', // value: '1',
label: '黄金糕' // label: ''
}, { // }, {
value: '选项2', // value: '2',
label: '双皮奶' // label: ''
}, // },
], ],
optionsly: [{ optionsly: [{
@ -612,6 +370,7 @@ export default {
loading: true, loading: true,
// //
ids: [], ids: [],
selectedValues: [], //
// //
single: true, single: true,
// //
@ -632,6 +391,7 @@ export default {
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
materialsType: 'IMAGE_TEXT',
materialsName: null, materialsName: null,
materialsStatus: null, materialsStatus: null,
createTime: null, createTime: null,
@ -640,6 +400,21 @@ export default {
form: {}, form: {},
// //
rules: { rules: {
materialsName: [
{ required: true, message: "素材名称不能为空", trigger: "blur" },
],
materialsType: [
{ required: true, message: "素材类型不能为空", trigger: "blur" },
],
materialsFilePath: [
{ required: true, message: "素材上传不能为空", trigger: "blur" },
],
videoCoverFilePath:[
{ required: true, message: "视频封面不能为空", trigger: "blur" },
],
} }
}; };
}, },
@ -649,38 +424,70 @@ export default {
methods: { methods: {
// / // /
handleClick(e) { handleClick(e) {
this.activeName = e.name this.queryParams.materialsType = e.name
this.getList()
// this.type // this.type
console.log(e.name); console.log(e.name);
}, },
// //
radioChange(e) { radioChange(e) {
this.form.materialsFilePath=null
this.form.videoCoverFilePath=null
console.log(e) console.log(e)
}, },
// //
imgUrl(imgUrl) { imgUrl(imgUrl) {
this.form.propagandaCoverPath = imgUrl; this.form.materialsFilePath = imgUrl;
}, },
// //
imgUrl2(imgUrl) { imgUrl2(imgUrl) {
this.videoForm.showVideoPath = process.env.VUE_APP_BASE_API + imgUrl; this.form.materialsFilePath = process.env.VUE_APP_BASE_API + imgUrl;
this.form.posterVideoUrl = imgUrl; this.form.materialsFilePath = imgUrl;
},
//
imgUrl3(imgUrl) {
console.log(this.form.videoCoverFilePath)
this.form.videoCoverFilePath = imgUrl;
},
//
changecheck(e, item) {
this.ids = this.materialsList.map(item => item.checked ? item.id : undefined).filter(e => e)
// console.log(this.ids)
// console.log(item)
// console.log(e)
}, },
// //
viewshow() { viewshow(item) {
console.log(item)
this.openview = true this.openview = true
this.viewform = item
},
getcrowdInfo(){
crowdInfo().then(response=>{
this.optionscrowName=response.data
})
},
//
crowNamechange(e){
this.form.crowdName=this.optionscrowName.find(f=>f.id==e).crowdName
this.form.crowdId=e
// this.form.suitTaskTypeName=this.type.find(f=> f.dictCode==e).dictLabel
console.log(e)
console.log(this.form.crowdName)
}, },
/** 查询素材信息列表 */ /** 查询素材信息列表 */
getList() { getList() {
this.loading = true; this.loading = true;
this.queryParams.params = {}; this.queryParams.params = {};
if (null != this.daterangeCreateTime && '' != this.daterangeCreateTime) {
this.queryParams.params["beginCreateTime"] = this.daterangeCreateTime[0];
this.queryParams.params["endCreateTime"] = this.daterangeCreateTime[1];
}
listMaterials(this.queryParams).then(response => { listMaterials(this.queryParams).then(response => {
this.materialsList = response.rows; this.materialsList = response.rows;
this.total = response.total; this.total = response.total;
@ -699,7 +506,7 @@ export default {
materialsName: null, materialsName: null,
materialsType: "IMAGE_TEXT", materialsType: "IMAGE_TEXT",
materialsOption: 'MANUAL_UPLOAD', materialsOption: 'MANUAL_UPLOAD',
materialsFilePath: "0", materialsFilePath: null,
videoCoverType: null, videoCoverType: null,
videoCoverFilePath: null, videoCoverFilePath: null,
materialsAbstract: null, materialsAbstract: null,
@ -724,11 +531,27 @@ export default {
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1;
if (this.daterangeCreateTime.length > 0) {
this.queryParams.createTimeStart = this.daterangeCreateTime[0]
this.queryParams.createTimeEnd = this.daterangeCreateTime[1]
}
this.getList(); this.getList();
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.daterangeCreateTime = []; this.daterangeCreateTime = [];
this.queryParams={
pageNum: 1,
pageSize: 10,
materialsType: 'IMAGE_TEXT',
materialsName: null,
materialsStatus: null,
createTimeStart: null,
createTimeEnd: null,
}
this.resetForm("queryForm"); this.resetForm("queryForm");
this.handleQuery(); this.handleQuery();
}, },
@ -743,19 +566,20 @@ export default {
this.reset(); this.reset();
console.log(this.form) console.log(this.form)
this.open = true; this.open = true;
this.getcrowdInfo()
this.title = "添加素材信息"; this.title = "添加素材信息";
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
labelchange(row) { labelchange(item) {
this.reset(); this.reset();
this.open = true; this.open = true;
const id = row.id || this.ids const id = item.id || this.ids
// getMaterials(id).then(response => { getMaterials(id).then(response => {
// this.form = response.data; this.form = response.data;
// this.open = true; this.open = true;
// this.title = ""; this.title = "修改素材信息";
// }); });
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
@ -779,13 +603,20 @@ export default {
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const ids = row.id || this.ids; console.log(this.ids)
this.$modal.confirm('是否确认删除素材信息编号为"' + ids + '"的数据项?').then(function () { if(this.ids.length==0){
this.$modal.msgError("请先选择一条数据");
}else{
const ids = this.ids;
this.$modal.confirm('是否确认删除该素材信息?').then(function () {
return delMaterials(ids); return delMaterials(ids);
}).then(() => { }).then(() => {
this.getList(); this.getList();
this.$modal.msgSuccess("删除成功"); this.$modal.msgSuccess("删除成功");
}).catch(() => { }); }).catch(() => { });
}
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
@ -799,7 +630,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep .el-checkbox__inner { ::v-deep .el-checkbox__inner {
position: absolute !important; position: absolute !important;
top: -84px; // top: -84px;
left: 8px; left: 8px;
} }
video { video {
@ -816,6 +647,11 @@ video {
height: 500px; height: 500px;
// background: #989992; // background: #989992;
} }
img{
height: 100%;
width: 100%;
}
.right { .right {
width: 20%; width: 20%;
// background: red; // background: red;
@ -836,15 +672,16 @@ video {
white-space: wrap; white-space: wrap;
align-items: center; align-items: center;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: space-around; justify-content: flex-start;
align-content: space-between; // align-content: space-between;
.bodylist { .bodylist {
width: 19%; width: 19%;
height: 210px; height: 221px;
border: 2px solid #e2e3e5; border: 2px solid #e2e3e5;
border-radius: 10px; border-radius: 10px;
position: relative; position: relative;
margin-bottom: 10px; // margin-bottom: 10px;
margin: 6px;
.texttitle { .texttitle {
font-weight: 700; font-weight: 700;
margin: 5px 0px 5px 10px; margin: 5px 0px 5px 10px;
@ -867,7 +704,7 @@ video {
right: 0px; right: 0px;
right: 18px; right: 18px;
color: #409eff; color: #409eff;
bottom: 11px; bottom:8px;
font-size: 13px; font-size: 13px;
} }
} }

View File

@ -604,7 +604,7 @@
</template> </template>
<script> <script>
import { listPropaganda, getPropaganda, delPropaganda, addPropaganda, updatePropaganda, listWechatTemplateNum, copy, updateStatus } from "@/api/manage/propaganda"; import { listPropaganda, getPropaganda, delPropaganda, addPropaganda, updatePropaganda, selectNumByDept, copy, updateStatus } from "@/api/manage/propaganda";
import stationAcatar from "../../system/stationAvatar/index.vue"; import stationAcatar from "../../system/stationAvatar/index.vue";
import { department, listDisease } from "@/api/manage/script"; import { department, listDisease } from "@/api/manage/script";
export default { export default {
@ -741,6 +741,11 @@ export default {
propagandaType: [ propagandaType: [
{ required: true, message: "宣教类型不能为空", trigger: "blur" } { required: true, message: "宣教类型不能为空", trigger: "blur" }
], ],
propagandaCoverPath:[
{ required: true, message: "封面不能为空", trigger: "blur" }
],
} }
}; };
}, },
@ -860,7 +865,7 @@ export default {
// //
Departmentlist() { Departmentlist() {
this.loading = true; this.loading = true;
listWechatTemplateNum(this.querydepartmen).then(response => { selectNumByDept(this.querydepartmen).then(response => {
this.DepartmentoList = response.data; this.DepartmentoList = response.data;
this.loading = false; this.loading = false;
}); });
@ -1057,9 +1062,9 @@ export default {
// }, // },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
if (!this.itemname) { // if (!this.itemname) {
this.$modal.msgError("请先选择科室"); // this.$modal.msgError("");
} else { // } else {
// this.reset(); // this.reset();
const id = row.id || this.ids const id = row.id || this.ids
getPropaganda(id).then(response => { getPropaganda(id).then(response => {
@ -1070,7 +1075,7 @@ export default {
this.open = true; this.open = true;
this.title = "修改患者宣教信息"; this.title = "修改患者宣教信息";
}); });
} // }
}, },
// //
imgUrl(imgUrl) { imgUrl(imgUrl) {

View File

@ -118,7 +118,7 @@
>修改</el-button >修改</el-button
> >
</el-col> </el-col>
<el-col :span="1.5"> <!-- <el-col :span="1.5">
<el-button <el-button
type="danger" type="danger"
plain plain
@ -129,8 +129,8 @@
v-hasPermi="['manage:servicewaycontent:remove']" v-hasPermi="['manage:servicewaycontent:remove']"
>删除</el-button >删除</el-button
> >
</el-col> </el-col> -->
<el-col :span="1.5"> <!-- <el-col :span="1.5">
<el-button <el-button
type="warning" type="warning"
plain plain
@ -140,7 +140,7 @@
v-hasPermi="['manage:servicewaycontent:export']" v-hasPermi="['manage:servicewaycontent:export']"
>导出</el-button >导出</el-button
> >
</el-col> </el-col> -->
<right-toolbar <right-toolbar
:showSearch.sync="showSearch" :showSearch.sync="showSearch"
@queryTable="getList" @queryTable="getList"
@ -214,33 +214,33 @@
:data="servicewaycontentList" :data="servicewaycontentList"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<el-table-column type="selection" width="55" align="center" /> <el-table-column width="55" align="center" />
<!-- <el-table-column label="主键id" align="center" prop="id" /> -->
<!-- <el-table-column label="服务方式名称" align="center" prop="serviceWayName" /> -->
<!-- <el-table-column label="服务方式编码" align="center" prop="serviceWayCode" /> -->
<!-- <el-table-column label="服务标识服务方式SERVICE_WRY服务内容SERVICE_CONTENT服务频次SERVICE_FREQUENCY" align="center" prop="serviceType" /> -->
<!-- <el-table-column label="所属服务方式id" align="center" prop="serviceWayId" /> -->
<el-table-column <el-table-column
label="服务内容" label="服务内容"
align="center" align="center"
prop="serviceContent" prop="serviceContent"
/> />
<!-- <el-table-column label="所属服务内容id" align="center" prop="serviceContentId" /> -->
<el-table-column <el-table-column
label="服务频次类型" label="服务频次"
align="center" align="center"
prop="serviceFrequencyType" prop="serviceWayFrequencyList"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.serviceFrequencyType == "DIGIT" ? "数字" : "" }} <div v-for="(item, index) in scope.row.serviceWayFrequencyList" :key="index">
{{ scope.row.departmentType == "TEXT" ? "文本" : "" }} <div v-if="item.serviceFrequencyType == 'DIGIT'">
{{ item.serviceFrequencyStart }}~{{
item.serviceFrequencyEnd
}}
</div>
<div v-if="item.serviceFrequencyType == 'TEXT'">
{{ item.serviceFrequencyText }}
</div>
</div>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column label="服务频次文本" align="center" prop="serviceFrequencyText" /> -->
<!-- <el-table-column label="服务频次数字起始值" align="center" prop="serviceFrequencyStart" />
<el-table-column label="服务频次数字结束值" align="center" prop="serviceFrequencyEnd" />
<el-table-column label="排序" align="center" prop="serviceSort" />
<el-table-column label="备注" align="center" prop="serviceRemark" /> -->
<el-table-column <el-table-column
label="操作" label="操作"
align="center" align="center"
@ -278,14 +278,8 @@
</el-row> </el-row>
<!-- 添加或修改服务方式内容对话框 --> <!-- 添加或修改服务方式内容对话框 -->
<el-dialog :title="title" :visible.sync="open" width="550px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
<el-form <el-form ref="form" :model="form" :rules="rules" label-width="70px">
ref="form"
:model="form"
:rules="rules"
label-width="70px"
:inline="true"
>
<!-- <el-form-item label="服务方式名称" prop="serviceWayName"> <!-- <el-form-item label="服务方式名称" prop="serviceWayName">
<el-input v-model="form.serviceWayName" placeholder="请输入服务方式名称" /> <el-input v-model="form.serviceWayName" placeholder="请输入服务方式名称" />
</el-form-item> </el-form-item>
@ -299,6 +293,7 @@
<el-input <el-input
type="textarea" type="textarea"
style="width: 400px" style="width: 400px"
placeholder="请输入服务内容"
v-model="form.serviceContent" v-model="form.serviceContent"
/> />
</el-form-item> </el-form-item>
@ -306,46 +301,51 @@
<el-input v-model="form.serviceContentId" placeholder="请输入所属服务内容id" /> <el-input v-model="form.serviceContentId" placeholder="请输入所属服务内容id" />
</el-form-item> --> </el-form-item> -->
<el-form-item label="服务频次"> <el-form-item label="服务频次">
<el-checkbox v-model="checked">数字</el-checkbox> <el-checkbox v-model="DIGIT" @change="DIGITlist">数字</el-checkbox>
<div style="display: flex; margin: -32px 34px 0 66px">
<el-form-item label="" prop="serviceFrequencyStart" label-width="">
<el-input
:disabled="disableda"
v-model="form.serviceFrequencyStart"
placeholder="请输入服务频次数字起始值"
/>
</el-form-item>
<span>~</span>
<el-form-item label="" prop="serviceFrequencyEnd" label-width="">
<el-input
:disabled="disabledb"
v-model="form.serviceFrequencyEnd"
placeholder="请输入服务频次数字结束值"
/>
</el-form-item>
</div>
<div>
<div style="position: relative; top: 12px">
<el-checkbox v-model="TEXT" @change="textlist">文本</el-checkbox>
</div>
<!-- </el-form-item> -->
<div style="margin: -23px 45px 0px 74px">
<el-form-item label="" prop="serviceFrequencyText" label-width="">
<el-input
:disabled="disabled"
v-model="form.serviceFrequencyText"
placeholder="请输入服务频次文本"
style="width: 250px"
/>
</el-form-item>
</div>
</div>
</el-form-item> </el-form-item>
<el-form-item
label="起始值"
prop="serviceFrequencyStart"
label-width=""
>
<el-input
v-model="form.serviceFrequencyStart"
placeholder="请输入服务频次数字起始值"
/>
</el-form-item>
<el-form-item
label="结束值"
prop="serviceFrequencyEnd"
label-width="200px"
>
<el-input
v-model="form.serviceFrequencyEnd"
placeholder="请输入服务频次数字结束值"
/>
</el-form-item>
<!-- </> --> <!-- </> -->
<el-form-item <!-- <el-form-item
label="服务频次文本" label=""
prop="serviceFrequencyText" prop="serviceFrequencyText"
label-width="90x" label-width="90x"
> > -->
<el-checkbox v-model="TEXT">文本</el-checkbox>
</el-form-item>
<el-form-item label="" prop="serviceFrequencyText" label-width="90x">
<el-input
v-model="form.serviceFrequencyText"
placeholder="请输入服务频次文本"
/>
</el-form-item>
<!-- <el-form-item label="排序" prop="serviceSort"> <!-- <el-form-item label="排序" prop="serviceSort">
<el-input v-model="form.serviceSort" placeholder="请输入排序" /> <el-input v-model="form.serviceSort" placeholder="请输入排序" />
</el-form-item> </el-form-item>
@ -405,14 +405,19 @@ export default {
name: "Servicewaycontent", name: "Servicewaycontent",
data() { data() {
return { return {
disabled: "", list: [],
serviceFrequencyStart: "",
serviceFrequencyEnd: "",
serviceFrequencyText: "",
serviceFrequencyType: "",
// disabled: "",
titles: "", titles: "",
checked: true, DIGIT: true,
TEXT: true, TEXT: false,
DepartmentoList: [], // DepartmentoList: [], //
format: { format: {
serviceWayName: "", serviceWayName: "",
id:'', id: "",
}, },
// //
loading: true, loading: true,
@ -453,7 +458,7 @@ export default {
serviceRemark: null, serviceRemark: null,
}, },
count: "", // count: "", //
id: "",
// //
form: {}, form: {},
// //
@ -462,6 +467,9 @@ export default {
querydepartmen: { querydepartmen: {
serviceWayName: "", serviceWayName: "",
}, },
disabled: true,
disabledb: false,
disableda: false,
}; };
}, },
watch: { watch: {
@ -480,13 +488,37 @@ export default {
// }); // });
}, },
methods: { methods: {
textlist(e) {
if (e == true) {
this.disableda = true;
this.disabledb = true;
this.disabled = false;
this.form.serviceFrequencyType = "TEXT";
}
this.DIGIT = false;
},
DIGITlist(e) {
console.log(e, "5");
if (e == true) {
this.disableda = false;
this.disabledb = false;
this.disabled = true;
this.form.serviceFrequencyType = "DIGIT";
}
this.TEXT = false;
// else {
// this.form.serviceFrequencyType = "TEXT";
// }
},
// //
submitForms() { submitForms() {
// this.form.serviceFrequencyType=this.DIGIT
// console.log(this.itenname,'5252') // console.log(this.itenname,'5252')
this.$refs["form"].validate((valid) => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
console.log(this.format) console.log(this.format);
if (this.format.id) { if (this.format.id) {
editServiceWay(this.format).then((response) => { editServiceWay(this.format).then((response) => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
@ -594,16 +626,22 @@ export default {
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.reset(); this.reset();
this.form.serviceFrequencyType = "DIGIT";
this.open = true; this.open = true;
this.title = "添加服务方式内容"; this.title = "添加服务方式内容";
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
// this.reset(); // this.reset();
console.log(row) console.log(row);
// const id = row.serviceContentId // const id = row.id
getServicewaycontent(row.serviceContentId).then((response) => { row.serviceWayFrequencyList.forEach((e) => {
this.form.id = e.id;
});
getServicewaycontent(this.form.id).then((response) => {
this.form = response.data; this.form = response.data;
this.form.id = response.data.serviceFrequencyId;
this.open = true; this.open = true;
this.title = "修改服务方式内容"; this.title = "修改服务方式内容";
}); });
@ -612,7 +650,8 @@ export default {
submitForm() { submitForm() {
this.$refs["form"].validate((valid) => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
if (this.form.id != null) { console.log(this.form.id, "555555");
if (this.form.serviceContentId != null) {
updateServicewaycontent(this.form).then((response) => { updateServicewaycontent(this.form).then((response) => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open = false; this.open = false;
@ -631,9 +670,8 @@ export default {
// //
handleedit() { handleedit() {
console.log(this.itemname); console.log(this.itemname);
this.format.id=this.itemname this.format.id = this.itemname;
if (this.itemname) { if (this.itemname) {
serviceWay(this.itemname).then((res) => { serviceWay(this.itemname).then((res) => {
this.format.serviceWayName = res.msg; this.format.serviceWayName = res.msg;
this.opens = true; this.opens = true;
@ -647,19 +685,18 @@ export default {
this.titles = "修改服务方式"; this.titles = "修改服务方式";
}, },
handledelete() { handledelete() {
const id = this.itemname const id = this.itemname;
console.log(id,'111111111') console.log(id, "111111111");
this.$modal this.$modal
.confirm("是否确认删除此服务方式?") .confirm("是否确认删除此服务方式?")
.then(function () { .then(function () {
return removeServiceWay(id); return removeServiceWay(id);
}) })
.then(() => { .then(() => {
this.mentlist(); this.mentlist();
this.$modal.msgSuccess("删除成功"); this.$modal.msgSuccess("删除成功");
}) })
.catch(() => {}); .catch(() => {});
}, },
// }, // },
handleUpdateserve() { handleUpdateserve() {
@ -669,14 +706,16 @@ export default {
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
console.log(row) console.log(row);
const id = row.serviceFrequencyId row.serviceWayFrequencyList.forEach((e) => {
const serviceContentId = row.serviceContentId this.id = e.id;
});
const id = this.id;
this.$modal this.$modal
.confirm('是否确认删除服务方式内容编号为"' + serviceContentId + '"的数据项?') .confirm("是否确认删除此该数据项?")
.then(function () { .then(function () {
return delServicewaycontent(serviceContentId,id); return delServicewaycontent(id);
}) })
.then(() => { .then(() => {
this.getList(); this.getList();

View File

@ -9,13 +9,13 @@
controls="controls" controls="controls"
>您的浏览器不支持视频播放</video> >您的浏览器不支持视频播放</video>
<img <img
v-if="options.img" v-if="options.img&&!video.VideoPath"
v-bind:src="options.img" v-bind:src="options.img"
title="点击上传图片" title="点击上传图片"
style="width: 100px; height: 100px; line-height: 200px" style="width: 100px; height: 100px; line-height: 200px"
/> />
<i <i
v-else-if="!options.img && !video.VideoPath" v-if="!options.img && !video.VideoPath"
class="el-icon-plus avatar-uploader-icon" class="el-icon-plus avatar-uploader-icon"
style=" style="
position: absolute; position: absolute;
@ -62,9 +62,7 @@
<div <div
class="title" class="title"
v-if=" v-if="
types != 'posterVideoUrl' && types == 'materialsCoverUrl'|| types == 'propagandaCoverUrl'
types != 'posterPictureUrl' &&
types != 'itemDirectoryUrl'
" "
>请上传图片为800x800px的正方形</div> >请上传图片为800x800px的正方形</div>
</el-col> </el-col>
@ -167,12 +165,15 @@ export default {
}, },
created() { created() {
this.types = this.type; this.types = this.type;
console.log(this.types)
this.items = this.item; this.items = this.item;
if (this.tovideo == null) { if (this.tovideo == null) {
this.video.VideoPath = null; this.video.VideoPath = null;
} else if (this.tovideo == "") { } else if (this.tovideo == "") {
this.video.VideoPath = null; this.video.VideoPath = null;
} else { } else {
console.log(this.tovideo)
this.video.VideoPath = process.env.VUE_APP_BASE_API + this.tovideo; this.video.VideoPath = process.env.VUE_APP_BASE_API + this.tovideo;
} }
if (this.img == null) { if (this.img == null) {
@ -182,7 +183,7 @@ export default {
} else { } else {
this.options.img = process.env.VUE_APP_BASE_API + this.img; this.options.img = process.env.VUE_APP_BASE_API + this.img;
} }
if (this.types == "posterVideoUrl" || this.types == "itemDirectoryUrl") { if (this.types == "materialsVideoUrl" || this.types == "itemDirectoryUrl") {
this.title = "上传视频"; this.title = "上传视频";
} else { } else {
this.title = "上传图片"; this.title = "上传图片";
@ -249,7 +250,7 @@ export default {
// //
beforeUpload(file) { beforeUpload(file) {
console.log(file) console.log(file)
if (this.types == "posterVideoUrl" || this.types == "itemDirectoryUrl") { if (this.types == "materialsVideoUrl") {
const reader = new FileReader(); const reader = new FileReader();
this.previews.data = file; this.previews.data = file;
this.videoForm.showVideoPath = URL.createObjectURL(file); this.videoForm.showVideoPath = URL.createObjectURL(file);
@ -354,6 +355,35 @@ export default {
}); });
} }
//
else if(this.types == "materialsCoverUrl"){
uploadFilefm(formData).then(response => {
if (response.code == 200) {
this.options.img = process.env.VUE_APP_BASE_API + response.imgUrl;
this.$emit("imgUrl", response.imgUrl);
this.openimg = false;
} else {
setTimeout(e => {
this.openimg = false;
}, 1000);
}
});
}
//
else if(this.types == "materialsVideoUrl"){
uploadFilefm(formData).then(response => {
if (response.code == 200) {
this.options.img = process.env.VUE_APP_BASE_API + response.imgUrl;
this.$emit("imgUrl", response.imgUrl);
this.openimg = false;
} else {
setTimeout(e => {
this.openimg = false;
}, 1000);
}
});
}
else { else {
updateNurseStationHeads(formData).then(response => { updateNurseStationHeads(formData).then(response => {
if (response.code == 200) { if (response.code == 200) {