From 8b50c0466a9453472871da617abc647c39b903dc Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期五, 24 三月 2023 20:33:49 +0800
Subject: [PATCH] yxh
---
ruoyi-ui/src/views/smartor/svytopicoption/index.vue | 115 ++++++++++++---------------------------------------------
1 files changed, 25 insertions(+), 90 deletions(-)
diff --git a/ruoyi-ui/src/views/smartor/svytopicoption/index.vue b/ruoyi-ui/src/views/smartor/svytopicoption/index.vue
index d1329f4..4d15767 100644
--- a/ruoyi-ui/src/views/smartor/svytopicoption/index.vue
+++ b/ruoyi-ui/src/views/smartor/svytopicoption/index.vue
@@ -36,13 +36,20 @@
<el-table v-loading="loading" :data="svytopicoptionList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
- <el-table-column label=" 棰樼洰绫诲瀷 " width="150" align="center" prop="topictype" />
+ <el-table-column label=" 閫傜敤棰樼洰绫诲瀷 " width="150" align="center" prop="topictype">
+ <template slot-scope="scope">
+ <dict-tag :options="dict.type.svy_topictype" :value="scope.row.topictype" />
+ </template></el-table-column>
<el-table-column label=" 閫夐」鍐呭 " width="200" align="center" prop="optioncontent" />
<el-table-column label=" 鎻愮ず " width="200" align="center" prop="prompt" />
<el-table-column label=" 鍒嗘暟 " width="55" align="center" prop="score" />
<el-table-column label=" 楠岃瘉瑙勫垯 " width="250" align="center" prop="verifyrule" />
<el-table-column label=" 鏄惁瀛樺湪鏄庣粏 " width="150" align="center" prop="isexistdetail" />
- <el-table-column label=" 褰掑睘鏈烘瀯 " width="200" align="center" prop="orgid" />
+ <el-table-column label=" 鎵�灞為櫌鍖� " width="200" align="center" prop="orgid">
+ <template slot-scope="scope">
+ <dict-tag :options="dict.type.sys_patientfrom" :value="scope.row.orgid" />
+ </template>
+ </el-table-column>
<el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
@@ -149,9 +156,11 @@
<script>
import { listSvytopicoption, getSvytopicoption, delSvytopicoption, addSvytopicoption, updateSvytopicoption } from "@/api/smartor/svytopicoption";
+import maintdlg from "@/smartor/dataobject/dw_svytopicoption_maint.vue";
export default {
name: "Svytopicoption",
+ dicts: ['svy_topictype'],
data() {
return {
// 閬僵灞�
@@ -168,11 +177,7 @@
total: 0,
// 闂嵎闂閫夐」琛ㄦ牸鏁版嵁
svytopicoptionList: [],
- // 寮瑰嚭灞傛爣棰�
- title: "",
- // 鏄惁鏄剧ず寮瑰嚭灞�
- open: false,
- // 鏌ヨ鍙傛暟
+ // 鏌ヨ鍙傛暟
queryParams: {
pageNum: 1,
pageSize: 10,
@@ -202,21 +207,17 @@
isupload: null,
uploadTime: null
},
- // 琛ㄥ崟鍙傛暟
- form: {},
- // 琛ㄥ崟鏍¢獙
- rules: {
- delFlag: [
- { required: true, message: " 鍒犻櫎鏍囪 涓嶈兘涓虹┖", trigger: "blur" }
- ],
- isupload: [
- { required: true, message: " 涓婁紶鏍囪 涓嶈兘涓虹┖", trigger: "blur" }
- ],
- }
};
},
+ components:
+ {
+ maintdlg: maintdlg //()=>import("@/smartor/dataobject/dw_svytopicoption_maint")
+ },
created() {
- this.getList();
+ this.getList();
+ },
+ mounted() {
+
},
methods: {
/** 鏌ヨ闂嵎闂閫夐」鍒楄〃 */
@@ -227,48 +228,6 @@
this.total = response.total;
this.loading = false;
});
- },
- // 鍙栨秷鎸夐挳
- cancel() {
- this.open = false;
- this.reset();
- },
- // 琛ㄥ崟閲嶇疆
- reset() {
- this.form = {
- optionid: null,
- topicid: null,
- svyid: null,
- topictype: null,
- optioncode: null,
- optioncontent: null,
- isexistdetail: null,
- detailismandatory: null,
- isexceptionitem: null,
- istrack: null,
- score: null,
- prompt: null,
- jump: null,
- parentoptionid: null,
- ismutex: null,
- verifyrule: null,
- sort: null,
- verificationtype: null,
- isrange: null,
- minrange: null,
- maxrange: null,
- rangelength: null,
- orgid: null,
- oldid: null,
- delFlag: null,
- createBy: null,
- createTime: null,
- updateBy: null,
- updateTime: null,
- isupload: null,
- uploadTime: null
- };
- this.resetForm("form");
},
/** 鎼滅储鎸夐挳鎿嶄綔 */
handleQuery() {
@@ -288,40 +247,16 @@
},
/** 鏂板鎸夐挳鎿嶄綔 */
handleAdd() {
- this.reset();
- this.open = true;
- this.title = "娣诲姞闂嵎闂閫夐」";
+ this.$refs["maint"].handleUpdate(null)
+ return
},
/** 淇敼鎸夐挳鎿嶄綔 */
handleUpdate(row) {
- this.reset();
const optionid = row.optionid || this.ids
- getSvytopicoption(optionid).then(response => {
- this.form = response.data;
- this.open = true;
- this.title = "淇敼闂嵎闂閫夐」";
- });
+ this.$refs["maint"].handleUpdate(optionid)
+ return
},
- /** 鎻愪氦鎸夐挳 */
- submitForm() {
- this.$refs["form"].validate(valid => {
- if (valid) {
- if (this.form.optionid != null) {
- updateSvytopicoption(this.form).then(response => {
- this.$modal.msgSuccess("淇敼鎴愬姛");
- this.open = false;
- this.getList();
- });
- } else {
- addSvytopicoption(this.form).then(response => {
- this.$modal.msgSuccess("鏂板鎴愬姛");
- this.open = false;
- this.getList();
- });
- }
- }
- });
- },
+
/** 鍒犻櫎鎸夐挳鎿嶄綔 */
handleDelete(row) {
const optionids = row.optionid || this.ids;
--
Gitblit v1.9.3