| | |
| | | icon="el-icon-edit" |
| | | size="mini" |
| | | :disabled="single" |
| | | @click="handleUpdate1" |
| | | v-hasPermi="['hosp:surveyTemplate:edit']" |
| | | >标题修改 |
| | | </el-button> |
| | | </el-col> |
| | | <el-col :span="1.5" v-if="details"> |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-edit" |
| | | size="mini" |
| | | :disabled="single" |
| | | @click="handleUpdate" |
| | | v-hasPermi="['hosp:surveyTemplate:edit']" |
| | | >修改 |
| | | >详情修改 |
| | | </el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | |
| | | <el-form-item label="备注" prop="remark"> |
| | | <el-input v-model="form.remark" placeholder="请输入备注" /> |
| | | </el-form-item> |
| | |
| | | <el-button @click="cancel">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | <!-- 问卷详情抽屉 --> |
| | | <el-drawer |
| | | <!-- 问卷详情抽屉 --> |
| | | <el-drawer |
| | | title="问卷详情" |
| | | :visible.sync="drawer" |
| | | :with-header="true" |
| | |
| | | getneedDesign, |
| | | getcanDelete, |
| | | updateQybz, |
| | | getQuesByMid |
| | | getQuesByMid, |
| | | } from "@/api/hosp/surveyTemplate"; |
| | | import { Message } from "element-ui"; |
| | | export default { |
| | |
| | | } |
| | | }; |
| | | return { |
| | | inpu:"", |
| | | inpu: "", |
| | | num: 0, |
| | | myscore: null, |
| | | // 遮罩层 |
| | | loading: true, |
| | | drawer:false, |
| | | drawer: false, |
| | | previewKey: +new Date(), |
| | | previewDialogVisible: false, |
| | | // 选中数组 |
| | |
| | | // 是否显示弹出层 |
| | | open: false, |
| | | DaTianYa: false, |
| | | details: false, |
| | | // 查询参数 |
| | | queryParams: { |
| | | pageNum: 1, |
| | |
| | | }, |
| | | // 多选框选中数据 |
| | | handleSelectionChange(selection) { |
| | | console.log(selection); |
| | | this.ids = selection.map((item) => item.mid); |
| | | this.single = selection.length !== 1; |
| | | this.multiple = !selection.length; |
| | | if (selection.length != 0) { |
| | | selection.forEach((item) => { |
| | | if (item.designId != null) { |
| | | this.details = true; |
| | | } else { |
| | | this.details = false; |
| | | } |
| | | }); |
| | | } else { |
| | | this.details = false; |
| | | } |
| | | }, |
| | | handleTjSurveyTempQuesSelectionChange(selection) { |
| | | this.selectionList = []; |
| | |
| | | handleAdd() { |
| | | this.reset(); |
| | | this.title = "添加问卷模板"; |
| | | |
| | | |
| | | getneedDesign().then((res) => { |
| | | if (res.msg == "false") { |
| | | this.DaTianYa = false; |
| | |
| | | if (response.data.designId == null) { |
| | | this.drawer = true; |
| | | getQuesByMid(mid) |
| | | .then((res) => { |
| | | res.data.sort( |
| | | (a, b) => |
| | | new Date(a.createTime).getTime() - |
| | | new Date(b.createTime).getTime() |
| | | ); //这是升序,倒序的话翻过来 |
| | | this.intList = res.data; |
| | | |
| | | }) |
| | | .catch((err) => { |
| | | // 通过catch捕获错误消息 |
| | | return err; |
| | | }); |
| | | .then((res) => { |
| | | res.data.sort( |
| | | (a, b) => |
| | | new Date(a.createTime).getTime() - |
| | | new Date(b.createTime).getTime() |
| | | ); //这是升序,倒序的话翻过来 |
| | | this.intList = res.data; |
| | | }) |
| | | .catch((err) => { |
| | | // 通过catch捕获错误消息 |
| | | return err; |
| | | }); |
| | | } else { |
| | | this.$router.push({ |
| | | query: { key: response.data.designId }, |
| | |
| | | /** 修改按钮操作 */ |
| | | handleUpdate(row) { |
| | | this.reset(); |
| | | |
| | | const mid = row.mid || this.ids; |
| | | getSurveyTemplate(mid).then((response) => { |
| | | this.form = response.data; |
| | |
| | | this.form.type = 1; |
| | | this.toProjectHandle(this.form, "editor"); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | /** 修改按钮操作 */ |
| | | handleUpdate1(row) { |
| | | this.reset(); |
| | | const mid = row.mid || this.ids; |
| | | getSurveyTemplate(mid).then((response) => { |
| | | this.form = response.data; |
| | | if (response.data.tjSurveyTempQuesList.length >= 1) { |
| | | this.form.tjSurveyTempQuesList = response.data.tjSurveyTempQuesList; |
| | | } |
| | | this.DaTianYa = false; |
| | | this.title = "修改问卷模板"; |
| | | this.open = true; |
| | | }); |
| | | }, |
| | | /** 提交按钮 */ |
| | |
| | | } else { |
| | | this.toProjectHandle(response.data, "editor"); |
| | | } |
| | | |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |