Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
c768eaed8b
52
src/api/manage/message.js
Normal file
52
src/api/manage/message.js
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询短信模板信息列表
|
||||||
|
export function listMessage(query) {
|
||||||
|
return request({
|
||||||
|
url: '/manage/message/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询短信模板信息详细
|
||||||
|
export function getMessage(id) {
|
||||||
|
return request({
|
||||||
|
url: '/manage/message/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增短信模板信息
|
||||||
|
export function addMessage(data) {
|
||||||
|
return request({
|
||||||
|
url: '/manage/message/add',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改短信模板信息
|
||||||
|
export function updateMessage(data) {
|
||||||
|
return request({
|
||||||
|
url: '/manage/message/edit',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除短信模板信息
|
||||||
|
export function delMessage(id) {
|
||||||
|
return request({
|
||||||
|
url: '/manage/message/remove/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 查询科室信息列表及包含短信库数量
|
||||||
|
export function listMessageNum(query) {
|
||||||
|
return request({
|
||||||
|
url: '/system/department/listMessageNum',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
BIN
src/assets/system/userinfo.jpg
Normal file
BIN
src/assets/system/userinfo.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
981
src/views/manage/message/index.vue
Normal file
981
src/views/manage/message/index.vue
Normal file
@ -0,0 +1,981 @@
|
|||||||
|
<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="textMessageName"
|
||||||
|
label-width="100px"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.textMessageName"
|
||||||
|
placeholder="请输入微信模版名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="模板ID" prop="textMessageId">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.textMessageId"
|
||||||
|
placeholder="请输入模板ID"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="短信状态" prop="textMessageStatus">
|
||||||
|
<el-select
|
||||||
|
v-model="queryParams.textMessageStatus"
|
||||||
|
placeholder="请选择短信通道"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in optionstext"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</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:template:add']"
|
||||||
|
>新增短信模版</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<right-toolbar
|
||||||
|
:showSearch.sync="showSearch"
|
||||||
|
@queryTable="getList"
|
||||||
|
></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="5">
|
||||||
|
<div class="left" ref="box">
|
||||||
|
<div class="name">科室名称</div>
|
||||||
|
<div>
|
||||||
|
<el-input
|
||||||
|
v-model="name"
|
||||||
|
placeholder="请输入科室名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="listitem">
|
||||||
|
<div
|
||||||
|
:class="itemname == null ? 'allactive' : 'all'"
|
||||||
|
@click="itemdata()"
|
||||||
|
>
|
||||||
|
全部
|
||||||
|
</div>
|
||||||
|
<span class="count">{{ count }}</span>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="listitem"
|
||||||
|
v-for="(item, index) in DepartmentoList"
|
||||||
|
:key="index"
|
||||||
|
@click="itemdata(item)"
|
||||||
|
>
|
||||||
|
<div :class="itemname == item.id ? 'allactive' : 'all'">
|
||||||
|
{{ item.departmentName }}
|
||||||
|
</div>
|
||||||
|
<span class="count">{{ item.countNum }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="19">
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="templateList"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
>
|
||||||
|
<el-table-column
|
||||||
|
type="index"
|
||||||
|
width="55"
|
||||||
|
align="center"
|
||||||
|
label="序号"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="短信模板名称"
|
||||||
|
align="center"
|
||||||
|
prop="textMessageName"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
/>
|
||||||
|
<el-table-column label="短信ID" align="center" prop="textMessageId" />
|
||||||
|
<el-table-column
|
||||||
|
label="短信内容"
|
||||||
|
align="center"
|
||||||
|
prop="textMessageContent"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="适用任务类型"
|
||||||
|
align="center"
|
||||||
|
prop="suitTaskTypeName"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="短信通道"
|
||||||
|
align="center"
|
||||||
|
prop="textMessageChannel"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{
|
||||||
|
scope.row.textMessageChannel == "WATER_DROPLET_PLATFORM"
|
||||||
|
? "水滴平台"
|
||||||
|
: ""
|
||||||
|
}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="短信状态"
|
||||||
|
align="center"
|
||||||
|
prop="textMessageStatus"
|
||||||
|
>
|
||||||
|
<!-- <template slot-scope="scope">
|
||||||
|
{{ scope.row.textMessageStatus == "GROUNDING" ? "上架" : "" }}
|
||||||
|
{{ scope.row.textMessageStatus == "OFF_SHELF" ? "下架" : "" }}
|
||||||
|
</template> -->
|
||||||
|
<template slot-scope="scope" >
|
||||||
|
<span slot="reference" v-if="scope.row.textMessageStatus == 'GROUNDING'">
|
||||||
|
<i class="dotClass" style="background-color: springgreen"></i>上架
|
||||||
|
</span>
|
||||||
|
<span slot="reference" v-if="scope.row.textMessageStatus == 'OFF_SHELF'" >
|
||||||
|
<i class="dotClass" style="background-color: red"></i>下架
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="病种名称"
|
||||||
|
align="center"
|
||||||
|
prop="diseaseTypeName"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- <el-table-column
|
||||||
|
label="短信排序"
|
||||||
|
align="center"
|
||||||
|
prop="textMessageSort"
|
||||||
|
/> -->
|
||||||
|
|
||||||
|
<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:template:edit']"
|
||||||
|
>修改</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['manage:template: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-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 添加或修改短信模板信息对话框 -->
|
||||||
|
<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="短信模板名称" prop="textMessageName">
|
||||||
|
<el-input
|
||||||
|
v-model="form.textMessageName"
|
||||||
|
placeholder="请输入短信模板名称"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="短信ID" prop="textMessageId">
|
||||||
|
<el-input v-model="form.textMessageId" placeholder="请输入短信ID" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="短信内容" prop="textMessageContent">
|
||||||
|
<el-input
|
||||||
|
v-model="form.textMessageContent"
|
||||||
|
placeholder="请输入短信内容"
|
||||||
|
type="textarea"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="适用任务类型" prop="suitTaskTypeIds">
|
||||||
|
<el-select
|
||||||
|
v-model="form.suitTaskTypeIds"
|
||||||
|
placeholder="请选择适用任务类型"
|
||||||
|
style="width: 380px"
|
||||||
|
multiple
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in type"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.dictLabel"
|
||||||
|
:value="item.dictCode"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="短信通道" prop="textMessageChannel">
|
||||||
|
<el-select
|
||||||
|
v-model="form.textMessageChannel"
|
||||||
|
placeholder="请选择短信通道"
|
||||||
|
style="width: 380px"
|
||||||
|
>
|
||||||
|
<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-item label="短信状态" prop="textMessageStatus">
|
||||||
|
<el-select
|
||||||
|
v-model="form.textMessageStatus"
|
||||||
|
placeholder="请选择短信状态"
|
||||||
|
style="width: 380px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in optionstext"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="科室名称" prop="departmentId">
|
||||||
|
<el-button
|
||||||
|
type=""
|
||||||
|
v-if="departmentName == '请选择科室'"
|
||||||
|
@click="clickinnerVisible()"
|
||||||
|
style="
|
||||||
|
width: 379px;
|
||||||
|
text-align: left;
|
||||||
|
height: 36px;
|
||||||
|
color: #c0c4cc;
|
||||||
|
overflow: hidden;
|
||||||
|
"
|
||||||
|
>{{ departmentName }}</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
@click="clickinnerVisible()"
|
||||||
|
type=""
|
||||||
|
v-else
|
||||||
|
style="
|
||||||
|
width: 379px;
|
||||||
|
text-align: left;
|
||||||
|
height: 36px;
|
||||||
|
padding-left: -10px;
|
||||||
|
overflow: hidden;
|
||||||
|
"
|
||||||
|
>{{ departmentName }}</el-button
|
||||||
|
>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="病种名称" prop="diseaseTypeName">
|
||||||
|
<el-button
|
||||||
|
type=""
|
||||||
|
v-if="diseaseTypeName == '请选择病种'"
|
||||||
|
@click="clickdisease()"
|
||||||
|
style="
|
||||||
|
width: 379px;
|
||||||
|
text-align: left;
|
||||||
|
height: 36px;
|
||||||
|
color: #c0c4cc;
|
||||||
|
overflow: hidden;
|
||||||
|
"
|
||||||
|
>{{ diseaseTypeName }}</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
@click="clickdisease()"
|
||||||
|
type=""
|
||||||
|
v-else
|
||||||
|
style="
|
||||||
|
width: 379px;
|
||||||
|
text-align: left;
|
||||||
|
height: 36px;
|
||||||
|
padding-left: -10px;
|
||||||
|
overflow: hidden;
|
||||||
|
"
|
||||||
|
>{{ diseaseTypeName }}</el-button
|
||||||
|
>
|
||||||
|
</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="innerVisibleshow"
|
||||||
|
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="departmentName" label-width="120">
|
||||||
|
<el-input
|
||||||
|
v-model="informationqueryParams.departmentName"
|
||||||
|
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.departmentId == scope.row.departmentCode"
|
||||||
|
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="departmentName"
|
||||||
|
label="科室名称"
|
||||||
|
align="center"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<pagination
|
||||||
|
v-show="totaldepartment > 0"
|
||||||
|
:total="totaldepartment"
|
||||||
|
:page.sync="informationqueryParams.pageNum"
|
||||||
|
:limit.sync="informationqueryParams.pageSize"
|
||||||
|
@pagination="informationInfoinfo"
|
||||||
|
/>
|
||||||
|
</el-dialog>
|
||||||
|
<!-- 病种弹框 -->
|
||||||
|
<el-dialog
|
||||||
|
title=""
|
||||||
|
:visible.sync="diseaseshowst"
|
||||||
|
width="1000px"
|
||||||
|
append-to-body
|
||||||
|
:before-close="canceldiseases"
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
ref="queryForm"
|
||||||
|
:model="querydisease"
|
||||||
|
:rules="rules"
|
||||||
|
label-width="80px"
|
||||||
|
:inline="true"
|
||||||
|
>
|
||||||
|
<el-form-item label="病种名称" prop="departmentName" label-width="120">
|
||||||
|
<el-input
|
||||||
|
v-model="querydisease.departmentName"
|
||||||
|
placeholder="请输入病种名称"
|
||||||
|
clearable
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
size="mini"
|
||||||
|
@click="infodisease"
|
||||||
|
>搜索</el-button
|
||||||
|
>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetdisease"
|
||||||
|
>重置</el-button
|
||||||
|
>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-table
|
||||||
|
:data="listdisease"
|
||||||
|
@cell-dblclick="nurseclickdisease"
|
||||||
|
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.diseaseTypeId == scope.row.diseaseTypeCode"
|
||||||
|
circle
|
||||||
|
@click="nurseclickdisease(scope.row)"
|
||||||
|
></el-button>
|
||||||
|
<el-button
|
||||||
|
v-else
|
||||||
|
style="width: 15px; height: 15px"
|
||||||
|
circle
|
||||||
|
@click="nurseclickdisease(scope.row)"
|
||||||
|
></el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
property="diseaseTypeName"
|
||||||
|
label="病种名称"
|
||||||
|
align="center"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<pagination
|
||||||
|
v-show="diseasetotal > 0"
|
||||||
|
:total="diseasetotal"
|
||||||
|
:page.sync="querydisease.pageNum"
|
||||||
|
:limit.sync="querydisease.pageSize"
|
||||||
|
@pagination="infodisease"
|
||||||
|
/>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listMessage, getMessage, delMessage, addMessage, updateMessage,listMessageNum } from "@/api/manage/message";
|
||||||
|
|
||||||
|
import { typelist } from "@/api/manage/template";
|
||||||
|
import { department, listDisease } from "@/api/manage/script";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Template",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
itemname: null,
|
||||||
|
departmentName: null,
|
||||||
|
diseaseTypeName: null,
|
||||||
|
name: '',
|
||||||
|
departmentId: null,
|
||||||
|
count: '',//全部
|
||||||
|
DepartmentoList: [],//左侧数组
|
||||||
|
// 左侧传值
|
||||||
|
querydepartmen: {
|
||||||
|
departmentName: "",
|
||||||
|
// pageNum: 1,
|
||||||
|
// pageSize: 10,
|
||||||
|
|
||||||
|
},
|
||||||
|
optionstext: [{
|
||||||
|
value: 'GROUNDING',
|
||||||
|
label: '上架'
|
||||||
|
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 'OFF_SHELF',
|
||||||
|
label: '下架'
|
||||||
|
|
||||||
|
}],
|
||||||
|
options: [{
|
||||||
|
value: 'WATER_DROPLET_PLATFORM',
|
||||||
|
label: '水滴平台'
|
||||||
|
},],
|
||||||
|
type: [],//类型
|
||||||
|
|
||||||
|
|
||||||
|
innerVisibleshow: false, //科室弹框
|
||||||
|
// 科室
|
||||||
|
informationqueryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
departmentName: null,
|
||||||
|
},
|
||||||
|
infolist: [],
|
||||||
|
totaldepartment: 0,
|
||||||
|
|
||||||
|
diseaseshowst: false,//病种弹框
|
||||||
|
querydisease: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
},
|
||||||
|
listdisease: [],
|
||||||
|
diseasetotal: 0,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
optionsDisease: [],
|
||||||
|
// 遮罩层
|
||||||
|
loading: false,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 微信模板信息表格数据
|
||||||
|
templateList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
textMessageId:null,
|
||||||
|
departmentId: null,
|
||||||
|
departmentName: null,
|
||||||
|
diseaseTypeId: null,
|
||||||
|
diseaseTypeName: null,
|
||||||
|
textMessageName: null,
|
||||||
|
textMessageContent: null,
|
||||||
|
textMessageChannel: null,
|
||||||
|
textMessageStatus: null,
|
||||||
|
textMessageSort: null,
|
||||||
|
textMessageRemark: null,
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
textMessageName: [
|
||||||
|
{ required: true, message: "短信模板名称不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
textMessageId: [
|
||||||
|
{ required: true, message: "短信ID不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
textMessageContent: [
|
||||||
|
{ required: true, message: "短信内容不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
|
||||||
|
|
||||||
|
textMessageChannel: [
|
||||||
|
{ required: true, message: "短信通道不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
|
||||||
|
textMessageStatus: [
|
||||||
|
{ required: true, message: "短信状态不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
departmentId: [
|
||||||
|
{ required: true, message: "所属科室名称不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
name(val) {
|
||||||
|
this.querydepartmen.departmentName = val
|
||||||
|
this.Departmentlist();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
this.Departmentlist();
|
||||||
|
this.typelistdata();
|
||||||
|
listMessage(this.queryParams).then(response => {
|
||||||
|
this.count = response.total;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询微信模板信息列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listMessage(this.queryParams).then(response => {
|
||||||
|
this.templateList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 适用任务类型
|
||||||
|
typelistdata() {
|
||||||
|
var dictType = "suit_task_type"
|
||||||
|
typelist(dictType).then(response => {
|
||||||
|
this.type = response.data
|
||||||
|
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 类型点击事件
|
||||||
|
change(e) {
|
||||||
|
// this.form.suitTaskTypeName = this.type.find(f => f.dictCode == e).dictLabel
|
||||||
|
},
|
||||||
|
|
||||||
|
// 左侧科室列表
|
||||||
|
Departmentlist() {
|
||||||
|
this.loading = true;
|
||||||
|
listMessageNum(this.querydepartmen).then(response => {
|
||||||
|
this.DepartmentoList = response.data;
|
||||||
|
// this.count=this.DepartmentoList.length
|
||||||
|
console.log(this.DepartmentoList)
|
||||||
|
|
||||||
|
// this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
|
||||||
|
},
|
||||||
|
// 左侧科室
|
||||||
|
itemdata(item) {
|
||||||
|
if (item) {
|
||||||
|
console.log(item, '9999')
|
||||||
|
this.itemname = item.id
|
||||||
|
this.departmentName = item.departmentName
|
||||||
|
this.loading = true;
|
||||||
|
this.queryParams.departmentId = item.id
|
||||||
|
this.getList()
|
||||||
|
} else {
|
||||||
|
this.queryParams.departmentId = ''
|
||||||
|
this.itemname = null
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
// 点击科室
|
||||||
|
clickinnerVisible() {
|
||||||
|
this.innerVisibleshow = true;
|
||||||
|
if (this.itemname) {
|
||||||
|
this.informationqueryParams.departmentId = this.itemname
|
||||||
|
|
||||||
|
} else {
|
||||||
|
this.informationqueryParams.departmentId = null
|
||||||
|
}
|
||||||
|
this.informationInfoinfo();
|
||||||
|
},
|
||||||
|
// 科室列表
|
||||||
|
informationInfoinfo() {
|
||||||
|
department(this.informationqueryParams).then((response) => {
|
||||||
|
this.infolist = response.rows;
|
||||||
|
this.totaldepartment = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
// this.informationqueryParams.page = 1;
|
||||||
|
},
|
||||||
|
// 科室名称重置
|
||||||
|
addresetQuerylist() {
|
||||||
|
this.informationqueryParams = {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
};
|
||||||
|
this.informationInfoinfo();
|
||||||
|
},
|
||||||
|
innerVisiblecancel() {
|
||||||
|
this.innerVisibleshow = false;
|
||||||
|
},
|
||||||
|
// 科室名称圆点按钮
|
||||||
|
nurseclick(row) {
|
||||||
|
this.form.departmentId = row.departmentCode;
|
||||||
|
this.departmentName = row.departmentName;
|
||||||
|
console.log(this.departmentName, '0000')
|
||||||
|
this.innerVisibleshow = false;
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 病种列表
|
||||||
|
infodisease() {
|
||||||
|
listDisease(this.querydisease).then((response) => {
|
||||||
|
this.listdisease = response.rows;
|
||||||
|
this.diseasetotal = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 点击病种
|
||||||
|
clickdisease() {
|
||||||
|
console.log(this.form)
|
||||||
|
if (this.departmentName == '请选择科室') {
|
||||||
|
this.$modal.msgError("请先选择科室");
|
||||||
|
|
||||||
|
} else {
|
||||||
|
console.log(this.departmentName, '00000')
|
||||||
|
this.diseaseshowst = true;
|
||||||
|
this.querydisease.departmentId = this.form.departmentId
|
||||||
|
this.infodisease()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 病种名称圆点按钮
|
||||||
|
nurseclickdisease(row) {
|
||||||
|
this.form.diseaseTypeId = row.diseaseTypeCode;
|
||||||
|
this.diseaseTypeName = row.diseaseTypeName;
|
||||||
|
this.diseaseshowst = false;
|
||||||
|
console.log(this.diseaseTypeName, '1121000')
|
||||||
|
|
||||||
|
},
|
||||||
|
// 重置
|
||||||
|
resetdisease() {
|
||||||
|
querydisease = {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
};
|
||||||
|
this.infodisease()
|
||||||
|
},
|
||||||
|
|
||||||
|
canceldiseases() {
|
||||||
|
this.diseaseshowst = false;
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
departmentId: null,
|
||||||
|
departmentName: null,
|
||||||
|
diseaseTypeId: null,
|
||||||
|
diseaseTypeName: null,
|
||||||
|
textMessageName: null,
|
||||||
|
textMessageId: null,
|
||||||
|
textMessageContent: null,
|
||||||
|
textMessageChannel: null,
|
||||||
|
textMessageStatus: null,
|
||||||
|
textMessageSort: null,
|
||||||
|
textMessageRemark: null,
|
||||||
|
createBy: null,
|
||||||
|
createTime: null,
|
||||||
|
updateBy: null,
|
||||||
|
updateTime: null,
|
||||||
|
suitTaskTypeIds:[],
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.queryParams.departmentId = null;
|
||||||
|
this.itemname = null;
|
||||||
|
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();
|
||||||
|
console.log(this.form)
|
||||||
|
if (this.itemname) {
|
||||||
|
this.form.departmentName = this.departmentName
|
||||||
|
this.form.departmentId = this.itemname
|
||||||
|
} else if (this.itemname == null) {
|
||||||
|
this.departmentName = "请选择科室"
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.departmentName = "请选择科室"
|
||||||
|
}
|
||||||
|
this.diseaseTypeName = "请选择病种"
|
||||||
|
|
||||||
|
this.open = true;
|
||||||
|
this.title = "新增短信模版";
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
if (!this.itemname) {
|
||||||
|
this.$modal.msgError("请先选择科室");
|
||||||
|
} else {
|
||||||
|
// this.reset();
|
||||||
|
const id = row.id || this.ids
|
||||||
|
// this.getDisease();
|
||||||
|
getMessage(id).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.diseaseTypeName = response.data.diseaseTypeName
|
||||||
|
this.departmentName = response.data.departmentName
|
||||||
|
this.form.suitTaskTypeIds = response.data.suitTaskTypeIds
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改短信模板信息";
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
console.log(this.form)
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.id != null) {
|
||||||
|
this.form.departmentName = this.departmentName
|
||||||
|
this.form.diseaseTypeName = this.diseaseTypeName
|
||||||
|
updateMessage(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
if (this.diseaseTypeName == "请选择病种") {
|
||||||
|
this.form.diseaseTypeName == null
|
||||||
|
} else {
|
||||||
|
this.form.diseaseTypeName = this.diseaseTypeName
|
||||||
|
}
|
||||||
|
if (this.itemname) {
|
||||||
|
|
||||||
|
this.form.departmentName = this.departmentName
|
||||||
|
this.form.departmentId = this.itemname
|
||||||
|
|
||||||
|
} else {
|
||||||
|
this.form.departmentName = this.departmentName
|
||||||
|
|
||||||
|
}
|
||||||
|
addMessage(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
this.Departmentlist();
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const ids = row.id || this.ids;
|
||||||
|
this.$modal.confirm('是否确认删除短信模板信息?').then(function () {
|
||||||
|
return delMessage(ids);
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
var quer = {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
|
||||||
|
}
|
||||||
|
listMessage(quer).then(response => {
|
||||||
|
this.count = response.total;
|
||||||
|
});
|
||||||
|
this.Departmentlist();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => { });
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('manage/template/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `template_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss">
|
||||||
|
.left {
|
||||||
|
height: 530px;
|
||||||
|
overflow: auto;
|
||||||
|
.name {
|
||||||
|
font-weight: 700;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
.listitem {
|
||||||
|
width: 100%;
|
||||||
|
height: 50px;
|
||||||
|
border-bottom: 1px solid #dcdfe6;
|
||||||
|
.count {
|
||||||
|
display: inline-block;
|
||||||
|
position: relative;
|
||||||
|
// right: -172px;
|
||||||
|
left: 210px;
|
||||||
|
color: #a4a6aa;
|
||||||
|
top: -35px;
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
.all {
|
||||||
|
height: 50px;
|
||||||
|
line-height: 50px;
|
||||||
|
padding-left: 13px;
|
||||||
|
}
|
||||||
|
.allactive {
|
||||||
|
background: #e8f4ff;
|
||||||
|
height: 50px;
|
||||||
|
line-height: 50px;
|
||||||
|
padding-left: 13px;
|
||||||
|
border-left: 3px solid #4d9de7;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.button {
|
||||||
|
display: inline-block;
|
||||||
|
position: relative;
|
||||||
|
left: 20px;
|
||||||
|
top: -11px;
|
||||||
|
}
|
||||||
|
.dotClass {
|
||||||
|
width:10px;
|
||||||
|
height:10px;
|
||||||
|
border-radius: 50%;
|
||||||
|
display: block;
|
||||||
|
// margin-left: 10px; //这个用于圆点居中
|
||||||
|
position: relative;
|
||||||
|
top: 16px;
|
||||||
|
left: 12px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -806,7 +806,6 @@ export default {
|
|||||||
nurseclick(row) {
|
nurseclick(row) {
|
||||||
this.form.departmentId = row.departmentCode;
|
this.form.departmentId = row.departmentCode;
|
||||||
this.departmentName = row.departmentName;
|
this.departmentName = row.departmentName;
|
||||||
console.log(this.departmentName, '0000')
|
|
||||||
this.innerVisibleshow = false;
|
this.innerVisibleshow = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -821,12 +820,10 @@ export default {
|
|||||||
},
|
},
|
||||||
// 点击病种
|
// 点击病种
|
||||||
clickdisease() {
|
clickdisease() {
|
||||||
console.log(this.form)
|
|
||||||
if (this.departmentName == '请选择科室') {
|
if (this.departmentName == '请选择科室') {
|
||||||
this.$modal.msgError("请先选择科室");
|
this.$modal.msgError("请先选择科室");
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
console.log(this.departmentName, '00000')
|
|
||||||
this.diseaseshowst = true;
|
this.diseaseshowst = true;
|
||||||
this.querydisease.departmentId = this.form.departmentId
|
this.querydisease.departmentId = this.form.departmentId
|
||||||
this.infodisease()
|
this.infodisease()
|
||||||
@ -838,8 +835,6 @@ export default {
|
|||||||
this.form.diseaseTypeId = row.diseaseTypeCode;
|
this.form.diseaseTypeId = row.diseaseTypeCode;
|
||||||
this.diseaseTypeName = row.diseaseTypeName;
|
this.diseaseTypeName = row.diseaseTypeName;
|
||||||
this.diseaseshowst = false;
|
this.diseaseshowst = false;
|
||||||
console.log(this.diseaseTypeName, '1121000')
|
|
||||||
|
|
||||||
},
|
},
|
||||||
// 重置
|
// 重置
|
||||||
resetdisease() {
|
resetdisease() {
|
||||||
@ -869,7 +864,6 @@ export default {
|
|||||||
// 左侧科室
|
// 左侧科室
|
||||||
itemdata(item) {
|
itemdata(item) {
|
||||||
if (item) {
|
if (item) {
|
||||||
console.log(item, '9999')
|
|
||||||
this.itemname = item.id
|
this.itemname = item.id
|
||||||
// this.form.departmentId = item.id
|
// this.form.departmentId = item.id
|
||||||
this.departmentName = item.departmentName
|
this.departmentName = item.departmentName
|
||||||
@ -965,7 +959,6 @@ export default {
|
|||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.reset();
|
this.reset();
|
||||||
console.log(this.form)
|
|
||||||
if (this.itemname) {
|
if (this.itemname) {
|
||||||
this.form.departmentName = this.departmentName
|
this.form.departmentName = this.departmentName
|
||||||
this.form.departmentId=this.itemname
|
this.form.departmentId=this.itemname
|
||||||
@ -981,7 +974,7 @@ export default {
|
|||||||
|
|
||||||
|
|
||||||
this.title = "添加话术信息";
|
this.title = "添加话术信息";
|
||||||
this.getDisease();
|
// this.getDisease();
|
||||||
|
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
@ -1011,8 +1004,6 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm() {
|
submitForm() {
|
||||||
console.log(this.form)
|
|
||||||
console.log(this.diseaseTypeName)
|
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
|
|||||||
@ -102,7 +102,12 @@
|
|||||||
:data="templateList"
|
:data="templateList"
|
||||||
@selection-change="handleSelectionChange"
|
@selection-change="handleSelectionChange"
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="55" align="center" label="序号"/>
|
<el-table-column
|
||||||
|
type="index"
|
||||||
|
width="55"
|
||||||
|
align="center"
|
||||||
|
label="序号"
|
||||||
|
/>
|
||||||
>
|
>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="微信模版名称"
|
label="微信模版名称"
|
||||||
@ -116,11 +121,7 @@
|
|||||||
prop="templateSource"
|
prop="templateSource"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{
|
{{ scope.row.templateSource == "WE_CHAT_APPLET" ? "小程序" : "" }}
|
||||||
scope.row.templateSource == "WE_CHAT_APPLET"
|
|
||||||
? "小程序"
|
|
||||||
: ""
|
|
||||||
}}
|
|
||||||
{{
|
{{
|
||||||
scope.row.templateSource == "WE_CHAT_OFFICIAL_ACCOUNT"
|
scope.row.templateSource == "WE_CHAT_OFFICIAL_ACCOUNT"
|
||||||
? "公众号"
|
? "公众号"
|
||||||
@ -178,20 +179,30 @@
|
|||||||
<!-- 添加或修改微信模板信息对话框 -->
|
<!-- 添加或修改微信模板信息对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
<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 ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
|
||||||
<el-form-item label="微信模板名称" prop="wechatTemplateName">
|
<el-form-item label="微信模板名称" prop="wechatTemplateName">
|
||||||
<el-input v-model="form.wechatTemplateName" placeholder="请输入微信模板名称" />
|
<el-input
|
||||||
|
v-model="form.wechatTemplateName"
|
||||||
|
placeholder="请输入微信模板名称"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="模板ID" prop="templateId">
|
<el-form-item label="模板ID" prop="templateId">
|
||||||
<el-input v-model="form.templateId" placeholder="请输入模板ID" />
|
<el-input v-model="form.templateId" placeholder="请输入模板ID" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="模板内容" prop="templateContent">
|
<el-form-item label="模板内容" prop="templateContent">
|
||||||
<el-input v-model="form.templateContent" placeholder="请输入模板内容" type="textarea" />
|
<el-input
|
||||||
|
v-model="form.templateContent"
|
||||||
|
placeholder="请输入模板内容"
|
||||||
|
type="textarea"
|
||||||
|
/>
|
||||||
|
|
||||||
<!-- <editor v-model="form.templateContent" :min-height="192"/> -->
|
<!-- <editor v-model="form.templateContent" :min-height="192"/> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="模板来源" prop="templateSource">
|
<el-form-item label="模板来源" prop="templateSource">
|
||||||
<el-select v-model="form.templateSource" placeholder="请选择" style="width:380px">
|
<el-select
|
||||||
|
v-model="form.templateSource"
|
||||||
|
placeholder="请选择"
|
||||||
|
style="width: 380px"
|
||||||
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in options"
|
v-for="item in options"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
@ -199,14 +210,18 @@
|
|||||||
:value="item.value"
|
:value="item.value"
|
||||||
>
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="适用数据类型" prop="suitTaskTypeId">
|
<el-form-item label="适用数据类型" prop="suitTaskTypeId">
|
||||||
<el-select v-model="form.suitTaskTypeId " placeholder="请选择" style="width:380px" @change="change">
|
<el-select
|
||||||
|
v-model="form.suitTaskTypeIds"
|
||||||
|
placeholder="请选择"
|
||||||
|
style="width: 380px"
|
||||||
|
multiple
|
||||||
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in type"
|
v-for="item in type"
|
||||||
:key="item.id"
|
:key="item.dictCode"
|
||||||
:label="item.dictLabel"
|
:label="item.dictLabel"
|
||||||
:value="item.dictCode"
|
:value="item.dictCode"
|
||||||
>
|
>
|
||||||
@ -269,7 +284,6 @@
|
|||||||
>{{ diseaseTypeName }}</el-button
|
>{{ diseaseTypeName }}</el-button
|
||||||
>
|
>
|
||||||
</el-form-item>
|
</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>
|
||||||
@ -345,7 +359,6 @@
|
|||||||
:show-overflow-tooltip="true"
|
:show-overflow-tooltip="true"
|
||||||
>
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
</el-table>
|
</el-table>
|
||||||
<pagination
|
<pagination
|
||||||
v-show="totaldepartment > 0"
|
v-show="totaldepartment > 0"
|
||||||
@ -430,13 +443,12 @@
|
|||||||
@pagination="infodisease"
|
@pagination="infodisease"
|
||||||
/>
|
/>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listTemplate, getTemplate, delTemplate, addTemplate, updateTemplate, listWechatTemplateNum ,typelist} from "@/api/manage/template";
|
import { listTemplate, getTemplate, delTemplate, addTemplate, updateTemplate, listWechatTemplateNum, typelist } from "@/api/manage/template";
|
||||||
import {department, listDisease } from "@/api/manage/script";
|
import { department, listDisease } from "@/api/manage/script";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Template",
|
name: "Template",
|
||||||
@ -447,7 +459,7 @@ export default {
|
|||||||
diseaseTypeName: null,
|
diseaseTypeName: null,
|
||||||
name: '',
|
name: '',
|
||||||
departmentId: null,
|
departmentId: null,
|
||||||
count:'',//全部
|
count: '',//全部
|
||||||
DepartmentoList: [],//左侧数组
|
DepartmentoList: [],//左侧数组
|
||||||
// 左侧传值
|
// 左侧传值
|
||||||
querydepartmen: {
|
querydepartmen: {
|
||||||
@ -463,7 +475,7 @@ export default {
|
|||||||
value: 'WE_CHAT_OFFICIAL_ACCOUNT',
|
value: 'WE_CHAT_OFFICIAL_ACCOUNT',
|
||||||
label: '公众号'
|
label: '公众号'
|
||||||
},],
|
},],
|
||||||
type:[],//类型
|
type: [],//适用数据类型
|
||||||
|
|
||||||
|
|
||||||
innerVisibleshow: false, //科室弹框
|
innerVisibleshow: false, //科室弹框
|
||||||
@ -510,7 +522,7 @@ export default {
|
|||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
wechatTemplateName:null,
|
wechatTemplateName: null,
|
||||||
departmentId: null,
|
departmentId: null,
|
||||||
departmentName: null,
|
departmentName: null,
|
||||||
diseaseTypeId: null,
|
diseaseTypeId: null,
|
||||||
@ -569,16 +581,16 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 适用任务类型
|
// 适用任务类型
|
||||||
typelistdata(){
|
typelistdata() {
|
||||||
var dictType="suit_task_type"
|
var dictType = "suit_task_type"
|
||||||
typelist(dictType).then(response=>{
|
typelist(dictType).then(response => {
|
||||||
this.type=response.data
|
this.type = response.data
|
||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 类型点击事件
|
// 类型点击事件
|
||||||
change(e){
|
change(e) {
|
||||||
this.form.suitTaskTypeName=this.type.find(f=> f.dictCode==e).dictLabel
|
// this.form.suitTaskTypeName=this.type.find(f=> f.dictCode==e).dictLabel
|
||||||
},
|
},
|
||||||
|
|
||||||
// 左侧科室列表
|
// 左侧科室列表
|
||||||
@ -605,8 +617,12 @@ export default {
|
|||||||
this.getList()
|
this.getList()
|
||||||
} else {
|
} else {
|
||||||
this.queryParams.departmentId = ''
|
this.queryParams.departmentId = ''
|
||||||
|
|
||||||
this.itemname = null
|
this.itemname = null
|
||||||
this.getList()
|
this.getList()
|
||||||
|
listTemplate(this.queryParams).then(response => {
|
||||||
|
this.count = response.total;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -699,7 +715,7 @@ export default {
|
|||||||
this.form = {
|
this.form = {
|
||||||
id: null,
|
id: null,
|
||||||
departmentId: null,
|
departmentId: null,
|
||||||
dictCode:null,
|
dictCode: null,
|
||||||
departmentName: null,
|
departmentName: null,
|
||||||
diseaseTypeId: null,
|
diseaseTypeId: null,
|
||||||
diseaseTypeName: null,
|
diseaseTypeName: null,
|
||||||
@ -711,8 +727,10 @@ export default {
|
|||||||
createBy: null,
|
createBy: null,
|
||||||
createTime: null,
|
createTime: null,
|
||||||
updateBy: null,
|
updateBy: null,
|
||||||
updateTime: null
|
updateTime: null,
|
||||||
|
suitTaskTypeIds: [],
|
||||||
};
|
};
|
||||||
|
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
@ -738,8 +756,8 @@ export default {
|
|||||||
this.reset();
|
this.reset();
|
||||||
if (this.itemname) {
|
if (this.itemname) {
|
||||||
this.form.departmentName = this.departmentName
|
this.form.departmentName = this.departmentName
|
||||||
this.form.departmentId=this.itemname
|
this.form.departmentId = this.itemname
|
||||||
} else if(this.itemname == null){
|
} else if (this.itemname == null) {
|
||||||
this.departmentName = "请选择科室"
|
this.departmentName = "请选择科室"
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -758,17 +776,20 @@ export default {
|
|||||||
// this.reset();
|
// this.reset();
|
||||||
const id = row.id || this.ids
|
const id = row.id || this.ids
|
||||||
// this.getDisease();
|
// this.getDisease();
|
||||||
|
this.typelistdata();
|
||||||
getTemplate(id).then(response => {
|
getTemplate(id).then(response => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
|
this.form.suitTaskTypeIds = response.data.suitTaskTypeIds
|
||||||
this.diseaseTypeName = response.data.diseaseTypeName
|
this.diseaseTypeName = response.data.diseaseTypeName
|
||||||
this.departmentName = response.data.departmentName
|
this.departmentName = response.data.departmentName
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改话术信息";
|
this.title = "修改信息";
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm() {
|
submitForm() {
|
||||||
|
console.log(this.form)
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
@ -780,17 +801,17 @@ export default {
|
|||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
if(this.diseaseTypeName == "请选择病种"){
|
if (this.diseaseTypeName == "请选择病种") {
|
||||||
this.form.diseaseTypeName==null
|
this.form.diseaseTypeName == null
|
||||||
}else{
|
} else {
|
||||||
this.form.diseaseTypeName = this.diseaseTypeName
|
this.form.diseaseTypeName = this.diseaseTypeName
|
||||||
}
|
}
|
||||||
if(this.itemname){
|
if (this.itemname) {
|
||||||
|
|
||||||
this.form.departmentName = this.departmentName
|
this.form.departmentName = this.departmentName
|
||||||
this.form.departmentId=this.itemname
|
this.form.departmentId = this.itemname
|
||||||
|
|
||||||
}else{
|
} else {
|
||||||
this.form.departmentName = this.departmentName
|
this.form.departmentName = this.departmentName
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -811,7 +832,7 @@ export default {
|
|||||||
return delTemplate(ids);
|
return delTemplate(ids);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
var quer={
|
var quer = {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
<div class="topheader">
|
<div class="topheader">
|
||||||
<el-button size="medium">返回</el-button>
|
<el-button size="medium">返回</el-button>
|
||||||
<el-button size="medium" type="primary" plain>预览问卷</el-button>
|
<el-button size="medium" type="primary" plain>预览问卷</el-button>
|
||||||
<el-button size="medium" type="primary">保存</el-button>
|
<el-button size="medium" type="primary" @click="upload">保存</el-button>
|
||||||
<el-button size="medium" type="primary">保存并发布</el-button>
|
<el-button size="medium" type="primary">保存并发布</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="bottomheader">
|
<div class="bottomheader">
|
||||||
@ -51,16 +51,17 @@
|
|||||||
<draggable v-model="questionlist">
|
<draggable v-model="questionlist">
|
||||||
<transition-group>
|
<transition-group>
|
||||||
<div class="questionitem" v-for="(item, index) in questionlist" :key="item.id">
|
<div class="questionitem" v-for="(item, index) in questionlist" :key="item.id">
|
||||||
<div v-if="item.questionname == '单选题'" class="item">
|
<div v-if="item.questionname == '单选题'" class="item"
|
||||||
|
@click.stop="selectquestion(item, index)">
|
||||||
<img src="@/assets/system/yidong.png" alt="" class="delicon yidong">
|
<img src="@/assets/system/yidong.png" alt="" class="delicon yidong">
|
||||||
<img src="@/assets/system/gb.png" alt="" class="delicon"
|
<img src="@/assets/system/gb.png" alt="" class="delicon"
|
||||||
@click="delquestion(item, index)">
|
@click.stop="delquestion(item, index)">
|
||||||
<div class="questionname">
|
<div class="questionname">
|
||||||
{{ index + 1 }}. {{ item.questionname }}
|
{{ index + 1 }}. {{ item.questionname }}
|
||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<span>题目: </span>
|
<span>题目: </span>
|
||||||
<el-input placeholder="请输入内容" v-model="item.title" clearable>
|
<el-input placeholder="请输入题目" v-model="item.title" clearable>
|
||||||
</el-input>
|
</el-input>
|
||||||
</div>
|
</div>
|
||||||
<div class="options">
|
<div class="options">
|
||||||
@ -72,25 +73,26 @@
|
|||||||
</el-input>
|
</el-input>
|
||||||
<el-button icon="el-icon-close" type="text"
|
<el-button icon="el-icon-close" type="text"
|
||||||
style="color:red;margin-left:10px"
|
style="color:red;margin-left:10px"
|
||||||
@click="deloption(item, uitem, index, uindex)"></el-button>
|
@click.stop="deloption(item, uitem, index, uindex)"></el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="more">
|
<div class="more">
|
||||||
<el-button size="medium" icon="el-icon-plus" type="text"
|
<el-button size="medium" icon="el-icon-plus" type="text"
|
||||||
@click="addoption(item)">添加选项</el-button>
|
@click.stop="addoption(item)">添加选项</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="item.questionname == '多选题'" class="item">
|
<div v-if="item.questionname == '多选题'" class="item"
|
||||||
|
@click.stop="selectquestion(item, index)">
|
||||||
<img src="@/assets/system/yidong.png" alt="" class="delicon yidong">
|
<img src="@/assets/system/yidong.png" alt="" class="delicon yidong">
|
||||||
<img src="@/assets/system/gb.png" alt="" class="delicon"
|
<img src="@/assets/system/gb.png" alt="" class="delicon"
|
||||||
@click="delquestion(item, index)">
|
@click.stop="delquestion(item, index)">
|
||||||
<div class="questionname">
|
<div class="questionname">
|
||||||
{{ index + 1 }}. {{ item.questionname }}
|
{{ index + 1 }}. {{ item.questionname }}
|
||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<span>题目: </span>
|
<span>题目: </span>
|
||||||
<el-input placeholder="请输入内容" v-model="item.title" clearable>
|
<el-input placeholder="请输入题目" v-model="item.title" clearable>
|
||||||
</el-input>
|
</el-input>
|
||||||
</div>
|
</div>
|
||||||
<div class="options">
|
<div class="options">
|
||||||
@ -102,25 +104,26 @@
|
|||||||
</el-input>
|
</el-input>
|
||||||
<el-button icon="el-icon-close" type="text"
|
<el-button icon="el-icon-close" type="text"
|
||||||
style="color:red;margin-left:10px"
|
style="color:red;margin-left:10px"
|
||||||
@click="deloption(item, uitem, index, uindex)"></el-button>
|
@click.stop="deloption(item, uitem, index, uindex)"></el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="more">
|
<div class="more">
|
||||||
<el-button size="medium" icon="el-icon-plus" type="text"
|
<el-button size="medium" icon="el-icon-plus" type="text"
|
||||||
@click="addoption(item)">添加选项</el-button>
|
@click.stop="addoption(item)">添加选项</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="item.questionname == '填空题'" class="item">
|
<div v-if="item.questionname == '填空题'" class="item"
|
||||||
|
@click.stop="selectquestion(item, index)">
|
||||||
<img src="@/assets/system/yidong.png" alt="" class="delicon yidong">
|
<img src="@/assets/system/yidong.png" alt="" class="delicon yidong">
|
||||||
<img src="@/assets/system/gb.png" alt="" class="delicon"
|
<img src="@/assets/system/gb.png" alt="" class="delicon"
|
||||||
@click="delquestion(item, index)">
|
@click.stop="delquestion(item, index)">
|
||||||
<div class="questionname">
|
<div class="questionname">
|
||||||
{{ index + 1 }}. {{ item.questionname }}
|
{{ index + 1 }}. {{ item.questionname }}
|
||||||
</div>
|
</div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<span>题目: </span>
|
<span>题目: </span>
|
||||||
<el-input placeholder="请输入内容" v-model="item.title" clearable>
|
<el-input placeholder="请输入题目" v-model="item.title" clearable>
|
||||||
</el-input>
|
</el-input>
|
||||||
</div>
|
</div>
|
||||||
<div class="options" style="align-items:center">
|
<div class="options" style="align-items:center">
|
||||||
@ -131,6 +134,241 @@
|
|||||||
<div class="more">
|
<div class="more">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-if="item.questionname == '打分题'" class="item"
|
||||||
|
@click.stop="selectquestion(item, index)">
|
||||||
|
<img src="@/assets/system/yidong.png" alt="" class="delicon yidong">
|
||||||
|
<img src="@/assets/system/gb.png" alt="" class="delicon"
|
||||||
|
@click.stop="delquestion(item, index)">
|
||||||
|
<div class="questionname">
|
||||||
|
{{ index + 1 }}. {{ item.questionname }}
|
||||||
|
</div>
|
||||||
|
<div class="title">
|
||||||
|
<span>题目: </span>
|
||||||
|
<el-input placeholder="请输入题目" v-model="item.title" clearable>
|
||||||
|
</el-input>
|
||||||
|
</div>
|
||||||
|
<div class="options">
|
||||||
|
<span>选项: </span>
|
||||||
|
<div>
|
||||||
|
<el-select v-model="item.optionNumber" placeholder="请选择"
|
||||||
|
@change="selectchange($event, item)" style="padding-left:10px">
|
||||||
|
<el-option v-for="item in optionlist" :key="item.value"
|
||||||
|
:label="item.label" :value="item.value">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="more">
|
||||||
|
<el-radio-group>
|
||||||
|
<el-radio :label="1" disabled v-if="optionNumber > 0">1</el-radio>
|
||||||
|
<el-radio :label="2" disabled v-if="optionNumber > 1">2</el-radio>
|
||||||
|
<el-radio :label="3" disabled v-if="optionNumber > 2">3</el-radio>
|
||||||
|
<el-radio :label="4" disabled v-if="optionNumber > 3">4</el-radio>
|
||||||
|
<el-radio :label="5" disabled v-if="optionNumber > 4">5</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-if="item.questionname == '组合单选题'" class="item">
|
||||||
|
<img src="@/assets/system/yidong.png" alt="" class="delicon yidong">
|
||||||
|
<img src="@/assets/system/gb.png" alt="" class="delicon"
|
||||||
|
@click.stop="delquestion(item, index)">
|
||||||
|
<div class="questionname">
|
||||||
|
{{ index + 1 }}. {{ item.questionname }}
|
||||||
|
</div>
|
||||||
|
<div class="title" style="width:85%">
|
||||||
|
<span>标题: </span>
|
||||||
|
<el-input placeholder="请输入标题" v-model="item.title" clearable>
|
||||||
|
</el-input>
|
||||||
|
</div>
|
||||||
|
<div v-for="(aitem, aindex) in item.list" :key="aitem.id" class="combination"
|
||||||
|
@click.stop="selectquestion(aitem, index, item, aindex)">
|
||||||
|
<div class="questionname" style="padding-top:0">
|
||||||
|
{{ aindex + 1 }}. {{ aitem.questionname }}
|
||||||
|
</div>
|
||||||
|
<div class="title">
|
||||||
|
<span>题目: </span>
|
||||||
|
<el-input placeholder="请输入题目" v-model="aitem.title" clearable>
|
||||||
|
</el-input>
|
||||||
|
</div>
|
||||||
|
<div class="options">
|
||||||
|
<span>选项: </span>
|
||||||
|
<div>
|
||||||
|
<div v-for="(uitem, uindex) in aitem.options" :key="uindex"
|
||||||
|
style="display:flex">
|
||||||
|
<el-input placeholder="请输入内容" v-model="uitem.optionname" clearable>
|
||||||
|
</el-input>
|
||||||
|
<el-button icon="el-icon-close" type="text"
|
||||||
|
style="color:red;margin-left:10px"
|
||||||
|
@click.stop="deloption(aitem, uitem, aindex, uindex)"></el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="more">
|
||||||
|
<el-button size="medium" icon="el-icon-plus" type="text"
|
||||||
|
@click.stop="addoption(aitem)">添加选项</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-if="item.questionname == '组合多选题'" class="item">
|
||||||
|
<img src="@/assets/system/yidong.png" alt="" class="delicon yidong">
|
||||||
|
<img src="@/assets/system/gb.png" alt="" class="delicon"
|
||||||
|
@click.stop="delquestion(item, index)">
|
||||||
|
<div class="questionname">
|
||||||
|
{{ index + 1 }}. {{ item.questionname }}
|
||||||
|
</div>
|
||||||
|
<div class="title" style="width:85%">
|
||||||
|
<span>标题: </span>
|
||||||
|
<el-input placeholder="请输入标题" v-model="item.title" clearable>
|
||||||
|
</el-input>
|
||||||
|
</div>
|
||||||
|
<div v-for="(aitem, aindex) in item.list" :key="aitem.id" class="combination"
|
||||||
|
@click.stop="selectquestion(aitem, index, item, aindex)">
|
||||||
|
<div class="questionname" style="padding-top:0">
|
||||||
|
{{ aindex + 1 }}. {{ aitem.questionname }}
|
||||||
|
</div>
|
||||||
|
<div class="title">
|
||||||
|
<span>题目: </span>
|
||||||
|
<el-input placeholder="请输入题目" v-model="aitem.title" clearable>
|
||||||
|
</el-input>
|
||||||
|
</div>
|
||||||
|
<div class="options">
|
||||||
|
<span>选项: </span>
|
||||||
|
<div>
|
||||||
|
<div v-for="(uitem, uindex) in aitem.options" :key="uindex"
|
||||||
|
style="display:flex">
|
||||||
|
<el-input placeholder="请输入内容" v-model="uitem.optionname" clearable>
|
||||||
|
</el-input>
|
||||||
|
<el-button icon="el-icon-close" type="text"
|
||||||
|
style="color:red;margin-left:10px"
|
||||||
|
@click.stop="deloption(aitem, uitem, aindex, uindex)"></el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="more">
|
||||||
|
<el-button size="medium" icon="el-icon-plus" type="text"
|
||||||
|
@click.stop="addoption(aitem)">添加选项</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-if="item.questionname == '组合填空题'" class="item">
|
||||||
|
<img src="@/assets/system/yidong.png" alt="" class="delicon yidong">
|
||||||
|
<img src="@/assets/system/gb.png" alt="" class="delicon"
|
||||||
|
@click.stop="delquestion(item, index)">
|
||||||
|
<div class="questionname">
|
||||||
|
{{ index + 1 }}. {{ item.questionname }}
|
||||||
|
</div>
|
||||||
|
<div class="title" style="width:85%">
|
||||||
|
<span>标题: </span>
|
||||||
|
<el-input placeholder="请输入标题" v-model="item.title" clearable>
|
||||||
|
</el-input>
|
||||||
|
</div>
|
||||||
|
<div v-for="(aitem, aindex) in item.list" :key="aitem.id" class="combination"
|
||||||
|
@click.stop="selectquestion(aitem, index, item, aindex)">
|
||||||
|
<div class="questionname" style="padding-top:0">
|
||||||
|
{{ aindex + 1 }}. {{ aitem.questionname }}
|
||||||
|
</div>
|
||||||
|
<div class="title">
|
||||||
|
<span>题目: </span>
|
||||||
|
<el-input placeholder="请输入题目" v-model="aitem.title" clearable>
|
||||||
|
</el-input>
|
||||||
|
</div>
|
||||||
|
<div class="options" style="align-items:center">
|
||||||
|
<span>回答: </span>
|
||||||
|
<el-input style="margin:0;width:300px" v-model="aitem.option" disabled
|
||||||
|
placeholder="填写问卷时,用户需要在此输入答案" />
|
||||||
|
</div>
|
||||||
|
<div class="more">
|
||||||
|
<el-button size="medium" icon="el-icon-plus" type="text"
|
||||||
|
@click.stop="addoption(aitem)">添加选项</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-if="item.questionname == '组合打分题'" class="item">
|
||||||
|
<img src="@/assets/system/yidong.png" alt="" class="delicon yidong">
|
||||||
|
<img src="@/assets/system/gb.png" alt="" class="delicon"
|
||||||
|
@click.stop="delquestion(item, index)">
|
||||||
|
<div class="questionname">
|
||||||
|
{{ index + 1 }}. {{ item.questionname }}
|
||||||
|
</div>
|
||||||
|
<div class="title" style="width:85%">
|
||||||
|
<span>标题: </span>
|
||||||
|
<el-input placeholder="请输入标题" v-model="item.title" clearable>
|
||||||
|
</el-input>
|
||||||
|
</div>
|
||||||
|
<div v-for="(aitem, aindex) in item.list" :key="aitem.id" class="combination"
|
||||||
|
@click.stop="selectquestion(aitem, index, item, aindex)">
|
||||||
|
<div class="questionname" style="padding-top:0">
|
||||||
|
{{ aindex + 1 }}. {{ aitem.questionname }}
|
||||||
|
</div>
|
||||||
|
<div class="title">
|
||||||
|
<span>题目: </span>
|
||||||
|
<el-input placeholder="请输入题目" v-model="aitem.title" clearable>
|
||||||
|
</el-input>
|
||||||
|
</div>
|
||||||
|
<div class="options">
|
||||||
|
<span>选项: </span>
|
||||||
|
<div>
|
||||||
|
<el-select v-model="aitem.optionNumber" placeholder="请选择"
|
||||||
|
@change="selectchange($event, aitem)" style="padding-left:10px">
|
||||||
|
<el-option v-for="yitem in optionlist" :key="yitem.value"
|
||||||
|
:label="yitem.label" :value="yitem.value">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="more">
|
||||||
|
<el-radio-group>
|
||||||
|
<el-radio :label="1" disabled v-if="aitem.optionNumber > 0">1</el-radio>
|
||||||
|
<el-radio :label="2" disabled v-if="aitem.optionNumber > 1">2</el-radio>
|
||||||
|
<el-radio :label="3" disabled v-if="aitem.optionNumber > 2">3</el-radio>
|
||||||
|
<el-radio :label="4" disabled v-if="aitem.optionNumber > 3">4</el-radio>
|
||||||
|
<el-radio :label="5" disabled v-if="aitem.optionNumber > 4">5</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-if="item.questionname == '日期填空题'" class="item"
|
||||||
|
@click.stop="selectquestion(item, index)">
|
||||||
|
<img src="@/assets/system/yidong.png" alt="" class="delicon yidong">
|
||||||
|
<img src="@/assets/system/gb.png" alt="" class="delicon"
|
||||||
|
@click.stop="delquestion(item, index)">
|
||||||
|
<div class="questionname">
|
||||||
|
{{ index + 1 }}. {{ item.questionname }}
|
||||||
|
</div>
|
||||||
|
<div class="title">
|
||||||
|
<span>题目: </span>
|
||||||
|
<el-input placeholder="请输入题目" v-model="item.title" clearable>
|
||||||
|
</el-input>
|
||||||
|
</div>
|
||||||
|
<div class="options" style="align-items:center">
|
||||||
|
<span>回答: </span>
|
||||||
|
<el-input style="" v-model="item.option" disabled prefix-icon="el-icon-date"
|
||||||
|
placeholder="填写问卷时,用户在此选择日期" />
|
||||||
|
</div>
|
||||||
|
<div class="more">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-if="item.questionname == '时间填空题'" class="item"
|
||||||
|
@click.stop="selectquestion(item, index)">
|
||||||
|
<img src="@/assets/system/yidong.png" alt="" class="delicon yidong">
|
||||||
|
<img src="@/assets/system/gb.png" alt="" class="delicon"
|
||||||
|
@click.stop="delquestion(item, index)">
|
||||||
|
<div class="questionname">
|
||||||
|
{{ index + 1 }}. {{ item.questionname }}
|
||||||
|
</div>
|
||||||
|
<div class="title">
|
||||||
|
<span>题目: </span>
|
||||||
|
<el-input placeholder="请输入题目" v-model="item.title" clearable>
|
||||||
|
</el-input>
|
||||||
|
</div>
|
||||||
|
<div class="options" style="align-items:center">
|
||||||
|
<span>回答: </span>
|
||||||
|
<el-input style="" v-model="item.option" disabled prefix-icon="el-icon-time"
|
||||||
|
placeholder="填写问卷时,用户在此选择时间" />
|
||||||
|
</div>
|
||||||
|
<div class="more">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</transition-group>
|
</transition-group>
|
||||||
</draggable>
|
</draggable>
|
||||||
@ -140,23 +378,71 @@
|
|||||||
<div class="totalscore-title">
|
<div class="totalscore-title">
|
||||||
总分:0分
|
总分:0分
|
||||||
</div>
|
</div>
|
||||||
<div class="text">计分方式</div>
|
<div class="totalscore-title" style="font-size:14px">
|
||||||
<div class="introduce">根据多少道题平均分数</div>
|
Q{{ questionitem.index + 1 }}
|
||||||
|
<span
|
||||||
|
v-if="questionitem.type == 'danxuans' || questionitem.type == 'duoxuans' || questionitem.type == 'tiankongs' || questionitem.type == 'duoxuans' || questionitem.type == 'dafens'">
|
||||||
|
- {{ questionitem.aindex + 1 }}
|
||||||
|
</span>: 整题分值设置
|
||||||
|
</div>
|
||||||
|
<div class="text">是否计分
|
||||||
|
<el-switch v-model="questionitem.whetherScore" :disabled="questionitem.disabled"
|
||||||
|
@change="changeswitch">
|
||||||
|
</el-switch>
|
||||||
|
</div>
|
||||||
|
<div class="text" style="border:none">计分方式</div>
|
||||||
|
<div class="introduce">
|
||||||
|
<el-select v-model="questionitem.scoringMethod" placeholder="请选择计分方式" clearable style="width:200px"
|
||||||
|
disabled>
|
||||||
|
<el-option v-for="dict in dict.type.scoring_method" :key="dict.value" :label="dict.label"
|
||||||
|
:value="dict.value" />
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
<div v-if="questionitem.scoringMethod == 'NOT_UNIQUE_ANSWER' && questionitem.whetherScore">
|
||||||
|
<div class="text" style="border:none">各选项分值
|
||||||
|
</div>
|
||||||
|
<div v-for="item in questionitem.options" :key="item.optionid" class="optionitem">
|
||||||
|
<div class="optionname">
|
||||||
|
{{ item.optionname }}
|
||||||
|
</div>
|
||||||
|
<el-input-number v-model="item.optionScore" :min="0" :max="100"
|
||||||
|
:controls="false"></el-input-number>
|
||||||
|
<span style="padding-left:10px">
|
||||||
|
分
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-if="questionitem.scoringMethod == 'UNIQUE_ANSWER' && questionitem.whetherScore">
|
||||||
|
<div class="text" style="border:none">本题答案及答案分值
|
||||||
|
</div>
|
||||||
|
<div v-for="item in questionitem.options" :key="item.optionid" class="optionitem">
|
||||||
|
<div class="optionname">
|
||||||
|
<el-checkbox v-model="item.checked" :label="item.optionname"></el-checkbox>
|
||||||
|
</div>
|
||||||
|
<el-input-number v-model="item.optionScore" :min="0" :max="100" :controls="false"
|
||||||
|
:disabled="!item.checked"></el-input-number>
|
||||||
|
<span style="padding-left:10px">
|
||||||
|
分
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import draggable from 'vuedraggable'
|
import draggable from 'vuedraggable'
|
||||||
export default {
|
export default {
|
||||||
name: "addQuestionnaire",
|
name: "addQuestionnaire",
|
||||||
|
dicts: ['scoring_method'],
|
||||||
components: {
|
components: {
|
||||||
draggable
|
draggable
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
id: 99999999999,
|
||||||
|
optionid: 99,
|
||||||
otherQuestiontypes: [
|
otherQuestiontypes: [
|
||||||
{
|
{
|
||||||
id: 'riqi',
|
id: 'riqi',
|
||||||
@ -213,8 +499,29 @@ export default {
|
|||||||
src: require('@/assets/system/dafen.png')
|
src: require('@/assets/system/dafen.png')
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
//题目arr
|
||||||
questionlist: [],
|
questionlist: [],
|
||||||
id: 99999999999,
|
//打分题选项
|
||||||
|
optionlist: [{
|
||||||
|
value: 2,
|
||||||
|
label: '2'
|
||||||
|
}, {
|
||||||
|
value: 3,
|
||||||
|
label: '3'
|
||||||
|
}, {
|
||||||
|
value: 4,
|
||||||
|
label: '4'
|
||||||
|
}, {
|
||||||
|
value: 5,
|
||||||
|
label: '5'
|
||||||
|
}],
|
||||||
|
//选择的题目list
|
||||||
|
questionitem: {
|
||||||
|
scoringMethod: '',
|
||||||
|
whetherScore: false,
|
||||||
|
disabled: true,
|
||||||
|
index: -1,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -223,12 +530,12 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
addquestion(item) {
|
addquestion(item) {
|
||||||
|
this.id++
|
||||||
if (this.questionlist.length > 0) {
|
if (this.questionlist.length > 0) {
|
||||||
if (this.questionlist[this.questionlist.length - 1].title == '') {
|
if (this.questionlist[this.questionlist.length - 1].title == '') {
|
||||||
return this.$message.error('请填写完在继续添加');
|
return this.$message.error('请填写完在继续添加');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.id++
|
|
||||||
if (item.id == 'danxuan') {
|
if (item.id == 'danxuan') {
|
||||||
this.questionlist.push({
|
this.questionlist.push({
|
||||||
type: 'danxuan',
|
type: 'danxuan',
|
||||||
@ -236,10 +543,19 @@ export default {
|
|||||||
questionname: '单选题',
|
questionname: '单选题',
|
||||||
title: '',
|
title: '',
|
||||||
options: [{
|
options: [{
|
||||||
|
optionid: ++this.optionid,
|
||||||
optionname: '',
|
optionname: '',
|
||||||
|
optionScore: 0,
|
||||||
}, {
|
}, {
|
||||||
|
optionid: ++this.optionid,
|
||||||
optionname: '',
|
optionname: '',
|
||||||
}]
|
optionScore: 0,
|
||||||
|
}],
|
||||||
|
//是否计分
|
||||||
|
whetherScore: false,
|
||||||
|
disabled: false,
|
||||||
|
//计分方式
|
||||||
|
scoringMethod: '',
|
||||||
})
|
})
|
||||||
} else if (item.id == 'duoxuan') {
|
} else if (item.id == 'duoxuan') {
|
||||||
this.questionlist.push({
|
this.questionlist.push({
|
||||||
@ -248,10 +564,21 @@ export default {
|
|||||||
questionname: '多选题',
|
questionname: '多选题',
|
||||||
title: '',
|
title: '',
|
||||||
options: [{
|
options: [{
|
||||||
|
optionid: ++this.optionid,
|
||||||
optionname: '',
|
optionname: '',
|
||||||
|
optionScore: 0,
|
||||||
|
checked: false,
|
||||||
}, {
|
}, {
|
||||||
|
optionid: ++this.optionid,
|
||||||
|
optionScore: 0,
|
||||||
optionname: '',
|
optionname: '',
|
||||||
}]
|
checked: false,
|
||||||
|
}],
|
||||||
|
//是否计分
|
||||||
|
whetherScore: false,
|
||||||
|
disabled: false,
|
||||||
|
//计分方式
|
||||||
|
scoringMethod: '',
|
||||||
})
|
})
|
||||||
} else if (item.id == 'tiankong') {
|
} else if (item.id == 'tiankong') {
|
||||||
this.questionlist.push({
|
this.questionlist.push({
|
||||||
@ -260,17 +587,258 @@ export default {
|
|||||||
questionname: '填空题',
|
questionname: '填空题',
|
||||||
title: '',
|
title: '',
|
||||||
option: '',
|
option: '',
|
||||||
|
//是否计分
|
||||||
|
whetherScore: false,
|
||||||
|
disabled: true,
|
||||||
|
})
|
||||||
|
} else if (item.id == 'dafen') {
|
||||||
|
this.questionlist.push({
|
||||||
|
type: 'dafen',
|
||||||
|
optionNumber: undefined,
|
||||||
|
id: this.id,
|
||||||
|
questionname: '打分题',
|
||||||
|
title: '',
|
||||||
|
//是否计分
|
||||||
|
whetherScore: false,
|
||||||
|
disabled: false,
|
||||||
|
//计分方式
|
||||||
|
scoringMethod: '',
|
||||||
|
options: [],
|
||||||
|
})
|
||||||
|
} else if (item.id == 'danxuans') {
|
||||||
|
this.questionlist.push({
|
||||||
|
title: '',
|
||||||
|
questionname: '组合单选题',
|
||||||
|
type: 'danxuans',
|
||||||
|
id: this.id++,
|
||||||
|
list: [
|
||||||
|
{
|
||||||
|
type: 'danxuans',
|
||||||
|
id: this.id++,
|
||||||
|
questionname: '单选题',
|
||||||
|
title: '',
|
||||||
|
options: [{
|
||||||
|
optionid: ++this.optionid,
|
||||||
|
optionname: '',
|
||||||
|
optionScore: 0,
|
||||||
|
}, {
|
||||||
|
optionid: ++this.optionid,
|
||||||
|
optionname: '',
|
||||||
|
optionScore: 0,
|
||||||
|
}],
|
||||||
|
//是否计分
|
||||||
|
whetherScore: false,
|
||||||
|
disabled: false,
|
||||||
|
//计分方式
|
||||||
|
scoringMethod: '',
|
||||||
|
}, {
|
||||||
|
type: 'danxuans',
|
||||||
|
id: this.id++,
|
||||||
|
questionname: '单选题',
|
||||||
|
title: '',
|
||||||
|
options: [{
|
||||||
|
optionid: ++this.optionid,
|
||||||
|
optionname: '',
|
||||||
|
optionScore: 0,
|
||||||
|
}, {
|
||||||
|
optionid: ++this.optionid,
|
||||||
|
optionname: '',
|
||||||
|
optionScore: 0,
|
||||||
|
}],
|
||||||
|
//是否计分
|
||||||
|
whetherScore: false,
|
||||||
|
disabled: false,
|
||||||
|
//计分方式
|
||||||
|
scoringMethod: '',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
})
|
||||||
|
} else if (item.id == 'duoxuans') {
|
||||||
|
this.questionlist.push({
|
||||||
|
title: '',
|
||||||
|
questionname: '组合多选题',
|
||||||
|
type: 'duoxuans',
|
||||||
|
id: this.id++,
|
||||||
|
list: [
|
||||||
|
{
|
||||||
|
type: 'duoxuans',
|
||||||
|
id: this.id++,
|
||||||
|
questionname: '多选题',
|
||||||
|
title: '',
|
||||||
|
options: [{
|
||||||
|
optionid: ++this.optionid,
|
||||||
|
optionname: '',
|
||||||
|
optionScore: 0,
|
||||||
|
checked: false,
|
||||||
|
}, {
|
||||||
|
optionid: ++this.optionid,
|
||||||
|
optionScore: 0,
|
||||||
|
optionname: '',
|
||||||
|
checked: false,
|
||||||
|
}],
|
||||||
|
//是否计分
|
||||||
|
whetherScore: false,
|
||||||
|
disabled: false,
|
||||||
|
//计分方式
|
||||||
|
scoringMethod: '',
|
||||||
|
}, {
|
||||||
|
type: 'duoxuans',
|
||||||
|
id: this.id++,
|
||||||
|
questionname: '多选题',
|
||||||
|
title: '',
|
||||||
|
options: [{
|
||||||
|
optionid: ++this.optionid,
|
||||||
|
optionname: '',
|
||||||
|
optionScore: 0,
|
||||||
|
checked: false,
|
||||||
|
}, {
|
||||||
|
optionid: ++this.optionid,
|
||||||
|
optionScore: 0,
|
||||||
|
optionname: '',
|
||||||
|
checked: false,
|
||||||
|
}],
|
||||||
|
//是否计分
|
||||||
|
whetherScore: false,
|
||||||
|
disabled: false,
|
||||||
|
//计分方式
|
||||||
|
scoringMethod: '',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
})
|
||||||
|
} else if (item.id == 'tiankongs') {
|
||||||
|
this.questionlist.push({
|
||||||
|
title: '',
|
||||||
|
questionname: '组合填空题',
|
||||||
|
type: 'tiankongs',
|
||||||
|
id: this.id++,
|
||||||
|
list: [
|
||||||
|
{
|
||||||
|
type: 'tiankongs',
|
||||||
|
id: this.id++,
|
||||||
|
questionname: '填空题',
|
||||||
|
title: '',
|
||||||
|
option: '',
|
||||||
|
//是否计分
|
||||||
|
whetherScore: false,
|
||||||
|
disabled: true,
|
||||||
|
}, {
|
||||||
|
type: 'tiankongs',
|
||||||
|
id: this.id++,
|
||||||
|
questionname: '填空题',
|
||||||
|
title: '',
|
||||||
|
option: '',
|
||||||
|
//是否计分
|
||||||
|
whetherScore: false,
|
||||||
|
disabled: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
})
|
||||||
|
} else if (item.id == 'dafens') {
|
||||||
|
this.questionlist.push({
|
||||||
|
title: '',
|
||||||
|
questionname: '组合打分题',
|
||||||
|
type: 'dafens',
|
||||||
|
id: this.id++,
|
||||||
|
list: [
|
||||||
|
{
|
||||||
|
type: 'dafens',
|
||||||
|
id: this.id++,
|
||||||
|
questionname: '打分题',
|
||||||
|
optionNumber: undefined,
|
||||||
|
title: '',
|
||||||
|
//是否计分
|
||||||
|
whetherScore: false,
|
||||||
|
disabled: false,
|
||||||
|
//计分方式
|
||||||
|
scoringMethod: '',
|
||||||
|
options: [],
|
||||||
|
}, {
|
||||||
|
type: 'dafens',
|
||||||
|
id: this.id++,
|
||||||
|
optionNumber: undefined,
|
||||||
|
questionname: '打分题',
|
||||||
|
title: '',
|
||||||
|
//是否计分
|
||||||
|
whetherScore: false,
|
||||||
|
disabled: false,
|
||||||
|
//计分方式
|
||||||
|
scoringMethod: '',
|
||||||
|
options: [],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
})
|
||||||
|
} else if (item.id == 'riqi') {
|
||||||
|
this.questionlist.push({
|
||||||
|
type: 'riqi',
|
||||||
|
id: this.id++,
|
||||||
|
questionname: '日期填空题',
|
||||||
|
title: '',
|
||||||
|
option: '',
|
||||||
|
//是否计分
|
||||||
|
whetherScore: false,
|
||||||
|
disabled: true,
|
||||||
|
})
|
||||||
|
} else if (item.id == 'shijian') {
|
||||||
|
this.questionlist.push({
|
||||||
|
type: 'shijian',
|
||||||
|
id: this.id++,
|
||||||
|
questionname: '时间填空题',
|
||||||
|
title: '',
|
||||||
|
option: '',
|
||||||
|
//是否计分
|
||||||
|
whetherScore: false,
|
||||||
|
disabled: true,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if (this.questionlist.length == 1) {
|
||||||
|
this.questionitem = this.questionlist[0]
|
||||||
|
this.questionitem.index = 0
|
||||||
|
if (item.id == 'danxuans' || item.id == 'duoxuans' || item.id == 'tiankongs' || item.id == 'dafens') {
|
||||||
|
this.questionitem = this.questionlist[0].list[0]
|
||||||
|
this.questionitem.index = 0
|
||||||
|
this.questionitem.aindex = 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
selectquestion(item, index, topitem, aindex) {
|
||||||
|
this.questionitem = item
|
||||||
|
this.questionitem.index = index
|
||||||
|
if (this.questionitem.type == 'danxuans' || this.questionitem.type == 'duoxuans' || this.questionitem.type == 'tiankongs' || this.questionitem.type == 'dafens') {
|
||||||
|
this.questionitem.aindex = aindex
|
||||||
|
}
|
||||||
|
},
|
||||||
|
delquestion(item, index) {
|
||||||
|
if (this.questionlist.length == 1) {
|
||||||
|
this.$message.error('请保留一条题目!');
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (this.questionitem.id == this.questionlist[index].id) {
|
||||||
|
this.questionlist.splice(index, 1)
|
||||||
|
let index = 0
|
||||||
|
this.questionlist.forEach(e => {
|
||||||
|
e.index = index++
|
||||||
|
})
|
||||||
|
this.questionitem = this.questionlist[0]
|
||||||
|
this.questionitem.index = 0
|
||||||
|
} else {
|
||||||
|
this.questionlist.splice(index, 1)
|
||||||
|
let index = 0
|
||||||
|
this.questionlist.forEach(e => {
|
||||||
|
e.index = index++
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
addoption(item) {
|
addoption(item) {
|
||||||
|
if (item.options.length == 6) {
|
||||||
|
return this.$message.error('多选最多为六个选项!');
|
||||||
|
}
|
||||||
item.options.push({
|
item.options.push({
|
||||||
|
optionid: ++this.optionid,
|
||||||
optionname: '',
|
optionname: '',
|
||||||
|
optionScore: 0,
|
||||||
|
checked: false,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
delquestion(item, index) {
|
|
||||||
this.questionlist.splice(index, 1)
|
|
||||||
},
|
|
||||||
deloption(item, uitem, index, uindex) {
|
deloption(item, uitem, index, uindex) {
|
||||||
if (item.options.length > 2) {
|
if (item.options.length > 2) {
|
||||||
item.options.splice(uindex, 1)
|
item.options.splice(uindex, 1)
|
||||||
@ -278,6 +846,32 @@ export default {
|
|||||||
this.$message.error('最少保留两条选项!');
|
this.$message.error('最少保留两条选项!');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
changeswitch(e) {
|
||||||
|
if (e) {
|
||||||
|
if (this.questionitem.type == 'danxuan' || this.questionitem.type == 'dafen' || this.questionitem.type == 'dafens' || this.questionitem.type == 'danxuans') {
|
||||||
|
this.questionitem.scoringMethod = 'NOT_UNIQUE_ANSWER'
|
||||||
|
} else if (this.questionitem.type == 'duoxuan' || this.questionitem.type == 'duoxuans') {
|
||||||
|
this.questionitem.scoringMethod = 'UNIQUE_ANSWER'
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.questionitem.scoringMethod = ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
selectchange(e, item) {
|
||||||
|
item.options = []
|
||||||
|
for (var i = 0; i < e; i++) {
|
||||||
|
item.options.push({
|
||||||
|
optionid: ++this.optionid,
|
||||||
|
optionname: i + 1,
|
||||||
|
optionScore: 0,
|
||||||
|
checked: false,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//保存
|
||||||
|
upload() {
|
||||||
|
console.log(this.questionlist)
|
||||||
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
@ -321,6 +915,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.questionitem {
|
.questionitem {
|
||||||
|
padding-bottom: 1px;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
margin: 40px auto;
|
margin: 40px auto;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
@ -328,6 +923,14 @@ export default {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 20px auto;
|
margin: 20px auto;
|
||||||
|
|
||||||
|
.combination {
|
||||||
|
border-radius: 5px;
|
||||||
|
padding-top: 25px;
|
||||||
|
width: 90%;
|
||||||
|
margin: 30px auto;
|
||||||
|
box-shadow: 0 0px 6px 3px rgba(162, 162, 162, 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
.more {
|
.more {
|
||||||
display: flex;
|
display: flex;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
@ -348,17 +951,19 @@ export default {
|
|||||||
span {
|
span {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 60px;
|
width: 60px;
|
||||||
|
line-height: 35px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-input {
|
.el-input {
|
||||||
padding-left: 10px;
|
margin-left: 10px !important;
|
||||||
display: block;
|
display: block;
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
width: 400px;
|
|
||||||
height: 30px;
|
height: 30px;
|
||||||
line-height: 30px;
|
line-height: 30px;
|
||||||
margin-bottom: 14px;
|
margin-bottom: 14px;
|
||||||
|
margin: 0;
|
||||||
|
width: 300px
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -388,10 +993,33 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.totalScore {
|
.totalScore {
|
||||||
width: calc(20% - 30px);
|
width: 20%;
|
||||||
margin-left: 30px;
|
margin-left: 20px;
|
||||||
height: 790px;
|
height: 790px;
|
||||||
background: #FFFFFF;
|
background: #FFFFFF;
|
||||||
|
overflow: scroll;
|
||||||
|
overflow-x: hidden !important;
|
||||||
|
|
||||||
|
.optionitem {
|
||||||
|
width: 80%;
|
||||||
|
height: 36px;
|
||||||
|
margin: 20px auto;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
font-size: 14px;
|
||||||
|
|
||||||
|
.optionname {
|
||||||
|
width: 50%;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .el-input-number {
|
||||||
|
width: 56px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.text {
|
.text {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
@ -399,6 +1027,8 @@ export default {
|
|||||||
line-height: 30px;
|
line-height: 30px;
|
||||||
width: calc(100% - 60px);
|
width: calc(100% - 60px);
|
||||||
margin: 20px auto 0;
|
margin: 20px auto 0;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
border-bottom: 1px solid #E2E2E2;
|
||||||
}
|
}
|
||||||
|
|
||||||
.introduce {
|
.introduce {
|
||||||
@ -407,6 +1037,7 @@ export default {
|
|||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #999999;
|
color: #999999;
|
||||||
line-height: 30px;
|
line-height: 30px;
|
||||||
|
padding-bottom: 10px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
border-bottom: 1px solid #E2E2E2;
|
border-bottom: 1px solid #E2E2E2;
|
||||||
}
|
}
|
||||||
@ -421,7 +1052,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.questionnairedetails {
|
.questionnairedetails {
|
||||||
padding-left: 60px;
|
padding-left: 30px;
|
||||||
width: calc(60% - 30px);
|
width: calc(60% - 30px);
|
||||||
overflow: scroll;
|
overflow: scroll;
|
||||||
overflow-x: hidden !important;
|
overflow-x: hidden !important;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user