qianxj
2023-03-16 a9ade103b6faae81c3a9dbfd54dfce0076fefc8e
update
已添加3个文件
已修改2个文件
1332 ■■■■ 文件已修改
ruoyi-ui/src/smartor/dataobject/dw_ivrtopic_view.vue 108 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/smartor/ivrquestionlib/QuestionMaint.vue 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/smartor/svytitle/index.vue 580 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/smartor/svytitle/index0.vue 347 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/smartor/svytitle/index1.vue 230 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/smartor/dataobject/dw_ivrtopic_view.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,108 @@
<template>
    <div>
      <!--el-card class="box-card"-->
        <div v-for="(question,i) in questions" :key="i" style="margin-left:12pt;margin-top:12pt">
            <div @click="handleRow">{{ (i+1).toString()+"、"+question.subject }}</div>
            <div @click="handleItem" v-for="(item,index) in question.items" :key="index">
                <el-radio v-model="question.radio" :label="index" >
                    <div class="box-redio-span"> {{item.label}}</div>
                </el-radio>
                <el-input label.width="0px" v-if="item.input" style="display:inline;height:14pt"
                    :placeholder="item.placeholder"
                    v-model="item.content">
                </el-input>
            </div>
        </div>
      <!--/el-card-->
    </div>
</template>
<style>
  input.el-input__inner
  {
    display:inline;
    width:120pt;
    height:12pt;
    margin-right: 4pt;
  }
  .box-redio-span
  {
    display: inline-block;
    padding-right:12pt ;
  }
  .box-card {
    margin: 16px;
    width: 640px;
  }
</style>
<script>
export default {
  name: "IvrQuestionMaint",
  data() {
    return {
      curindex:0,
      selectnode:null,
      selectitem:null,
      questions:
      [
      {
            radio:0,
            subject:"Element如何解决v-for和v-if不能在一个标签上使用",
            items:[
                {index:2,single:true,label:"xxxx2"},
                {index:3,single:false,label:"xxxx3",input1:true,content:"--222--",placeholder:"请输入具体数据2"},
                {index:4,single:false,label:"xxxx4"},
                {index:1,single:true,label:"其他",input:true,content:"",placeholder:"请输入具体数据"},
            ]
        },
        {
            radio:0,
            subject:"Element如何解决v-for和v-if不能在一个标签上使用",
            items:[
                {index:2,single:true,label:"xxxx2"},
                {index:3,single:false,label:"xxxx3",input1:true,content:"--222--",placeholder:"请输入具体数据2"},
                {index:4,single:false,label:"xxxx4"},
                {index:1,single:true,label:"其他",input:true,content:"",placeholder:"请输入具体数据"},
            ]
        },
        {
            radio:0,
            subject:"Element如何解决v-for和v-if不能在一个标签上使用",
            items:[
                {index:2,single:true,label:"xxxx2"},
                {index:3,single:false,label:"xxxx3",input1:true,content:"--222--",placeholder:"请输入具体数据2"},
                {index:4,single:false,label:"xxxx4"},
                {index:1,single:true,label:"其他",input:true,content:"",placeholder:"请输入具体数据"},
            ]
        }
      ]
    };
  },
  methods:{
    handleRow(evt)
    {
      if(this.selectnode)this.selectnode.style.border='none'
      this.selectnode=evt.target.parentNode
      this.selectnode.style.border="#ececec solid 1px"
      if(this.selectitem)this.selectitem.style.border='none'
    },
    handleItem(evt)
    {
      if(this.selectitem!=evt.target)
      {
        if(this.selectnode != evt.target.parentNode)
        {
          if(this.selectnode)this.selectnode.style.border='none'
          this.selectnode = evt.target.parentNode
          this.selectnode.style.border="#ececec solid 1px"
        }
        if(this.selectitem)this.selectitem.style.border='none'
        this.selectitem=evt.target
        this.selectitem.style.border="blue solid 1px"
      }
    }
  }
};
</script>
ruoyi-ui/src/views/smartor/ivrquestionlib/QuestionMaint.vue
@@ -1,80 +1,21 @@
<template>
    <div>
      <div is='dw_1'/>
      <div is='dw_3'/>
      <el-card class="box-card">
        <div style="height:27pt;margin:4pt;color1:blue">{{ question.subject }}</div>
        <span v-for="(item,index) in question.items" :key="index" :inline="true">
          <el-radio v-model="radio" :label="index">
            <div class="box-redio-span"> {{item.label}}</div> </el-radio>
          <el-input :id="'xxx'+index" :inline="true" label.width="0px" v-if="item.input" style="display:inline"
              :placeholder="item.placeholder"
              v-model="item.content">
          </el-input>
        </span>
      </el-card>
      <div style="padding-left:64pt">
            <el-button>修改</el-button>
            <el-button>确认</el-button>
            <el-button>&lt;</el-button>
            <el-button>&gt;</el-button>
      </div>
      <div is='dw_topic'/>
    </div>
</template>
<style>
  input.el-input__inner
  {
    display:inline;
    width:120pt;
    margin-right: 12pt;
  }
  .box-redio-span
  {
    display: inline-block;
    padding-right:12pt ;
  }
  .box-card {
    margin: 16px;
    width: 640px;
  }
</style>
<script>
export default {
  name: "IvrQuestionMaint",
  name: "IvrTopicView",
  data() {
    return {
      //dw_2:null,
      radio:0,
      question:{
        subject:"Element如何解决v-for和v-if不能在一个标签上使用",
        items:[
          {index:2,single:true,label:"xxxx2"},
          {index:3,single:false,label:"xxxx3",input1:true,content:"--222--",placeholder:"请输入具体数据2"},
          {index:4,single:false,label:"xxxx4"},
          {index:1,single:true,label:"其他",input:true,content:"",placeholder:"请输入具体数据"},
        ]
      },
      comps: ['dw_2'],
      apps: []
     };
  },
  components:
  {
    dw_1: ()=>import("@/smartor/dataobject/dw_patarchive_list.vue"),
    dw_3: ()=>import("@/smartor/dataobject/dw_patarchive_list.vue"),
 },
    dw_topic: ()=>import("@/smartor/dataobject/dw_ivrtopic_view.vue")
  },
  methods: {
     /** åˆ é™¤æŒ‰é’®æ“ä½œ */
    handleMaint(row) {
    },
    /** ç¡®è®¤æŒ‰é’®æ“ä½œ */
    handleOk() {
     }
  }
};
</script>
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=" é—®å·ä»£ç  " 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=" é—®å·ä»£ç  " prop="svycode">
              <el-input v-model="form.svycode" placeholder="请输入 é—®å·ä»£ç  " />
            </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>
ruoyi-ui/src/views/smartor/svytitle/index0.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,347 @@
<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=" é—®å·ä»£ç  " 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>
    <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=" é—®å·ä»£ç  " prop="svycode">
              <el-input v-model="form.svycode" placeholder="请输入 é—®å·ä»£ç  " />
            </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>
  </div>
</template>
<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" }
                ],
            }
        };
    },
    created() {
        this.getList();
    },
    methods: {
        /** æŸ¥è¯¢é—®å·åˆ—表 */
        getList() {
            this.loading = true;
            listSvytitle(this.queryParams).then(response => {
                this.svytitleList = response.rows;
                this.total = response.total;
                this.loading = false;
            });
        },
        // å–消按钮
        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 = "修改问卷";
            });
        },
        /** æäº¤æŒ‰é’® */
        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`)
        },
     },
};
</script>
ruoyi-ui/src/views/smartor/svytitle/index1.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,230 @@
<template>
     <el-container>
      <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>
 </template>
<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" }
        ],
      },
      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;
      });
    },
    // å–消按钮
    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 = "修改问卷";
      });
    },
    /** æäº¤æŒ‰é’® */
    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`)
    },
    handleNodeClick(data) {
      console.log(data);
    },
   },
  components:
  {
    dw_topic: () => import("@/smartor/dataobject/dw_ivrtopic_view.vue")
  }
};
</script>