feige
2024-09-10 598fe738b22d39172b068db5309476e08481e868
ruoyi-ui/src/views/clean/index.vue
@@ -64,7 +64,20 @@
            border-radius: 6px 6px 6px 6px;opacity:1;">重置</el-button>
        </el-form-item>
      </el-form>
      <el-row :gutter="10" >
         <el-col>
    <el-input
      v-model="searchQuery"
      placeholder="搜索百度"
      clearable
      style="width: 320px;
           height: 15px;
           margin-bottom: 23px;
           opacity: 0.5;"
      @keyup.enter.native="searchBaidu"
    />
    </el-col>
</el-row>
      <el-row :gutter="10" class="mb8" v-if="userId != 2">
        <el-col :span="1.5">
          <el-button
@@ -122,53 +135,33 @@
            </el-upload>
          </el-col>
        <el-col :span="1.5">
 <el-dropdown placement="分享相关">
     <el-button size="mini"   type="primary"
                plain
                icon="el-icon-top">分享相关</el-button>
      <template #dropdown>
        <el-dropdown-menu>
          <el-dropdown-item     :disabled="multiple" icon="el-icon-top" style="height: 32px;width:240px;color: #0099ff;" @click.native="handleShare">分享</el-dropdown-item>
          <el-col :span="1.5">
            <el-button
              type="primary"
              plain
              icon="el-icon-top"
              size="mini"
              :disabled="multiple"
              @click="handleShare"
                <el-dropdown-item    icon="el-icon-top" @click.native="whoShare">分享给我的数据</el-dropdown-item>
            <el-dropdown-item    icon="el-icon-top" @click.native="handleWho">分享给谁了什么数据</el-dropdown-item>
          <el-dropdown-item    icon="el-icon-top" @click.native="showData">展示下载的分享数据</el-dropdown-item>
        </el-dropdown-menu>
      </template>
            >分享</el-button>
          </el-col>
     </el-dropdown>
          <el-col :span="1.5">
            <el-button
              type="primary"
              plain
              icon="el-icon-top"
              size="mini"
              @click="handleWho"
            >分享给谁了什么数据</el-button>
          </el-col>
</el-col>
          <el-col :span="1.5">
            <el-button
              type="primary"
              plain
              icon="el-icon-top"
              size="mini"
              @click="whoShare"
            >分享给我的数据</el-button>
          </el-col>
          <el-col :span="1.5">
            <el-button
              type="primary"
              plain
              icon="el-icon-top"
              size="mini"
              @click="showData"
            >展示下载的分享数据</el-button>
          </el-col>
        <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
        <right-toolbar :parentValue.sync="valueFromParent" :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
      </el-row>
      <el-table v-loading="loading" :data="cleanList" :row-key="getRowId" ref="multipleTable" @selection-change="handleSelectionChange" :row-class-name="tableRowClassName">
      <el-table v-loading="loading" border :data="cleanList" :row-key="getRowId" ref="multipleTable" @selection-change="handleSelectionChange" :row-class-name="tableRowClassName">
        <el-table-column type="selection" :reserve-selection="true"  width="55"  align="center" />
        <el-table-column fixed label="序号" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="80"/>
@@ -256,7 +249,8 @@
      />
      <!-- 添加或修改资产信息配置对话框 -->
      <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
      <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body     @click.native="handleDialogClick"
>
        <el-form ref="elForm" :model="formDat" :rules="rules" size="medium" label-width="100px">
            <el-form-item label="类型" prop="kind">
@@ -273,7 +267,9 @@
            </el-input>
          </el-form-item>
          <el-form-item label="时间" prop="happenTime">
            <el-date-picker v-model="formDat.happenTime" type="date" placeholder="请选择日期"
            <el-date-picker v-model="formDat.happenTime" type="date" placeholder="请选择日期"       @click.native.stop
                           ref="datePicker"
                            :editable="false" :clearable="false" :style="{width: '100%'}"  value-format="yyyy-MM-dd"
            ></el-date-picker>
          </el-form-item>
@@ -558,6 +554,8 @@
        share,shareToWho,getWhoShare,downShareData,deleteShareData,showShareData
        } from "@/api/clean/index";
import {listUserAll} from "@/api/root/index";
import {showShareUser} from "@/api/bignote/index";
// import {Message} from "element-ui";
import { Notification, MessageBox, Message, Loading } from 'element-ui'
@@ -566,7 +564,9 @@
    dicts: ['sys_normal_disable'],
    data() {
      return {
        // 分享给谁的list
        // 分享给谁的lis
      total1:0,
      searchQuery: undefined,
        listRoot: [],
        open1:false,
        open2:false,
@@ -597,7 +597,7 @@
        dateRange1: [],
        total1:0,
valueFromParent: "保洁收纳",
        userId: undefined,
        // 遮罩层
        disabled: false,
@@ -630,7 +630,7 @@
        dateRange: [],
        // 数据范围选项
      fot:['.bmp','.jpg','.jpeg','.png','.tif','.gif','.pcx','.tga','.exif','.fpx',
        '.svg','.psd','.cdr','.pcd','.dxf','.ufo','.eps','.ai','.aw','.WMF','.webp','.apng'],
        '.svg','.psd','.cdr','.pcd','.dxf','.ufo','.eps','.ai','.aw','.WMF','.webp','.apng','m4a'],
        fileList:[
        ],
@@ -728,6 +728,17 @@
    },
    methods: {
   handleDialogClick()
   {
      // 关闭日期选择器
            this.$refs.datePicker.handleClose();
   },
        searchBaidu() {
            // 打开百度搜索结果
            window.open(`https://www.baidu.com/s?wd=${encodeURIComponent(this.searchQuery)}`);
            // 清空搜索框
            this.searchQuery = '';
          },
      // 分页
      fenYe(){
        // @pagination='ifNum === 1 ? selectValue : (ifNum === 2 ? whoShare : showData)'
@@ -859,24 +870,15 @@
      },
      getList1() {
            this.loading1 = true;
            this.queryParams1.happenStartTime = this.dateRange1.length > 0 && this.dateRange1[0]
            this.queryParams1.happenEndTime = this.dateRange1.length > 0 && this.dateRange1[1]
            listUserAll(this.queryParams1).then(response => {
                this.listRoot = response.data.data;
                const kon = {}
                this.listRoot.forEach(element => {
                  kon[element['nickName']] = element['userId']
                })
                for(let i in kon){
                  this.userOptions.push({label: i,value: kon[i]})
                }
                for(let i in this.userOptions){
                  this.userList.push(this.userOptions[i].value)
                }
                console.log(this.userList,'userListuserListuserList')
                this.loading1 = false;
              }
            );
    let userId = this.$store.state.user.userId
     showShareUser(userId, 2020).then(response=>{
                console.log("===========ddddddddddddd")
                console.log(response.data)
                console.log("--------------------")
                response.data.forEach(element =>{
                    this.userOptions.push({label: element.oldName,value: element.userId})
                })
    })
          },
      // 确认分享
      subShare(row) {
@@ -958,12 +960,12 @@
      getCateInfor()
      {
        let _this = this
        getCategory().then(response=>{
        // getCategory().then(response=>{
          response.data.itemValues.replace("{","").replace("}","").split(",").map(elem=>{
            _this.typeOptions.push({"label":elem.split(":")[0], "value":elem.split(":")[0]})
          })
        })
        //   response.data.itemValues.replace("{","").replace("}","").split(",").map(elem=>{
        //     _this.typeOptions.push({"label":elem.split(":")[0], "value":elem.split(":")[0]})
        //   })
        // })
      },
      handleRemove(file) {
@@ -1215,6 +1217,7 @@
      /** 导入操作*/
      handleEnport(params){
        var file = params.file;
        console.log(params)
        var formData = new FormData();
        formData.append('excelImport', file);
        let _this = this
@@ -1222,10 +1225,10 @@
          _this.getList();
          Message({ message: "导入成功", type: 'warning' })
        }).catch(err)
        {
        }).catch(() => {
          Message({ message: "导入失败", type: 'error' })
        }
        })
      }