| | |
| | | <template> |
| | | <div>话术库</div> |
| | | <div class="Questionnairemanagement"> |
| | | <!-- 左侧栏 --> |
| | | <div class="sidecolumn"> |
| | | <div class="sidecolumn-top"> |
| | | <div class="top-wj">话术类型</div> |
| | | <div class="top-tj" @click="dialogFormVisible = true">+添加</div> |
| | | </div> |
| | | <div class="center-ss"> |
| | | <el-input |
| | | placeholder="请输入内容" |
| | | v-model="sidecolumnval" |
| | | class="input-with-select" |
| | | size="medium " |
| | | > |
| | | <el-button |
| | | @click="sidecolumnss" |
| | | slot="append" |
| | | icon="el-icon-search" |
| | | ></el-button> |
| | | </el-input> |
| | | </div> |
| | | <div class="bottom-fl"> |
| | | <el-tabs tab-position="right"> |
| | | <el-tab-pane :label="`全部 (${numberlb})`"></el-tab-pane> |
| | | <el-tab-pane |
| | | class="tab-paness" |
| | | :key="item.title" |
| | | v-for="(item, index) in editableTabs" |
| | | > |
| | | <span slot="label"> |
| | | {{ |
| | | item.title + " (" + item.number + ")" |
| | | }}   <el-popover |
| | | placement="top-start" |
| | | width="100" |
| | | trigger="hover" |
| | | > |
| | | <div style="text-align: center"> |
| | | <el-button type="text" @click="popoveramend(item)" |
| | | >修改</el-button |
| | | ><el-button type="text" @click="deletefenlei(item)" |
| | | ><span style="color: rgb(173, 55, 55)" |
| | | >删除</span |
| | | ></el-button |
| | | > |
| | | </div> |
| | | <i slot="reference" class="el-icon-share"></i> </el-popover |
| | | ></span> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </div> |
| | | </div> |
| | | <!-- 右侧数据 --> |
| | | <div class="leftvlue"> |
| | | <div class="leftvlue-top"> |
| | | <el-tabs v-model="topactiveName" @tab-click="tophandleClick"> |
| | | <el-tab-pane name="Local"> |
| | | <span class="mulsz" slot="label">普通话术库 </span> |
| | | </el-tab-pane> |
| | | <el-tab-pane name="sharing"> |
| | | <span class="mulsz" slot="label">特定话术库 </span> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </div> |
| | | <div class="leftvlue-bg"> |
| | | <el-row :gutter="20"> |
| | | <!--用户数据--> |
| | | <el-col :span="24" :xs="24"> |
| | | <el-form |
| | | :model="queryParams" |
| | | ref="queryForm" |
| | | size="small" |
| | | :inline="true" |
| | | v-show="showSearch" |
| | | label-width="98px" |
| | | > |
| | | <el-form-item label="话术主旨" prop="userName"> |
| | | <el-input |
| | | v-model="queryParams.userName" |
| | | placeholder="请输入" |
| | | clearable |
| | | style="width: 200px" |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="关联指标" prop="userName"> |
| | | <el-input |
| | | v-model="queryParams.userName" |
| | | placeholder="请输入" |
| | | clearable |
| | | style="width: 200px" |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="语言" prop="status"> |
| | | <el-select v-model="queryParams.status" placeholder="请选择"> |
| | | <el-option |
| | | v-for="item in languagelist" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="是否启用" prop="status"> |
| | | <el-select v-model="queryParams.status" placeholder="请选择"> |
| | | <el-option |
| | | v-for="item in qyoptions" |
| | | :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="medium" |
| | | @click="handleQuery" |
| | | >搜索</el-button |
| | | > |
| | | <el-button |
| | | icon="el-icon-refresh" |
| | | size="medium" |
| | | @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="medium" |
| | | @click="handleAdd" |
| | | v-hasPermi="['system:user:add']" |
| | | >新增</el-button |
| | | > |
| | | </el-col> |
| | | |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="danger" |
| | | plain |
| | | icon="el-icon-delete" |
| | | size="medium" |
| | | :disabled="multiple" |
| | | @click="handleDelete" |
| | | v-hasPermi="['system:user:remove']" |
| | | >删除</el-button |
| | | > |
| | | </el-col> |
| | | |
| | | <!-- <el-col :span="1.5"> </el-col> --> |
| | | </el-row> |
| | | <el-table |
| | | v-loading="loading" |
| | | :data="userList" |
| | | :border="true" |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column type="selection" width="50" align="center" /> |
| | | <el-table-column |
| | | label="序号" |
| | | align="center" |
| | | key="userId" |
| | | prop="userId" |
| | | /> |
| | | <el-table-column |
| | | label="主旨" |
| | | align="center" |
| | | key="userName" |
| | | prop="userName" |
| | | :show-overflow-tooltip="true" |
| | | /> |
| | | <el-table-column |
| | | label="问题文本" |
| | | align="center" |
| | | key="nickName" |
| | | prop="nickName" |
| | | width="400" |
| | | :show-overflow-tooltip="true" |
| | | /> |
| | | |
| | | <el-table-column |
| | | label="问题语音" |
| | | align="center" |
| | | key="aphonenumber" |
| | | prop="aphonenumber" |
| | | width="400" |
| | | /><el-table-column |
| | | label="关联指标" |
| | | align="center" |
| | | key="bphonenumber" |
| | | prop="bphonenumber" |
| | | width="120" |
| | | /> |
| | | <el-table-column |
| | | label="指标选项" |
| | | align="center" |
| | | key="bphonenumber" |
| | | prop="bphonenumber" |
| | | width="120" |
| | | /> |
| | | <el-table-column |
| | | label="语言" |
| | | align="center" |
| | | key="indicator" |
| | | prop="indicator" |
| | | width="120" |
| | | /> |
| | | <el-table-column label="是否启用" align="center" key="status"> |
| | | <template slot-scope="scope"> |
| | | <el-switch |
| | | v-model="scope.row.status" |
| | | active-value="0" |
| | | inactive-value="1" |
| | | @change="handleStatusChange(scope.row)" |
| | | ></el-switch> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column |
| | | label="操作" |
| | | align="center" |
| | | width="200" |
| | | class-name="small-padding fixed-width" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="medium" |
| | | type="text" |
| | | @click="handleUpdate(scope.row)" |
| | | v-hasPermi="['system:user:edit']" |
| | | ><span class="button-textxg" |
| | | ><i class="el-icon-edit-outline"></i>修改</span |
| | | ></el-button |
| | | > |
| | | <el-button |
| | | size="medium" |
| | | type="text" |
| | | @click="compileUpdate(scope.row)" |
| | | v-hasPermi="['system:user:edit']" |
| | | ><span class="button-bji" |
| | | ><i class="el-icon-edit"></i>编辑话术</span |
| | | ></el-button |
| | | > |
| | | <el-button |
| | | size="medium" |
| | | type="text" |
| | | @click="handleDelete(scope.row)" |
| | | v-hasPermi="['system:user:remove']" |
| | | ><span class="button-textsc" |
| | | ><i class="el-icon-delete-solid"></i>删除</span |
| | | ></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="indexopen" |
| | | width="900px" |
| | | append-to-body |
| | | > |
| | | <el-form |
| | | ref="form" |
| | | :model="indexform" |
| | | :rules="rules" |
| | | label-width="100px" |
| | | > |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="语言" prop="deptId"> |
| | | <el-select |
| | | v-model="indexform.language" |
| | | placeholder="请选择语言" |
| | | > |
| | | <el-option |
| | | v-for="index in languagelist" |
| | | :key="index.value" |
| | | :label="index.label" |
| | | :value="index.value" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="话术主旨" prop="nickName"> |
| | | <el-input |
| | | v-model="indexform.nickName" |
| | | placeholder="请输入话术主旨" |
| | | maxlength="80" |
| | | /> |
| | | </el-form-item> </el-col |
| | | ></el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <div |
| | | style="display: flex; margin-left: 100px; margin-bottom: 10px" |
| | | > |
| | | <div class="tsgname" @click="tsgnameto()">医院名称</div> |
| | | <div class="tsgname" @click="tsgnameto()">医院电话</div> |
| | | <div class="tsgname" @click="tsgnameto()">医院姓名</div> |
| | | <div class="tsgname" @click="tsgnameto()">随访姓名</div> |
| | | <div class="tsgname" @click="tsgnameto()">随访电话</div> |
| | | <div class="tsgname" @click="tsgnameto()">性别</div> |
| | | <div class="tsgname" @click="tsgnameto()">年龄</div> |
| | | <div class="tsgname" @click="tsgnameto()">地址</div> |
| | | </div> |
| | | </el-col></el-row |
| | | > |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="话术文本" prop="verbaltricktext"> |
| | | <el-input v-model="indexform.userName" maxlength="30" /> |
| | | </el-form-item> </el-col |
| | | ></el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="话术语音" prop="verbaltrickyy"> |
| | | <el-input v-model="indexform.userName" maxlength="30" /> |
| | | </el-form-item> </el-col |
| | | ></el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="无匹配文本" prop="matchtext"> |
| | | <el-input v-model="indexform.userName" maxlength="30" /> |
| | | </el-form-item> </el-col |
| | | ></el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="无匹配语音" prop="matchyy"> |
| | | <el-input v-model="indexform.userName" maxlength="30" /> |
| | | </el-form-item> </el-col |
| | | ></el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="无声文本" prop="silenttext"> |
| | | <el-input v-model="indexform.userName" maxlength="30" /> |
| | | </el-form-item> </el-col |
| | | ></el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="无声语音" prop="silentyy"> |
| | | <el-input v-model="indexform.userName" maxlength="30" /> |
| | | </el-form-item> </el-col |
| | | ></el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="通用库文本" prop="librarytext"> |
| | | <el-input v-model="indexform.userName" maxlength="30" /> |
| | | </el-form-item> </el-col |
| | | ></el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="通用库语音" prop="libraryy"> |
| | | <el-input v-model="indexform.userName" maxlength="30" /> |
| | | </el-form-item> </el-col |
| | | ></el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="听不清文本" prop="vaguetext"> |
| | | <el-input v-model="indexform.userName" maxlength="30" /> |
| | | </el-form-item> </el-col |
| | | ></el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="听不清语音" prop="vagueyy"> |
| | | <el-input v-model="indexform.userName" maxlength="30" /> |
| | | </el-form-item> </el-col |
| | | ></el-row> |
| | | |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="话术规则" prop="email"> |
| | | <el-input |
| | | v-model="indexform.remark" |
| | | type="textarea" |
| | | placeholder="请输入内容" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="是否启用"> |
| | | <el-radio-group v-model="indexform.qystatus"> |
| | | <el-radio |
| | | v-for="item in qyoptions" |
| | | :key="item.value" |
| | | :label="item.value" |
| | | >{{ item.label }}</el-radio |
| | | > |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="备注"> |
| | | <el-input |
| | | v-model="indexform.remark" |
| | | type="textarea" |
| | | placeholder="请输入内容" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="submitForm">确 定</el-button> |
| | | <el-button @click="cancel">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </div> |
| | | <!-- 添加类别弹框 --> |
| | | <el-dialog |
| | | :title="amendtag ? '修改类别' : '新增类别'" |
| | | width="30%" |
| | | :visible.sync="dialogFormVisible" |
| | | > |
| | | <el-form :model="classifyform"> |
| | | <el-form-item |
| | | :label="amendtag ? '请输入新的类别名称' : '请输入类别名称'" |
| | | > |
| | | <el-input |
| | | v-model="classifyform.categoryname" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogFormVisible = false">取 消</el-button> |
| | | <el-button type="primary" @click="submitsidecolumn">确 定</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | <!-- 删除类别确认框 --> |
| | | <el-dialog title="警告" :visible.sync="deleteVisible" width="40%"> |
| | | <div style="font-size: 20px; color: rgb(247, 76, 76)"> |
| | | 是否确认删除分类:[<span>{{ deletefenl }}</span |
| | | >]? |
| | | </div> |
| | | <div style="font-size: 20px"> |
| | | 此操作会将该类别下所有模块转移至[未分类],是否继续删除此分类? |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="deleteVisible = false">取 消</el-button> |
| | | <el-button type="primary" @click="deletefenlei">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | listUser, |
| | | getUser, |
| | | delUser, |
| | | addUser, |
| | | updateUser, |
| | | } from "@/api/system/user"; |
| | | import { getToken } from "@/utils/auth"; |
| | | import Treeselect from "@riophae/vue-treeselect"; |
| | | import "@riophae/vue-treeselect/dist/vue-treeselect.css"; |
| | | export default { |
| | | name: "questionnaire", |
| | | dicts: ["sys_normal_disable", "sys_user_sex"], |
| | | components: { Treeselect }, |
| | | data() { |
| | | return {}; |
| | | return { |
| | | topactiveName: "Local", //顶部选择 |
| | | // 遮罩层 |
| | | loading: false, |
| | | // 选中数组 |
| | | ids: [], |
| | | // 非单个禁用 |
| | | single: true, |
| | | // 非多个禁用 |
| | | multiple: true, |
| | | // 显示搜索条件 |
| | | showSearch: true, |
| | | // 总条数 |
| | | total: 0, |
| | | namequestionnaire: "", |
| | | haoquestionnaire: "", |
| | | idds: "", |
| | | amendtag: false, //是否修改类别 |
| | | dialogFormVisible: false, //修改添加类别弹框 |
| | | deleteVisible: false, //分类删除弹框 |
| | | deletefenl: "高血压", //删除项 |
| | | classifyform: { |
| | | categoryname: "", |
| | | }, //类别表单 |
| | | // 表格数据 |
| | | userList: [ |
| | | { |
| | | userid: 1, |
| | | userName: "血常规、尿常规", |
| | | nickName: "贫血", |
| | | aphonenumber: "(?!不.*|没.*|未.*)^.*([贫平凭血]|贫血|评学|评学),10", |
| | | bphonenumber: "选择", |
| | | cphonenumber: "普通话", |
| | | status: "0", |
| | | }, |
| | | ], |
| | | // 弹出层标题 |
| | | title: "", |
| | | // 是否显示弹出层 |
| | | open: false, |
| | | // 日期范围 |
| | | dateRange: [], |
| | | // 岗位选项 |
| | | postOptions: [], |
| | | // 角色选项 |
| | | roleOptions: [], |
| | | // 添加、修改参数 |
| | | indexform: {}, |
| | | numberlb: 22, |
| | | numberlbs: 2, |
| | | sidecolumnform: {}, //添加类别表单 |
| | | dialogFormVisible: false, //添加类别弹框 |
| | | sidecolumnval: "", //类别搜索 |
| | | indexopen: false, //弹框展示否 |
| | | propss: { multiple: true }, |
| | | languagelist: [ |
| | | { |
| | | value: 1, |
| | | label: "普通话", |
| | | }, |
| | | { |
| | | value: 2, |
| | | label: "粤语", |
| | | }, |
| | | { |
| | | value: 3, |
| | | label: "英语", |
| | | }, |
| | | ], //语言列表 |
| | | qyoptions: [ |
| | | { |
| | | value: 1, |
| | | label: "启用", |
| | | }, |
| | | { |
| | | value: 2, |
| | | label: "关闭", |
| | | }, |
| | | ], |
| | | //类别列表 |
| | | editableTabs: [ |
| | | { |
| | | title: "话术分类一", |
| | | number: "1", |
| | | }, |
| | | { |
| | | title: "话术分类二", |
| | | number: "2", |
| | | }, |
| | | { |
| | | title: "话术分类三", |
| | | number: "2", |
| | | }, |
| | | { |
| | | title: "话术分类四", |
| | | number: "2", |
| | | }, |
| | | { |
| | | title: "话术分类五", |
| | | number: "2", |
| | | }, |
| | | ], |
| | | // 查询参数 |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | userName: undefined, |
| | | phonenumber: undefined, |
| | | status: undefined, |
| | | deptId: undefined, |
| | | IDnumber: undefined, |
| | | }, |
| | | // 表单校验 |
| | | rules: { |
| | | userName: [ |
| | | { required: true, message: "主旨不能为空", trigger: "blur" }, |
| | | { |
| | | min: 2, |
| | | max: 20, |
| | | message: "用户名称长度必须介于 2 和 20 之间", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | nickName: [ |
| | | { required: true, message: "用户昵称不能为空", trigger: "blur" }, |
| | | ], |
| | | password: [ |
| | | { required: true, message: "用户密码不能为空", trigger: "blur" }, |
| | | { |
| | | min: 5, |
| | | max: 20, |
| | | message: "用户密码长度必须介于 5 和 20 之间", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | email: [ |
| | | { |
| | | type: "email", |
| | | message: "请输入正确的邮箱地址", |
| | | trigger: ["blur", "change"], |
| | | }, |
| | | ], |
| | | phonenumber: [ |
| | | { |
| | | pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, |
| | | message: "请输入正确的手机号码", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | IDnumber: [ |
| | | { |
| | | pattern: |
| | | /^\d{6}((((((19|20)\d{2})(0[13-9]|1[012])(0[1-9]|[12]\d|30))|(((19|20)\d{2})(0[13578]|1[02])31)|((19|20)\d{2})02(0[1-9]|1\d|2[0-8])|((((19|20)([13579][26]|[2468][048]|0[48]))|(2000))0229))\d{3})|((((\d{2})(0[13-9]|1[012])(0[1-9]|[12]\d|30))|((\d{2})(0[13578]|1[02])31)|((\d{2})02(0[1-9]|1\d|2[0-8]))|(([13579][26]|[2468][048]|0[048])0229))\d{2}))(\d|X|x)$/, |
| | | message: "请输入正确的身份证号码", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | }; |
| | | }, |
| | | watch: {}, |
| | | created() { |
| | | this.getList(); |
| | | }, |
| | | |
| | | created() {}, |
| | | methods: { |
| | | /** 查询用户列表 */ |
| | | getList() { |
| | | // this.loading = true; |
| | | listUser().then((response) => { |
| | | console.log(response); |
| | | console.log(this.userList); |
| | | }); |
| | | }, |
| | | // 添加、修改类别 |
| | | submitsidecolumn() { |
| | | if (this.amendtag) { |
| | | this.classifyform.tagcategoryid = this.idds; |
| | | // toamendtagcategory(this.addDateRange(this.classifyform)).then( |
| | | // (response) => { |
| | | // console.log(response); |
| | | // this.gitclasify(); |
| | | // } |
| | | // ); |
| | | } else { |
| | | // addtagcategory(this.addDateRange(this.classifyform)).then( |
| | | // (response) => { |
| | | // console.log(response); |
| | | // this.gitclasify(); |
| | | // } |
| | | // ); |
| | | } |
| | | this.classifyform = { |
| | | categoryname: "", |
| | | }; |
| | | this.idds = ""; |
| | | this.dialogFormVisible = false; |
| | | }, |
| | | //删除分类 |
| | | deletefenlei(row) { |
| | | if (this.deleteVisible) { |
| | | // deletetagcategory(this.idds).then((response) => { |
| | | // console.log(response); |
| | | // this.gitclasify(); |
| | | // }); |
| | | this.deleteVisible = false; |
| | | this.idds = ""; |
| | | } else { |
| | | this.deleteVisible = true; |
| | | this.idds = row.tagcategoryid; |
| | | this.deletefenl = row.title; |
| | | } |
| | | }, |
| | | compileUpdate(row) { |
| | | this.$router.push({ |
| | | path: "/repositoryai/verbaltrick/particulars/", |
| | | query: { id: "1" }, |
| | | }); |
| | | }, |
| | | // 题目状态修改 |
| | | handleStatusChange(row) { |
| | | let text = row.status === "0" ? "启用" : "停用"; |
| | | this.$modal |
| | | .confirm('确认要"' + text + '""' + row.userName + '"用户吗?') |
| | | .then(function () { |
| | | return changeUserStatus(row.userId, row.status); |
| | | }) |
| | | .then(() => { |
| | | this.$modal.msgSuccess(text + "成功"); |
| | | }) |
| | | .catch(function () { |
| | | row.status = row.status === "0" ? "1" : "0"; |
| | | }); |
| | | }, |
| | | //搜索类别 |
| | | sidecolumnss() {}, |
| | | // 便捷标签 |
| | | tsgnameto() {}, |
| | | // 切换共享/本地 |
| | | tophandleClick() {}, |
| | | // 取消按钮 |
| | | cancel() { |
| | | this.indexopen = false; |
| | | this.reset(); |
| | | }, |
| | | |
| | | methods: {}, |
| | | // 表单重置 |
| | | reset() { |
| | | this.form = { |
| | | userId: undefined, |
| | | deptId: undefined, |
| | | userName: undefined, |
| | | nickName: undefined, |
| | | password: undefined, |
| | | phonenumber: undefined, |
| | | email: undefined, |
| | | sex: undefined, |
| | | status: "0", |
| | | remark: undefined, |
| | | postIds: [], |
| | | roleIds: [], |
| | | }; |
| | | this.resetForm("form"); |
| | | }, |
| | | /** 搜索按钮操作 */ |
| | | handleQuery() { |
| | | this.queryParams.pageNum = 1; |
| | | this.getList(); |
| | | }, |
| | | /** 重置按钮操作 */ |
| | | resetQuery() { |
| | | this.dateRange = []; |
| | | this.resetForm("queryForm"); |
| | | this.queryParams.deptId = undefined; |
| | | this.$refs.tree.setCurrentKey(null); |
| | | this.handleQuery(); |
| | | }, |
| | | // 多选框选中数据 |
| | | handleSelectionChange(selection) { |
| | | this.ids = selection.map((item) => item.userId); |
| | | this.single = selection.length != 1; |
| | | this.multiple = !selection.length; |
| | | }, |
| | | /** 新增按钮操作 */ |
| | | handleAdd() { |
| | | this.reset(); |
| | | this.title = "新增话术"; |
| | | this.indexopen = true; |
| | | }, |
| | | /** 修改按钮操作 */ |
| | | handleUpdate(row) { |
| | | this.reset(); |
| | | this.title = "修改话术"; |
| | | this.indexopen = true; |
| | | }, |
| | | // 修改分类弹框 |
| | | popoveramend(tagcategoryid) { |
| | | this.idds = tagcategoryid; |
| | | this.amendtag = true; |
| | | this.dialogFormVisible = true; |
| | | }, |
| | | |
| | | /** 更新/修改提交按钮 */ |
| | | submitForm: function () { |
| | | this.$refs["form"].validate((valid) => { |
| | | if (valid) { |
| | | if (this.form.userId != undefined) { |
| | | updateUser(this.form).then((response) => { |
| | | this.$modal.msgSuccess("修改成功"); |
| | | this.indexopen = false; |
| | | this.getList(); |
| | | }); |
| | | } else { |
| | | addUser(this.form).then((response) => { |
| | | this.$modal.msgSuccess("新增成功"); |
| | | this.indexopen = false; |
| | | this.getList(); |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | /** 删除按钮操作 */ |
| | | handleDelete(row) { |
| | | const userIds = row.userId || this.ids; |
| | | this.$modal |
| | | .confirm('是否确认删除用户编号为"' + userIds + '"的数据项?') |
| | | .then(function () { |
| | | return delUser(userIds); |
| | | }) |
| | | .then(() => { |
| | | this.getList(); |
| | | this.$modal.msgSuccess("删除成功"); |
| | | }) |
| | | .catch(() => {}); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped></style> |
| | | <style lang="scss" scoped> |
| | | .Questionnairemanagement { |
| | | display: flex; |
| | | } |
| | | .sidecolumn { |
| | | width: 300px; |
| | | min-height: 100vh; |
| | | text-align: center; |
| | | // display: flex; |
| | | margin-top: 20px; |
| | | margin: 20px; |
| | | padding: 30px; |
| | | background: #edf1f7; |
| | | border: 1px solid #dcdfe6; |
| | | -webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12), |
| | | 0 0 6px 0 rgba(0, 0, 0, 0.04); |
| | | .sidecolumn-top { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | .top-wj { |
| | | font-size: 20px; |
| | | } |
| | | .top-tj { |
| | | font-size: 18px; |
| | | |
| | | color: rgb(0, 89, 255); |
| | | cursor: pointer; |
| | | } |
| | | } |
| | | .center-ss { |
| | | margin-top: 30px; |
| | | .input-with-select { |
| | | height: 40px !important; |
| | | } |
| | | } |
| | | .bottom-fl { |
| | | margin-top: 30px; |
| | | display: center !important; |
| | | } |
| | | } |
| | | .qrcode-dialo { |
| | | text-align: center; |
| | | // display: flex; |
| | | margin: 20px; |
| | | padding: 30px; |
| | | background: #edf1f7; |
| | | border: 1px solid #dcdfe6; |
| | | -webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12), |
| | | 0 0 6px 0 rgba(0, 0, 0, 0.04); |
| | | .qrcode-text { |
| | | font-size: 20px; |
| | | span { |
| | | margin-left: 20px; |
| | | } |
| | | } |
| | | .qrcode-img { |
| | | width: 300px; |
| | | height: 400px; |
| | | } |
| | | } |
| | | .tsgname { |
| | | width: 90px; |
| | | margin-right: 10px; |
| | | text-align: center; |
| | | cursor: pointer; |
| | | height: 40px; |
| | | line-height: 40px; |
| | | background: #7799fa; |
| | | color: #ffff; |
| | | font-size: 18px; |
| | | border-radius: 5px; |
| | | } |
| | | .tsgname:hover { |
| | | background: #3366f5; |
| | | } |
| | | ::v-deep.el-tabs--left, |
| | | .el-tabs--right { |
| | | overflow: hidden; |
| | | align-items: center; |
| | | display: flex; |
| | | } |
| | | ::v-deep.el-input--medium .el-input__inner { |
| | | height: 40px !important; |
| | | } |
| | | ::v-deep.el-tabs--right .el-tabs__active-bar.is-right { |
| | | height: 40px; |
| | | width: 5px; |
| | | left: 0; |
| | | } |
| | | ::v-deep.el-tabs--right .el-tabs__item.is-right { |
| | | display: block; |
| | | font-size: 20px; |
| | | } |
| | | .leftvlue { |
| | | // display: flex; |
| | | // flex: 1; |
| | | width: 80%; |
| | | margin-top: 20px; |
| | | // margin: 20px; |
| | | padding: 30px; |
| | | background: #ffff; |
| | | border: 1px solid #dcdfe6; |
| | | -webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12), |
| | | 0 0 6px 0 rgba(0, 0, 0, 0.04); |
| | | .mulsz { |
| | | font-size: 20px; |
| | | } |
| | | } |
| | | .button-text { |
| | | color: rgb(70, 204, 238); |
| | | } |
| | | .button-bji { |
| | | color: rgb(39, 167, 67); |
| | | } |
| | | .button-textxg { |
| | | color: rgb(35, 81, 233); |
| | | } |
| | | .button-textsc { |
| | | color: rgb(235, 23, 23); |
| | | } |
| | | </style> |