¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <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="['smartor:svytopicoption:add']">æ°å¢</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate" |
| | | v-hasPermi="['smartor:svytopicoption:edit']">ä¿®æ¹</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete" |
| | | v-hasPermi="['smartor:svytopicoption:remove']">å é¤</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" |
| | | v-hasPermi="['smartor:svytopicoption:export']">导åº</el-button> |
| | | </el-col> |
| | | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| | | </el-row> |
| | | |
| | | <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="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="æä½" 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="['smartor:svytopicoption:edit']">ä¿®æ¹</el-button> |
| | | <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" |
| | | v-hasPermi="['smartor:svytopicoption:remove']">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <maintdlg ref="maint"/> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { listSvytopicoption, getSvytopicoption, delSvytopicoption, addSvytopicoption, updateSvytopicoption } from "@/api/smartor/svytopicoption"; |
| | | import maintdlg from "@/smartor/dataobject/dw_svytopicoption_maint.vue"; |
| | | |
| | | export default { |
| | | name: "Svytopicoption", |
| | | data() { |
| | | return { |
| | | single: true, |
| | | // éå¤ä¸ªç¦ç¨ |
| | | multiple: true, |
| | | // æ¾ç¤ºæç´¢æ¡ä»¶ |
| | | showSearch: true, |
| | | loading : false, |
| | | showSearch: true, |
| | | // æ»æ¡æ° |
| | | total: 0, |
| | | // é®å·é®é¢éé¡¹è¡¨æ ¼æ°æ® |
| | | svytopicoptionList: [], |
| | | // æ¥è¯¢åæ° |
| | | queryParams: { |
| | | topicid: null |
| | | }, |
| | | }; |
| | | }, |
| | | components: |
| | | { |
| | | maintdlg: maintdlg //()=>import("@/smartor/dataobject/dw_svytopicoption_maint") |
| | | }, |
| | | created() { |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | methods: { |
| | | /** æ¥è¯¢é®å·é®é¢é项å表 */ |
| | | getList(topicId) { |
| | | this.loading = true; |
| | | this.queryParams.topicid = topicId; |
| | | listSvytopicoption(this.queryParams).then(response => { |
| | | this.svytopicoptionList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | |
| | | // å¤éæ¡é䏿°æ® |
| | | handleSelectionChange(selection) { |
| | | this.ids = selection.map(item => item.optionid) |
| | | this.single = selection.length !== 1 |
| | | this.multiple = !selection.length |
| | | }, |
| | | /** æ°å¢æé®æä½ */ |
| | | handleAdd() { |
| | | this.$refs["maint"].handleUpdate(null) |
| | | return |
| | | }, |
| | | /** ä¿®æ¹æé®æä½ */ |
| | | handleUpdate(row) { |
| | | const optionid = row.optionid || this.ids |
| | | this.$refs["maint"].handleUpdate(optionid) |
| | | return |
| | | }, |
| | | |
| | | /** å é¤æé®æä½ */ |
| | | handleDelete(row) { |
| | | const optionids = row.optionid || this.ids; |
| | | this.$modal.confirm('æ¯å¦ç¡®è®¤å é¤é®å·é®é¢é项ç¼å·ä¸º"' + optionids + '"çæ°æ®é¡¹ï¼').then(function () { |
| | | return delSvytopicoption(optionids); |
| | | }).then(() => { |
| | | this.getList(); |
| | | this.$modal.msgSuccess("å 餿å"); |
| | | }).catch(() => { }); |
| | | }, |
| | | /** å¯¼åºæé®æä½ */ |
| | | handleExport() { |
| | | this.download('smartor/svytopicoption/export', { |
| | | ...this.queryParams |
| | | }, `svytopicoption_${new Date().getTime()}.xlsx`) |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |