From a9ade103b6faae81c3a9dbfd54dfce0076fefc8e Mon Sep 17 00:00:00 2001
From: qianxj <qianxj15@sina.com>
Date: 星期四, 16 三月 2023 15:56:45 +0800
Subject: [PATCH] update

---
 ruoyi-ui/src/views/smartor/svytitle/index.vue |  580 ++++++++++++++++++++++++---------------------------------
 1 files changed, 248 insertions(+), 332 deletions(-)

diff --git a/ruoyi-ui/src/views/smartor/svytitle/index.vue b/ruoyi-ui/src/views/smartor/svytitle/index.vue
index a184a28..f0746cd 100644
--- a/ruoyi-ui/src/views/smartor/svytitle/index.vue
+++ b/ruoyi-ui/src/views/smartor/svytitle/index.vue
@@ -1,347 +1,263 @@
 <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="categoryid">
-    
-                <el-input v-model="queryParams.categoryid" placeholder="璇疯緭鍏� 闂嵎绫诲埆 " clearable @keyup.enter.native="handleQuery" />
-    
-            </el-form-item>
-    
-            <el-form-item label=" 闂嵎鍚嶇О " prop="svyname">
-    
-                <el-input v-model="queryParams.svyname" placeholder="璇疯緭鍏� 闂嵎鍚嶇О " clearable @keyup.enter.native="handleQuery" />
-    
-            </el-form-item>
-    
-            <el-form-item label=" 鏄惁鍚敤 " prop="isenable">
-    
-                <el-input v-model="queryParams.isenable" placeholder="璇疯緭鍏� 鏄惁鍚敤 " clearable @keyup.enter.native="handleQuery" />
-    
-            </el-form-item>
-    
-            <el-form-item label=" 褰掑睘鏈烘瀯 " prop="orgid">
-    
-                <el-input v-model="queryParams.orgid" placeholder="璇疯緭鍏� 鏈烘瀯ID " clearable @keyup.enter.native="handleQuery" />
-    
-            </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="['smartor:svytitle: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:svytitle: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:svytitle: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:svytitle:export']">瀵煎嚭</el-button>
-    
-            </el-col>
-    
-            <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
-    
-        </el-row>
-    
-    
-    
-        <el-table v-loading="loading" :data="svytitleList" @selection-change="handleSelectionChange">
-    
-            <el-table-column type="selection" width="55" align="center" />
-    
-            <el-table-column label=" 闂嵎绫诲埆 " width="120" align="center" prop="categoryid" />
-    
-            <el-table-column label=" 闂嵎浠g爜 " width="120" align="center" prop="svycode" />
-    
-            <el-table-column label=" 闂嵎鍚嶇О " width="200" align="center" prop="svyname" />
-    
-            <el-table-column label=" 鎻忚堪 " width="300" align="center" prop="description" />
-    
-            <el-table-column label=" 閲囩敤妯℃澘 " width="120" align="center" prop="templateid" />
-    
-            <el-table-column label=" 鐗堟湰 " width="120" align="center" prop="version" />
-    
-            <el-table-column label=" 鏄惁鍚敤 " width="120" align="center" prop="isenable" />
-    
-            <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:svytitle:edit']">淇敼</el-button>
-    
-              <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
-    
-                v-hasPermi="['smartor:svytitle:remove']">鍒犻櫎</el-button>
-</template>
-      </el-table-column>
-    </el-table>
+  <div>
+    <div style="height:32pt" />
+    <div style="padding-left:16pt;">
+      <el-input placeholder="璇疯緭鍏ュ唴瀹�" v-model="input3" class="input-with-select">
+        <!--el-select v-model="select" slot="prepend" placeholder="璇烽�夋嫨">
+          <el-option label="椁愬巺鍚�" value="1"></el-option>
+          <el-option label="璁㈠崟鍙�" value="2"></el-option>
+          <el-option label="鐢ㄦ埛鐢佃瘽" value="3"></el-option>
+        </el-select-->
+        <el-button slot="append" icon="el-icon-search" style="width:32pt"></el-button>
+      </el-input>
+      <!--el-button type="primary" icon="el-icon-search">鎼滅储</el-button-->
+      <el-button size="small" type1="primary" @click="handleQueryGrid">琛ㄦ绱�</el-button>
+      <el-button size="small" type1="primary" @click="handleQueryTree">鏍戞绱�</el-button>
+    </div>
+    <div id="content" />
 
-    <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
-      @pagination="getList" />
-
-    <!-- 娣诲姞鎴栦慨鏀归棶鍗峰璇濇 -->
-    <el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-        <el-row>
-          <el-col :span="8">
-            <el-form-item label=" 闂嵎浠g爜 " prop="svycode">
-              <el-input v-model="form.svycode" placeholder="璇疯緭鍏� 闂嵎浠g爜 " />
-            </el-form-item>
-          </el-col>
-          <el-col :span="8">
-            <el-form-item label=" 闂嵎鍚嶇О " prop="svyname">
-              <el-input v-model="form.svyname" placeholder="璇疯緭鍏� 闂嵎鍚嶇О " />
-            </el-form-item>
-          </el-col>
-          <el-col :span="8">
-            <el-form-item label=" 闂嵎鍒嗙被 " prop="categoryid">
-              <el-input v-model="form.categoryid" placeholder="璇疯緭鍏� 闂嵎鍒嗙被ID " />
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-form-item label=" 闂嵎鎻忚堪 " prop="description">
-            <el-input v-model="form.description" type="textarea" placeholder="璇疯緭鍏ュ唴瀹�" />
-          </el-form-item>
-        </el-row>
-        <el-row>
-          <el-form-item label=" 闂嵎浠嬬粛 " prop="introduce">
-            <el-input v-model="form.introduce" type="textarea" placeholder="璇疯緭鍏ュ唴瀹�" />
-          </el-form-item>
-        </el-row>
-        <el-row>
-          <el-form-item label=" 闂嵎鎻愮ず " prop="submitprompt">
-            <el-input v-model="form.submitprompt" type="textarea" placeholder="璇疯緭鍏ュ唴瀹�" />
-          </el-form-item>
-        </el-row>
-
-        <el-row>
-          <el-form-item label=" 褰掑睘鏈烘瀯 " prop="orgid">
-            <el-input v-model="form.orgid" placeholder="璇疯緭鍏� 鏈烘瀯ID " />
-          </el-form-item>
-        </el-row><el-row><el-col :span="8">
-            <el-form-item label=" 鐗堟湰 " prop="version">
-              <el-input v-model="form.version" placeholder="璇疯緭鍏� 鐗堟湰 " />
-            </el-form-item></el-col><el-col :span="8">
-            <el-form-item label=" 鏄惁鍚敤 " prop="isenable">
-              <el-input v-model="form.isenable" placeholder="璇疯緭鍏� 鏄惁鍚敤 " />
-            </el-form-item>
-          </el-col>
-          <el-col :span="8">
-            <el-form-item label=" 閲囩敤妯℃澘 " prop="templateid">
-              <el-input v-model="form.templateid" placeholder="璇疯緭鍏� 妯℃澘ID " />
-            </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>
+    <!--el-container style="display:none">
+      <el-aside width="200px">
+        <el-tree :data="data" :props="defaultProps" @node-click="handleNodeClick"></el-tree>
+      </el-aside>
+      <el-main>
+        <div is='dw_topic' />
+      </el-main>
+    </el-container-->
   </div>
 </template>
-
+<style> 
+  .input-with-select
+  {
+    width:50%;
+    margin-right: 12pt;
+  }
+</style>
 <script>
 import { listSvytitle, getSvytitle, delSvytitle, addSvytitle, updateSvytitle } from "@/api/smartor/svytitle";
 
 export default {
-    name: "Svytitle",
-    data() {
-        return {
-            // 閬僵灞�
-            loading: true,
-            // 閫変腑鏁扮粍
-            ids: [],
-            // 闈炲崟涓鐢�
-            single: true,
-            // 闈炲涓鐢�
-            multiple: true,
-            // 鏄剧ず鎼滅储鏉′欢
-            showSearch: true,
-            // 鎬绘潯鏁�
-            total: 0,
-            // 闂嵎琛ㄦ牸鏁版嵁
-            svytitleList: [],
-            // 寮瑰嚭灞傛爣棰�
-            title: "",
-            // 鏄惁鏄剧ず寮瑰嚭灞�
-            open: false,
-            // 鏌ヨ鍙傛暟
-            queryParams: {
-                pageNum: 1,
-                pageSize: 10,
-                categoryid: null,
-                svycode: null,
-                svyname: null,
-                description: null,
-                introduce: null,
-                submitprompt: null,
-                templateid: null,
-                version: null,
-                centerlibrarycode: null,
-                centerlibraryid: null,
-                islocal: null,
-                isenable: null,
-                orgid: null,
-                isupload: null,
-                uploadTime: null
-            },
-            // 琛ㄥ崟鍙傛暟
-            form: {},
-            // 琛ㄥ崟鏍¢獙
-            rules: {
-                delFlag: [
-                    { required: true, message: " 鍒犻櫎鏍囪 涓嶈兘涓虹┖", trigger: "blur" }
-                ],
-                isupload: [
-                    { required: true, message: " 涓婁紶鏍囪 涓嶈兘涓虹┖", trigger: "blur" }
-                ],
-            }
-        };
+  name: "Svytitle",
+  data() {
+    return {
+      // 閬僵灞�
+      loading: true,
+      // 閫変腑鏁扮粍
+      ids: [],
+      // 闈炲崟涓鐢�
+      single: true,
+      // 闈炲涓鐢�
+      multiple: true,
+      // 鏄剧ず鎼滅储鏉′欢
+      showSearch: true,
+      // 鎬绘潯鏁�
+      total: 0,
+      // 闂嵎琛ㄦ牸鏁版嵁
+      svytitleList: [],
+      // 寮瑰嚭灞傛爣棰�
+      title: "",
+      // 鏄惁鏄剧ず寮瑰嚭灞�
+      open: false,
+      // 鏌ヨ鍙傛暟
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        categoryid: null,
+        svycode: null,
+        svyname: null,
+        description: null,
+        introduce: null,
+        submitprompt: null,
+        templateid: null,
+        version: null,
+        centerlibrarycode: null,
+        centerlibraryid: null,
+        islocal: null,
+        isenable: null,
+        orgid: null,
+        isupload: null,
+        uploadTime: null
+      },
+      // 琛ㄥ崟鍙傛暟
+      form: {},
+      // 琛ㄥ崟鏍¢獙
+      rules: {
+        delFlag: [
+          { required: true, message: " 鍒犻櫎鏍囪 涓嶈兘涓虹┖", trigger: "blur" }
+        ],
+        isupload: [
+          { required: true, message: " 涓婁紶鏍囪 涓嶈兘涓虹┖", trigger: "blur" }
+        ],
+      },
+      data: [{
+        label: '涓�绾� 1',
+        children: [{
+          label: '浜岀骇 1-1',
+          children: [{
+            label: '涓夌骇 1-1-1'
+          }]
+        }]
+      }, {
+        label: '涓�绾� 2',
+        children: [{
+          label: '浜岀骇 2-1',
+          children: [{
+            label: '涓夌骇 2-1-1'
+          }]
+        }, {
+          label: '浜岀骇 2-2',
+          children: [{
+            label: '涓夌骇 2-2-1'
+          }]
+        }]
+      }, {
+        label: '涓�绾� 3',
+        children: [{
+          label: '浜岀骇 3-1',
+          children: [{
+            label: '涓夌骇 3-1-1'
+          }]
+        }, {
+          label: '浜岀骇 3-2',
+          children: [{
+            label: '涓夌骇 3-2-1'
+          }]
+        }]
+      }],
+      defaultProps: {
+        children: 'children',
+        label: 'label'
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 鏌ヨ闂嵎鍒楄〃 */
+    getList() {
+      this.loading = true;
+      listSvytitle(this.queryParams).then(response => {
+        this.svytitleList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
     },
-    created() {
-        this.getList();
+    // 鍙栨秷鎸夐挳
+    cancel() {
+      this.open = false;
+      this.reset();
     },
-    methods: {
-        /** 鏌ヨ闂嵎鍒楄〃 */
-        getList() {
-            this.loading = true;
-            listSvytitle(this.queryParams).then(response => {
-                this.svytitleList = response.rows;
-                this.total = response.total;
-                this.loading = false;
+    // 琛ㄥ崟閲嶇疆
+    reset() {
+      this.form = {
+        svyid: null,
+        categoryid: null,
+        svycode: null,
+        svyname: null,
+        description: null,
+        introduce: null,
+        submitprompt: null,
+        templateid: null,
+        version: null,
+        centerlibrarycode: null,
+        centerlibraryid: null,
+        islocal: null,
+        isenable: null,
+        orgid: null,
+        delFlag: null,
+        createBy: null,
+        createTime: null,
+        updateBy: null,
+        updateTime: null,
+        isupload: null,
+        uploadTime: null
+      };
+      this.resetForm("form");
+    },
+    /** 鎼滅储鎸夐挳鎿嶄綔 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 閲嶇疆鎸夐挳鎿嶄綔 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 澶氶�夋閫変腑鏁版嵁
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.svyid)
+      this.single = selection.length !== 1
+      this.multiple = !selection.length
+    },
+    /** 鏂板鎸夐挳鎿嶄綔 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "娣诲姞闂嵎";
+    },
+    /** 淇敼鎸夐挳鎿嶄綔 */
+    handleUpdate(row) {
+      this.reset();
+      const svyid = row.svyid || this.ids
+      getSvytitle(svyid).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "淇敼闂嵎";
+      });
+    },
+    /** 鎻愪氦鎸夐挳 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.svyid != null) {
+            updateSvytitle(this.form).then(response => {
+              this.$modal.msgSuccess("淇敼鎴愬姛");
+              this.open = false;
+              this.getList();
             });
-        },
-        // 鍙栨秷鎸夐挳
-        cancel() {
-            this.open = false;
-            this.reset();
-        },
-        // 琛ㄥ崟閲嶇疆
-        reset() {
-            this.form = {
-                svyid: null,
-                categoryid: null,
-                svycode: null,
-                svyname: null,
-                description: null,
-                introduce: null,
-                submitprompt: null,
-                templateid: null,
-                version: null,
-                centerlibrarycode: null,
-                centerlibraryid: null,
-                islocal: null,
-                isenable: null,
-                orgid: null,
-                delFlag: null,
-                createBy: null,
-                createTime: null,
-                updateBy: null,
-                updateTime: null,
-                isupload: null,
-                uploadTime: null
-            };
-            this.resetForm("form");
-        },
-        /** 鎼滅储鎸夐挳鎿嶄綔 */
-        handleQuery() {
-            this.queryParams.pageNum = 1;
-            this.getList();
-        },
-        /** 閲嶇疆鎸夐挳鎿嶄綔 */
-        resetQuery() {
-            this.resetForm("queryForm");
-            this.handleQuery();
-        },
-        // 澶氶�夋閫変腑鏁版嵁
-        handleSelectionChange(selection) {
-            this.ids = selection.map(item => item.svyid)
-            this.single = selection.length !== 1
-            this.multiple = !selection.length
-        },
-        /** 鏂板鎸夐挳鎿嶄綔 */
-        handleAdd() {
-            this.reset();
-            this.open = true;
-            this.title = "娣诲姞闂嵎";
-        },
-        /** 淇敼鎸夐挳鎿嶄綔 */
-        handleUpdate(row) {
-            this.reset();
-            const svyid = row.svyid || this.ids
-            getSvytitle(svyid).then(response => {
-                this.form = response.data;
-                this.open = true;
-                this.title = "淇敼闂嵎";
+          } else {
+            addSvytitle(this.form).then(response => {
+              this.$modal.msgSuccess("鏂板鎴愬姛");
+              this.open = false;
+              this.getList();
             });
-        },
-        /** 鎻愪氦鎸夐挳 */
-        submitForm() {
-            this.$refs["form"].validate(valid => {
-                if (valid) {
-                    if (this.form.svyid != null) {
-                        updateSvytitle(this.form).then(response => {
-                            this.$modal.msgSuccess("淇敼鎴愬姛");
-                            this.open = false;
-                            this.getList();
-                        });
-                    } else {
-                        addSvytitle(this.form).then(response => {
-                            this.$modal.msgSuccess("鏂板鎴愬姛");
-                            this.open = false;
-                            this.getList();
-                        });
-                    }
-                }
-            });
-        },
-        /** 鍒犻櫎鎸夐挳鎿嶄綔 */
-        handleDelete(row) {
-            const svyids = row.svyid || this.ids;
-            this.$modal.confirm('鏄惁纭鍒犻櫎闂嵎缂栧彿涓�"' + svyids + '"鐨勬暟鎹」锛�').then(function() {
-                return delSvytitle(svyids);
-            }).then(() => {
-                this.getList();
-                this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
-            }).catch(() => {});
-        },
-        /** 瀵煎嚭鎸夐挳鎿嶄綔 */
-        handleExport() {
-            this.download('smartor/svytitle/export', {
-                ...this.queryParams
-            }, `svytitle_${new Date().getTime()}.xlsx`)
+          }
         }
-    }
+      });
+    },
+    /** 鍒犻櫎鎸夐挳鎿嶄綔 */
+    handleDelete(row) {
+      const svyids = row.svyid || this.ids;
+      this.$modal.confirm('鏄惁纭鍒犻櫎闂嵎缂栧彿涓�"' + svyids + '"鐨勬暟鎹」锛�').then(function () {
+        return delSvytitle(svyids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+      }).catch(() => { });
+    },
+    /** 瀵煎嚭鎸夐挳鎿嶄綔 */
+    handleExport() {
+      this.download('smartor/svytitle/export', {
+        ...this.queryParams
+      }, `svytitle_${new Date().getTime()}.xlsx`)
+    },
+    handleNodeClick(data) {
+      console.log(data);
+    },
+    handleQueryGrid() {
+      const params = { };
+      this.$tab.openPage("闂嵎鏌ヨ1", '/surveysetting/svytitle1/', params);
+    },
+    handleQueryTree() {
+      const params = { };
+      this.$tab.openPage("闂嵎鏌ヨ2", '/surveysetting/svytitle2/', params);
+    },
+  },
+  components:
+  {
+    dw_topic: () => import("@/smartor/dataobject/dw_ivrtopic_view.vue")
+  }
 };
 </script>

--
Gitblit v1.9.3