feige
2024-02-02 bd40473c9c634005bc7e62e7fc901bcd8b598fa0
ruoyi-ui/src/views/note/index.vue
@@ -2,16 +2,16 @@
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
      <el-form-item label="类型" prop="type">
        <el-input
          v-model="queryParams.type"
          placeholder="请输入类型"
          clearable
        <el-select v-model="queryParams.type" placeholder="请选择类别" clearable
          style="width: 200px;
                   height: 35px;
                   border-radius: 16px 16px 16px 16px;
                   opacity: 0.5;"
          @keyup.enter.native="handleQuery"
        />
                   opacity: 0.5;" allow-create
        filterable clearable :style="{width: '100%'}"  >
          <el-option v-for="(item, index) in typeOptions" :key="index" :label="item.label" :value="item.value"
          ></el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="标题" prop="title">
@@ -230,7 +230,8 @@
<!--          <el-input v-model="formDat.type" placeholder="请输入类别" clearable :style="{width: '100%'}" ></el-input>-->
<!--        </el-form-item>-->
        <el-form-item label="类别" prop="type">
          <el-select v-model="formDat.type" placeholder="请选择类别" clearable :style="{width: '100%'}"  >
          <el-select v-model="formDat.type" placeholder="请选择类别" allow-create
          filterable clearable :style="{width: '100%'}"  >
            <el-option v-for="(item, index) in typeOptions" :key="index" :label="item.label" :value="item.value"
            ></el-option>
          </el-select>
@@ -340,7 +341,8 @@
//在system/note/index.js中导入接口函数
import {listProperty,enload, getPropertyInfo, delProperty, getCategory, addProperty, uploadPic} from "@/api/note/index";
import {listProperty,enload, getPropertyInfo, delProperty, getCategory,
addProperty, uploadPic} from "@/api/note/index";
import {Message} from "element-ui";
export default {
  name: "Role",
@@ -377,7 +379,10 @@
      // 日期范围
      dateRange: [],
      // 数据范围选项
      fot:[".jpg",".jif"],
     // 数据范围选项
     fot:['.bmp','.jpg','.jpeg','.png','.tif','.gif','.pcx','.tga','.exif','.fpx',
       '.svg','.psd','.cdr','.pcd','.dxf','.ufo','.eps','.ai','.aw','.WMF','.webp','.apng'],
      fileList:[
      ],
      fileListOther:[
@@ -487,14 +492,21 @@
      this.queryParams.happenEndTime = this.dateRange.length > 0 && this.dateRange[1]
      // console.log(this.queryParams)
      let _this = this
      //  listProperty(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
      listProperty(this.queryParams).then(response => {
          //  alert(123)
          //   console.log(response.data)
          this.propertyList = response.data.data;
        if(response.msg=="您没加入到对应的家庭,请联系管理员")
        {
            _this.$modal.msgSuccess("您没加入到对应的家庭,请联系管理员");
            _this.loading = false;
        }else{
          _this.propertyList = response.data.data;
          this.total = response.data.total;
          this.loading = false;
          _this.total = response.data.total;
          _this.loading = false;
        }
        }
      );
    },
@@ -502,11 +514,16 @@
    getCateInfor()
    {
      let _this = this
      _this.typeOptions = []
      getCategory().then(response=>{
        response.data.itemValues.replace("{","").replace("}","").split(",").map(elem=>{
          _this.typeOptions.push({"label":elem.split(":")[0], "value":elem.split(":")[0]})
        console.log(response.data)
   //   alert(9801)
        response.data.map(elem=>{
          _this.typeOptions.push({"label":elem, "value":elem})
        })
        // response.data.itemValues.replace("{","").replace("}","").split(",").map(elem=>{
        //   _this.typeOptions.push({"label":elem.split(":")[0], "value":elem.split(":")[0]})
        // })
      })
    },
@@ -663,6 +680,7 @@
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      //alert(23)
      const Ids = row.id || this.ids;
      this.$modal.confirm('是否确认删除所选数据项?').then(function() {
        return delProperty(Ids);