吧家庭大事记,资产管理家庭设备,家庭小医生,通讯录的导入功能,电子文件,序号以及详情页面上传附件的预览功能,删除已经全部完成
19个文件已修改
853 ■■■■ 已修改文件
ruoyi-ui/.env.development 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/package.json 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/api/bignote/index.js 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/api/contacts/index.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/api/device/index.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/api/doctor/index.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/api/note/index.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/main.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/utils/request.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/bignote/familyeventInfo.vue 72 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/bignote/index.vue 84 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/contacts/contactsInfo.vue 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/contacts/index.vue 102 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/device/equipmentInfo.vue 98 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/device/index.vue 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/doctor/doctorInfo.vue 83 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/doctor/index.vue 94 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/note/index.vue 86 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/note/propertyInfo.vue 94 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/.env.development
@@ -9,5 +9,6 @@
VUE_APP_BASE_TRUE_API = 'http://47.93.189.255:8080/'
VUE_APP_BASE_OTHER_API = 'http://47.93.189.255:8083/'
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true
ruoyi-ui/package.json
@@ -45,6 +45,7 @@
    "file-saver": "2.0.5",
    "fuse.js": "6.4.3",
    "highlight.js": "9.18.5",
    "js-base64": "^3.7.5",
    "js-beautify": "1.13.0",
    "js-cookie": "3.0.1",
    "jsencrypt": "3.0.0-rc.1",
ruoyi-ui/src/api/bignote/index.js
@@ -62,6 +62,14 @@
    responseType: 'blob'
  })
}
//上传文件
export function enload(data) {
  return request({
    url: '/family/zfEvent/importData',
    method: 'post',
    data: data
  })
}
// //拿到类别
// export function getCategory()
@@ -72,5 +80,3 @@
//     params: {'id':22}
//   })
// }
ruoyi-ui/src/api/contacts/index.js
@@ -62,3 +62,11 @@
    responseType: 'blob'
  })
}
//上传文件
export function enload(data) {
  return request({
    url: '/zfContact/importData',
    method: 'post',
    data: data
  })
}
ruoyi-ui/src/api/device/index.js
@@ -63,6 +63,14 @@
    responseType: 'blob'
  })
}
//上传文件
export function enload(data) {
  return request({
    url: '/zfEquipment/importData',
    method: 'post',
    data: data
  })
}
// //拿到类别
// export function getCategory()
ruoyi-ui/src/api/doctor/index.js
@@ -62,3 +62,11 @@
    responseType: 'blob'
  })
}
//上传文件
export function enload(data) {
  return request({
    url: '/zfDoctor/importData',
    method: 'post',
    data: data
  })
}
ruoyi-ui/src/api/note/index.js
@@ -70,3 +70,11 @@
  })
}
//上传文件
export function enload(data) {
  return request({
    url: '/family/property/importData',
    method: 'post',
    data: data
  })
}
ruoyi-ui/src/main.js
@@ -14,6 +14,7 @@
import plugins from './plugins' // plugins
import { download } from '@/utils/request'
import './assets/icons' // icon
import './permission' // permission control
import { getDicts } from "@/api/system/dict/data";
@@ -79,10 +80,12 @@
})
Vue.config.productionTip = false
const Base64 = require('js-base64').Base64
new Vue({
  el: '#app',
  router,
  store,
  Base64,
  render: h => h(App)
})
ruoyi-ui/src/utils/request.js
@@ -100,6 +100,7 @@
      return Promise.reject('无效的会话,或者会话已过期,请重新登录。')
    } else if (code === 500) {
      Message({ message: msg, type: 'error' })
      alert(msg)
      return Promise.reject(new Error(msg))
    } else if (code === 601) {
      Message({ message: msg, type: 'warning' })
ruoyi-ui/src/views/bignote/familyeventInfo.vue
@@ -91,17 +91,48 @@
        :file-list="fileListOther"
        class="upload-demo"
        multiple
        :on-preview="handlePreview"
        list-type="picture-card"
        :on-preview="handleFileCardPreview"
        :on-remove="handleRemove"
        :http-request="requestUpload"
        :show-file-list="true"
      >
        <el-button type="primary">Click to upload</el-button>
        <template #tip>
          <div class="el-upload__tip">
          <i slot="default" class="el-icon-plus"></i>
          <div slot="file" slot-scope="{file}">
            <img
              class="el-upload-list__item-thumbnail"
              src="../../assets/401_images/401.gif"
              alt=""
              style="width: 147px; height: 147px"
              fit="cover"
            >
            <span class="el-upload-list__item-actions">
            <span
              class="el-upload-list__item-preview"
              @click="handleFileCardPreview(file)"
            >
              <i class="el-icon-zoom-in"></i>
            </span>
            <span
v-if="!disabled"
              @click="handleRemove(file)"
              class="el-upload-list__item-delete"
            >
              <i class="el-icon-download"></i>
            </span>
            <span
              v-if="!disabled"
              class="el-upload-list__item-delete"
              @click="handleRemove(file)"
            >
              <i class="el-icon-delete"></i>
            </span>
          </span>
          </div>
        </template>
      </el-upload>
@@ -114,8 +145,14 @@
    <el-dialog  :visible.sync="dialogVisible">
      <img w-full :src="dialogImageUrl" alt="Preview Image" />
    </el-dialog>
    <el-dialog  :visible.sync="dialogFileVisible">
      <a :href="desurl">显示</a>
      <iframe :src="desurl"</iframe>
    </el-dialog>
  </div>
</template>
<script>
import {getFamilyeventInfo, updateFamilyevent, uploadPic, download} from "@/api/bignote/index";
import {addRole, updateRole} from "@/api/system/role";
@@ -130,7 +167,7 @@
    return {
      cdi:"家庭大事记信息",
      udi:"家庭大事记修改",
      fot:[".jpg",".jif"],
      fot:[".jpg",".jif",".png"],
      fileList:[
      ],
      fileListOther:[
@@ -148,7 +185,10 @@
        remark: undefined,
        url: undefined,
      },
      desurl:'',
      dialogImageUrl: '',
      dialogFileUrl: '',
      dialogFileVisible:false,
      dialogVisible: false,
      disabled: false,
      rules: {
@@ -298,10 +338,24 @@
      })
    },
    handleRemoveFile(file) {
      alert(23)
      for(let i = 0; i < this.fileListOther.length; i++)
      {
        if(this.fileListOther[i].url==file.url)
          this.$delete(this.fileListOther,i);
      }
    },
    handleRemove(file) {
      alert(323)
      for(let i = 0; i < this.fileList.length; i++)
      {
        if(this.fileList[i].url==file.url)
          this.$delete(this.fileList,i);
      }
    },
    handleFileCardPreview(file){
      this.dialogFileUrl = file.url;
      const Base64 = require('js-base64').Base64
      this.desurl = process.env.VUE_APP_BASE_OTHER_API+'onlinePreview?url='+encodeURIComponent(Base64.encode(this.dialogFileUrl));
      myWindow=window.open(this.desurl,'','width=1200,height=800,top=150,left=300');
    },
    handlePictureCardPreview(file) {
      this.dialogImageUrl = file.url;
ruoyi-ui/src/views/bignote/index.vue
@@ -114,17 +114,43 @@
          v-hasPermi="['family:note:export']"
        >导出</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="warning"
          plain
          icon="el-icon-download"
          size="mini"
          @click="handleExport"
          v-hasPermi="['family:note:export']"
        >导入模板下载</el-button>
      </el-col>
      <el-col :span="1.2">
        <el-upload
          action=""
          class="upload-demo"
          :show-file-list="false"
          :http-request="handleEnport"
        >
          <el-button size="mini"   type="primary"
          plain
          icon="el-icon-plus" >导入</el-button>
        </el-upload>
      </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>
    <!-- 序号、时间、人物、地点、大事标题、电子文件、备注 -->
    <!-- 这里有个familyList数组 是在data()中定义的 -->
    <el-table v-loading="loading"  :data="familyList" @selection-change="handleSelectionChange"  :row-class-name="tableRowClassName">
      <el-table-column type="selection" width="55"  align="center" />
      <el-table-column label="序号" prop="id" sortable width="120" />
      <el-table-column label="时间" align="center" sortable prop="createTime" width="180">
  <el-table-column  label="序号" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="120"/>
      <el-table-column label="发生时间" align="center" sortable prop="happenTime" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.createTime) }}</span>
          <span>{{ parseTime(scope.row.happenTime) }}</span>
        </template>
      </el-table-column>
      <el-table-column label="人物" prop="people" sortable width="100" />
@@ -132,8 +158,28 @@
      <el-table-column label="大事标题" prop="title" sortable :show-overflow-tooltip="true" width="150" />
      <el-table-column label="备注" prop="remark" sortable width="100" />
      <!-- <el-table-colum label="电子文件" prop="url" sortable width="100"/> -->
      <el-table-column label="家庭号" prop="familyId" sortable width="100" />
      <el-table-column label="电子文件" prop="url" width="160" >
           <template slot-scope="scope" >
             <img
               class="el-upload-list__item-thumbnail"
               src="../../assets/images/deviceLis.png"
               alt=""
               style="width: 35px; height: 35px;"
               fit="cover"
                v-if="scope.row.url !== null"
             >
      <img
               class="el-upload-list__item-thumbnail"
               src="../../assets/images/deviceA.png"
               alt=""
               style="width: 35px; height: 35px;"
               fit="cover"
                v-if="scope.row.url === null"
             >
           </template>
        </el-table-column>
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
        <template slot-scope="scope" v-if="scope.row.roleId !== 1">
          <el-button
@@ -252,7 +298,7 @@
      <h4 class="form-header"> </h4>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitDataScope">确 定</el-button>
        <el-button type="primary" @click="submitDataScope">保 存</el-button>
        <el-button @click="cancelData">取 消</el-button>
      </div>
    </el-dialog>
@@ -272,9 +318,10 @@
import { treeselect as menuTreeselect, roleMenuTreeselect } from "@/api/system/menu";
import { Notification, MessageBox, Message, Loading } from 'element-ui'
//在system/note/index.js中导入接口函数  --接好了
import {listFamilyevent , getFamilyeventInfo , delFamilyevent  , addFamilyevent , uploadPic} from "@/api/bignote/index";
import {listFamilyevent,enload, getFamilyeventInfo , delFamilyevent  , addFamilyevent , uploadPic} from "@/api/bignote/index";
export default {
  name: "Role",
  dicts: ['sys_normal_disable'],
@@ -339,7 +386,8 @@
        title:undefined,
        people:undefined,
        address:undefined,
        createTime:undefined
        happenStartTime:undefined,
        happenEndTime:undefined
      },
      // 表单参数
      form: {},
@@ -407,10 +455,14 @@
    getList() {
      this.loading = true;
      console.log(this.queryParams)
      this.queryParams.happenStartTime = this.dateRange.length > 0 && this.dateRange[0]
      this.queryParams.happenEndTime = this.dateRange.length > 0 && this.dateRange[1]
      //  listProperty(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
      listFamilyevent(this.queryParams).then(response => {
          //  alert(123)
          //   console.log(response.data)
          //   console.log(response.data.data)
         // alert(response.data.data[1].url)
          this.familyList = response.data.data;
          this.total = response.data.total;
@@ -561,6 +613,22 @@
      this.download('/family/zfEvent/export', {
        ...this.queryParams
      }, `zfEvent_${new Date().getTime()}.xlsx`)
    },
    /** 导入操作*/
    handleEnport(params){
    var file = params.file;
    var formData = new FormData();
    formData.append('excelImport', file);
    let _this = this
    enload(formData).then(response => {
       _this.getList();
      Message({ message: "导入成功", type: 'warning' })
    }).catch(err)
    {
      Message({ message: "导入失败", type: 'error' })
    }
    }
  }
};
ruoyi-ui/src/views/contacts/contactsInfo.vue
@@ -98,26 +98,7 @@
        </div>
      </el-upload>
      <h4 class="form-header">其他附件 </h4>
      <el-upload
        action=""
        :file-list="fileListOther"
        class="upload-demo"
        multiple
        :on-preview="handlePreview"
        :on-remove="handleRemove"
        :http-request="requestUpload"
        :show-file-list="true"
      >
        <el-button type="primary">点击上传</el-button>
        <template #tip>
          <div class="el-upload__tip">
          </div>
        </template>
      </el-upload>
      <el-form-item size="large">
        <el-button type="primary" @click="submitForm" :disabled="dsb">修改</el-button>
ruoyi-ui/src/views/contacts/index.vue
@@ -40,18 +40,7 @@
          <i slot="prefix" class="el-input__icon el-icon-search"></i>
        </el-input>
      </el-form-item>
      <el-cntainer>
        <el-col :span="9" >
         <el-form-item>
          <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"
                     style=" width: 65px; height: 32px;background: #FFDDE3;
          border-radius: 6px 6px 6px 6px;opacity:1;">搜索</el-button>
          <el-button icon="el-icon-refresh" size="mini" @click="resetQuery" style=" width: 65px; height: 32px;background: #FFDDE3;
          border-radius: 6px 6px 6px 6px;opacity:1; " >重置</el-button>
         </el-form-item>
        </el-col>
      </el-cntainer>
        <el-form-item label="姓名" prop="name">
          <el-input
            v-model="queryParams.name"
@@ -73,7 +62,14 @@
            <i slot="prefix" class="el-input__icon el-icon-search"></i>
          </el-input>
        </el-form-item>
   <el-form-item>
          <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"
                     style=" width: 65px; height: 32px;background: #FFDDE3;
          border-radius: 6px 6px 6px 6px;opacity:1;">搜索</el-button>
          <el-button icon="el-icon-refresh" size="mini" @click="resetQuery" style=" width: 65px; height: 32px;background: #FFDDE3;
          border-radius: 6px 6px 6px 6px;opacity:1; " >重置</el-button>
         </el-form-item>
    </el-form>
    <div>
      <div style="width: 72px;
@@ -117,12 +113,41 @@
          @click="handleExport"
          v-hasPermi="['family:note:export']"
        >导出</el-button>
      </el-col>
              </el-col>
        <el-col :span="1.5">
          <el-button
            type="warning"
            plain
            icon="el-icon-download"
            size="mini"
            @click="handleExport"
            v-hasPermi="['family:note:export']"
          >导入模板下载</el-button>
        </el-col>
        <el-col :span="1.2">
          <el-upload
            action=""
            class="upload-demo"
            :show-file-list="false"
            :http-request="handleEnport"
          >
            <el-button size="mini"   type="primary"
            plain
            icon="el-icon-plus" >导入</el-button>
          </el-upload>
        </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>
  </div>
    <el-table v-loading="loading" :data="contactList"  @selection-change="handleSelectionChange">
      <el-table-column type="selection" width="25"  align="center" />
      <el-table-column  label="序号" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="80"/>
      <el-table-column label="成员姓名" prop="myName" sortable width="100" >
        <template slot-scope="scope">
          <div>
@@ -156,14 +181,35 @@
          <span v-if="scope.row.isAlways== null">——</span>
        </template>
      </el-table-column>
      <el-table-column label="电子名片" prop="url" align="center" sortable  width="180">
        <template slot-scope="scope">
          <el-image style="width: 100px; height: 100px" :src="'http://47.93.189.255:8080/'+ scope.row.url" fit="cover"></el-image>
        </template>
      </el-table-column>
      <el-table-column label="备注(是否存在金钱关系)" prop="remark" sortable width="120" >
      <el-table-column label="备注(是否存在金钱关系)" prop="remark" sortable width="200" >
        <template slot-scope="scope">{{scope.row.remark? scope.row.remark: '————'}}</template>
      </el-table-column>
      <el-table-column label="电子名片" prop="url" width="160" >
           <template slot-scope="scope" >
             <img
               class="el-upload-list__item-thumbnail"
               src="../../assets/images/deviceLis.png"
               alt=""
               style="width: 35px; height: 35px;"
               fit="cover"
                v-if="scope.row.url !== null"
             >
      <img
               class="el-upload-list__item-thumbnail"
               src="../../assets/images/deviceA.png"
               alt=""
               style="width: 35px; height: 35px;"
               fit="cover"
                v-if="scope.row.url === null"
             >
           </template>
        </el-table-column>
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
        <template slot-scope="scope" v-if="scope.row.roleId !== 1">
          <el-button
@@ -327,10 +373,10 @@
import { listRole, getRole, delRole, addRole, updateRole, dataScope, changeRoleStatus, deptTreeSelect } from "@/api/system/role";
import { treeselect as menuTreeselect, roleMenuTreeselect } from "@/api/system/menu";
import { Notification, MessageBox, Message, Loading } from 'element-ui'
//导入接口函数
import {getContactList, getContactIdList, addContact,updateContact, delContact,uploadPic} from "@/api/contacts/index";
import {getContactList,enload, getContactIdList, addContact,updateContact, delContact,uploadPic} from "@/api/contacts/index";
export default {
  name: "index",
  dicts: ['sys_normal_disable'],
@@ -682,6 +728,22 @@
      this.download('zfContact/export', {
        ...this.queryParams
      }, `zfContact_${new Date().getTime()}.xlsx`)
    },
    /** 导入操作*/
    handleEnport(params){
    var file = params.file;
    var formData = new FormData();
    formData.append('excelImport', file);
    let _this = this
    enload(formData).then(response => {
       _this.getList();
      Message({ message: "导入成功", type: 'warning' })
    }).catch(err)
    {
      Message({ message: "导入失败", type: 'error' })
    }
    }
  }
};
ruoyi-ui/src/views/device/equipmentInfo.vue
@@ -19,8 +19,8 @@
        <el-form-item label="设备名称" prop="name">
          <el-input v-model="formData.name" placeholder="请输入设备名称" clearable :style="{width: '100%'}" :disabled="dsb"></el-input>
        </el-form-item>
        <el-form-item label="时间" prop="createDate">
          <el-input v-model="formData.createDate" placeholder="请输入时间" clearable :style="{width: '100%'}" :disabled="dsb">
        <el-form-item label="时间" prop="happenTime">
          <el-input v-model="formData.happenTime" placeholder="请输入时间" clearable :style="{width: '100%'}" :disabled="dsb">
          </el-input>
        </el-form-item>
        <el-form-item label="购买人" prop="buyer">
@@ -92,25 +92,57 @@
        </el-upload>
        <h4 class="form-header">其他附件 </h4>
        <el-upload
          action=""
          :file-list="fileListOther"
          class="upload-demo"
          multiple
          :on-preview="handlePreview"
      <el-upload
              action=""
              :file-list="fileListOther"
              class="upload-demo"
              multiple
              list-type="picture-card"
              :on-preview="handleFileCardPreview"
              :on-remove="handleRemove"
              :http-request="requestUpload"
              :show-file-list="true"
            >
          :on-remove="handleRemove"
          :http-request="requestUpload"
          :show-file-list="true"
        >
          <el-button type="primary">上传附件</el-button>
          <template #tip>
            <div class="el-upload__tip">
            </div>
          </template>
                <i slot="default" class="el-icon-plus"></i>
                <div slot="file" slot-scope="{file}">
                  <img
                    class="el-upload-list__item-thumbnail"
                    src="../../assets/401_images/401.gif"
                    alt=""
                    style="width: 147px; height: 147px"
                    fit="cover"
                  >
                  <span class="el-upload-list__item-actions">
                  <span
                    class="el-upload-list__item-preview"
                    @click="handleFileCardPreview(file)"
                  >
                    <i class="el-icon-zoom-in"></i>
                  </span>
                  <span
      v-if="!disabled"
                    @click="handleRemove(file)"
                    class="el-upload-list__item-delete"
                  >
                    <i class="el-icon-download"></i>
                  </span>
                  <span
                    v-if="!disabled"
                    class="el-upload-list__item-delete"
                    @click="handleRemoveFile(file)"
                  >
                    <i class="el-icon-delete"></i>
                  </span>
                </span>
        </el-upload>
                </div>
            </el-upload>
        <el-form-item size="large">
          <el-button type="primary" @click="submitForm" :disabled="dsb">修改</el-button>
@@ -154,7 +186,9 @@
          remark: undefined,
          familyId:undefined,
          url: undefined,
          happenTime:undefined
        },
        desurl:'',
        dialogImageUrl: '',
        dialogVisible: false,
        disabled: false,
@@ -164,7 +198,7 @@
          //   message: '请输入id',
          //   trigger: 'blur'
          // }],
          createDate: [{
          happenTime: [{
            required: true,
            message: '请选择时间',
            trigger: 'change'
@@ -312,12 +346,26 @@
          saveAs(blob, filename)
        })
      },
      handleRemoveFile(file) {
        alert(23)
      },
      handleRemove(file) {
        alert(323)
      },
  handleRemoveFile(file) {
    for(let i = 0; i < this.fileListOther.length; i++)
    {
      if(this.fileListOther[i].url==file.url)
        this.$delete(this.fileListOther,i);
    }
  },
  handleRemove(file) {
    for(let i = 0; i < this.fileList.length; i++)
    {
      if(this.fileList[i].url==file.url)
        this.$delete(this.fileList,i);
    }
  },
  handleFileCardPreview(file){
    this.dialogFileUrl = file.url;
    const Base64 = require('js-base64').Base64
    this.desurl = process.env.VUE_APP_BASE_OTHER_API+'onlinePreview?url='+encodeURIComponent(Base64.encode(this.dialogFileUrl));
    var myWindow=window.open(this.desurl,'','width=1200,height=800,top=150,left=300');
  },
      handlePictureCardPreview(file) {
        this.dialogImageUrl = file.url;
        this.dialogVisible = true;
ruoyi-ui/src/views/device/index.vue
@@ -84,18 +84,44 @@
          v-hasPermi="['family:note:export']"
        >导出</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="warning"
          plain
          icon="el-icon-download"
          size="mini"
          @click="handleExport"
          v-hasPermi="['family:note:export']"
        >导入模板下载</el-button>
      </el-col>
      <el-col :span="1.2">
        <el-upload
          action=""
          class="upload-demo"
          :show-file-list="false"
          :http-request="handleEnport"
        >
          <el-button size="mini"   type="primary"
          plain
          icon="el-icon-plus" >导入</el-button>
        </el-upload>
      </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>
    <!-- 序号、设备名称、时间、购买人、事项内容、存放地点、电子文件、备注 操作-->
    <!-- 这里有个familyList数组 是在data()中定义的 -->
    <el-table v-loading="loading" :data="equipmentList"  @selection-change="handleSelectionChange" :row-class-name="tableRowClassName" style="background: #FFEFF2;  border-radius: 14px 14px 14px 14px;">
      <el-table-column type="selection" width="55"  align="center" />
      <el-table-column label="序号" prop="id" sortable width="120" />
      <el-table-column  label="序号" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="120"/>
      <el-table-column label="设备名称" prop="name" sortable width="120" />
      <el-table-column label="时间" align="center" sortable prop="createDate" width="180">
      <el-table-column label="时间" align="center" sortable prop="happenTime" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.createDate) }}</span>
          <span>{{ parseTime(scope.row.happenTime) }}</span>
        </template>
      </el-table-column>
@@ -103,8 +129,27 @@
      <el-table-column label="事项内容" prop="content" sortable :show-overflow-tooltip="true" width="150" />
      <el-table-column label="存放地点" prop="location" sortable width="100" />
      <el-table-column label="备注" prop="remark" sortable width="100" />
      <el-table-column label="电子文件" prop="url" sortable width="180" />
      <el-table-column label="家庭号" prop="familyId" sortable width="100" />
      <el-table-column label="电子文件" prop="url" width="160" >
           <template slot-scope="scope" >
             <img
               class="el-upload-list__item-thumbnail"
               src="../../assets/images/deviceLis.png"
               alt=""
               style="width: 35px; height: 35px;"
               fit="cover"
                v-if="scope.row.url !== null"
             >
      <img
               class="el-upload-list__item-thumbnail"
               src="../../assets/images/deviceA.png"
               alt=""
               style="width: 35px; height: 35px;"
               fit="cover"
                v-if="scope.row.url === null"
             >
           </template>
        </el-table-column>
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
        <template slot-scope="scope" v-if="scope.row.roleId !== 1">
          <el-button
@@ -261,7 +306,7 @@
//在system/note/index.js中导入接口函数  --接好了
import {listEquipment,getEquipmentInfo,delEquipment, addEquipment, uploadPic} from "@/api/device/index";
import {listEquipment,enload,delEquipment, addEquipment, uploadPic} from "@/api/device/index";
export default {
  name: "Role",
  dicts: ['sys_normal_disable'],
@@ -558,6 +603,22 @@
      this.download('/zfEquipment/export', {
        ...this.queryParams
      }, `zfEquiment_${new Date().getTime()}.xlsx`)
    },
    /** 导入操作*/
    handleEnport(params){
    var file = params.file;
    var formData = new FormData();
    formData.append('excelImport', file);
    let _this = this
    enload(formData).then(response => {
       _this.getList();
      Message({ message: "导入成功", type: 'warning' })
    }).catch(err)
    {
      Message({ message: "导入失败", type: 'error' })
    }
    }
  }
};
ruoyi-ui/src/views/doctor/doctorInfo.vue
@@ -92,25 +92,56 @@
      </el-upload>
      <h4 class="form-header">其他附件 </h4>
      <el-upload
        action=""
        :file-list="fileListOther"
        class="upload-demo"
        multiple
        :on-preview="handlePreview"
    <el-upload
            action=""
            :file-list="fileListOther"
            class="upload-demo"
            multiple
            list-type="picture-card"
            :on-preview="handleFileCardPreview"
            :on-remove="handleRemove"
            :http-request="requestUpload"
            :show-file-list="true"
          >
        :on-remove="handleRemove"
        :http-request="requestUpload"
        :show-file-list="true"
      >
        <el-button type="primary">点击上传</el-button>
        <template #tip>
          <div class="el-upload__tip">
          </div>
        </template>
              <i slot="default" class="el-icon-plus"></i>
              <div slot="file" slot-scope="{file}">
                <img
                  class="el-upload-list__item-thumbnail"
                  src="../../assets/401_images/401.gif"
                  alt=""
                  style="width: 147px; height: 147px"
                  fit="cover"
                >
                <span class="el-upload-list__item-actions">
                <span
                  class="el-upload-list__item-preview"
                  @click="handleFileCardPreview(file)"
                >
                  <i class="el-icon-zoom-in"></i>
                </span>
                <span
    v-if="!disabled"
                  @click="handleRemove(file)"
                  class="el-upload-list__item-delete"
                >
                  <i class="el-icon-download"></i>
                </span>
                <span
                  v-if="!disabled"
                  class="el-upload-list__item-delete"
                  @click="handleRemoveFile(file)"
                >
                  <i class="el-icon-delete"></i>
                </span>
              </span>
      </el-upload>
              </div>
          </el-upload>
      <el-form-item size="large">
        <el-button type="primary" @click="submitForm" :disabled="dsb">修改</el-button>
@@ -137,7 +168,7 @@
    return {
      cdi:"就医记录详细信息",
      udi:"就医记录信息详情",
      fot:[".jpg",".jif"],
      fot:[".jpg",".jif","png"],
      fileList:[
      ],
      fileListOther:[
@@ -314,10 +345,24 @@
      })
    },
    handleRemoveFile(file) {
      alert(23)
      for(let i = 0; i < this.fileListOther.length; i++)
      {
        if(this.fileListOther[i].url==file.url)
          this.$delete(this.fileListOther,i);
      }
    },
    handleRemove(file) {
      alert(323)
      for(let i = 0; i < this.fileList.length; i++)
      {
        if(this.fileList[i].url==file.url)
          this.$delete(this.fileList,i);
      }
    },
    handleFileCardPreview(file){
      this.dialogFileUrl = file.url;
      const Base64 = require('js-base64').Base64
      this.desurl = process.env.VUE_APP_BASE_OTHER_API+'onlinePreview?url='+encodeURIComponent(Base64.encode(this.dialogFileUrl));
      myWindow=window.open(this.desurl,'','width=1200,height=800,top=150,left=300');
    },
    handlePictureCardPreview(file) {
      this.dialogImageUrl = file.url;
ruoyi-ui/src/views/doctor/index.vue
@@ -73,17 +73,9 @@
          <i slot="prefix" class="el-input__icon el-icon-search"></i>
        </el-input>
      </el-form-item>
      <el-cntainer>
        <el-col :span="9" >
          <el-form-item>
            <el-button type="primary" icon="el-icon-search" size="mini" style=" width: 65px; height: 32px;background: #FFDDE3;
          border-radius: 6px 6px 6px 6px;opacity:1; " @click="handleQuery">搜索</el-button>
            <el-button icon="el-icon-refresh" size="mini" style=" width: 65px; height: 32px;background: #FFDDE3;
          border-radius: 6px 6px 6px 6px;opacity:1; " @click="resetQuery">重置</el-button>
          </el-form-item>
        </el-col>
      </el-cntainer>
      <el-form-item label="处方" prop="cmedical">
        <el-input
          v-model="queryParams.cmedical"
@@ -105,7 +97,13 @@
          <i slot="prefix" class="el-input__icon el-icon-search"></i>
        </el-input>
      </el-form-item>
       <el-form-item>
            <el-button type="primary" icon="el-icon-search" size="mini" style=" width: 65px; height: 32px;background: #FFDDE3;
          border-radius: 6px 6px 6px 6px;opacity:1; " @click="handleQuery">搜索</el-button>
            <el-button icon="el-icon-refresh" size="mini" style=" width: 65px; height: 32px;background: #FFDDE3;
          border-radius: 6px 6px 6px 6px;opacity:1; " @click="resetQuery">重置</el-button>
          </el-form-item>
    </el-form>
    <div>
      <div style="width: 100px;
@@ -150,13 +148,37 @@
            v-hasPermi="['family:note:export']"
          >导出</el-button>
        </el-col>
        <el-col :span="1.5">
          <el-button
            type="warning"
            plain
            icon="el-icon-download"
            size="mini"
            @click="handleExport"
            v-hasPermi="['family:note:export']"
          >导入模板下载</el-button>
        </el-col>
        <el-col :span="1.2">
          <el-upload
            action=""
            class="upload-demo"
            :show-file-list="false"
            :http-request="handleEnport"
          >
            <el-button size="mini"   type="primary"
            plain
            icon="el-icon-plus" >导入</el-button>
          </el-upload>
        </el-col>
        <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
      </el-row>
    </div>
    <el-table v-loading="loading" :data="doctorList" @selection-change="handleSelectionChange">
      <el-table-column type="selection" width="25"  align="center" />
      <el-table-column label="序号" prop="id" sortable width="80" />
      <el-table-column label="类型" prop="type" sortable width="80">
<el-table-column  label="序号" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="120"/>      <el-table-column label="类型" prop="type" sortable width="80">
        <template slot-scope="scope">{{scope.row.type? scope.row.type: '————'}}</template>
      </el-table-column>
      <el-table-column label="症状" prop="symptom" sortable :show-overflow-tooltip="true" width="80" >
@@ -174,17 +196,35 @@
      <el-table-column label="功效" prop="effect" sortable width="80" >
        <template slot-scope="scope">{{scope.row.effect? scope.row.effect: '————'}}</template>
      </el-table-column>
      <el-table-column label="电子文件" prop="url" align="center" sortable  width="110">
      <template slot-scope="scope">
        <el-image style="width: 100px; height: 100px" :src="'http://47.93.189.255:8080/'+ scope.row.url" fit="cover"></el-image>
      </template>
    </el-table-column>
      <el-table-column label="适用人" prop="suitable" sortable width="110" >
        <template slot-scope="scope">{{scope.row.suitable? scope.row.suitable: '————'}}</template>
      </el-table-column>
      <el-table-column label="备注" prop="remark" sortable width="120" >
        <template slot-scope="scope">{{scope.row.remark? scope.row.remark: '————'}}</template>
          <template slot-scope="scope">{{scope.row.remark? scope.row.remark: '————'}}</template>
          </el-table-column>
        <el-table-column label="电子文件" prop="url" width="160" >
             <template slot-scope="scope" >
               <img
                 class="el-upload-list__item-thumbnail"
                 src="../../assets/images/deviceLis.png"
                 alt=""
                 style="width: 35px; height: 35px;"
                 fit="cover"
                  v-if="scope.row.url !== null"
               >
        <img
                 class="el-upload-list__item-thumbnail"
                 src="../../assets/images/deviceA.png"
                 alt=""
                 style="width: 35px; height: 35px;"
                 fit="cover"
                  v-if="scope.row.url === null"
               >
             </template>
          </el-table-column>
      </el-table-column>
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
        <template slot-scope="scope" v-if="scope.row.roleId !== 1">
@@ -343,9 +383,9 @@
//导入接口函数
import {listDoctor, getDoctor, addDoctor,updateDoctor, delDoctor,uploadPic} from "@/api/doctor/index";
import {listDoctor,enload,getDoctor, addDoctor,updateDoctor, delDoctor,uploadPic} from "@/api/doctor/index";
import { Notification, MessageBox, Message, Loading } from 'element-ui'
export default {
  name: "index",
  dicts: ['sys_normal_disable'],
@@ -667,6 +707,20 @@
      this.download('zfDoctor/export', {
        ...this.queryParams
      }, `zfDoctor_${new Date().getTime()}.xlsx`)
    },
    /** 导入操作*/
    handleEnport(params){
    var file = params.file;
    var formData = new FormData();
    formData.append('excelImport', file);
    let _this = this
    enload(formData).then(response => {
       _this.getList();
      Message({ message: "导入成功", type: 'warning' })
    }).catch(() => { Message({ message: "导入失败", type: 'error' })});
    }
  }
};
ruoyi-ui/src/views/note/index.vue
@@ -52,11 +52,11 @@
          />
        </el-form-item>
      </el-form-item>
      <el-form-item label="创建时间">
      <el-form-item label="发生时间">
        <el-date-picker
          v-model="dateRange"
          style="width: 240px"
          value-format="yyyy-MM-dd HH-MM"
          value-format="yyyy-MM-dd HH-MM-SS"
          type="daterange"
          range-separator="-"
          start-placeholder="开始日期"
@@ -103,13 +103,40 @@
          @click="handleExport"
          v-hasPermi="['family:note:export']"
        >导出</el-button>
      </el-col>
   </el-col>
        <el-col :span="1.5">
          <el-button
            type="warning"
            plain
            icon="el-icon-download"
            size="mini"
            @click="handleExport"
            v-hasPermi="['family:note:export']"
          >导入模板下载</el-button>
        </el-col>
        <el-col :span="1.2">
          <el-upload
            action=""
            class="upload-demo"
            :show-file-list="false"
            :http-request="handleEnport"
          >
            <el-button size="mini"   type="primary"
            plain
            icon="el-icon-plus" >导入</el-button>
          </el-upload>
        </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>
    <el-table v-loading="loading" :data="propertyList" @selection-change="handleSelectionChange" :row-class-name="tableRowClassName">
      <el-table-column type="selection" width="55"  align="center" />
      <el-table-column label="资产编号" prop="id" sortable width="120" />
      <el-table-column  label="序号" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="120"/>
      <el-table-column label="类型" prop="type" sortable :show-overflow-tooltip="true" width="150" />
      <el-table-column label="标题" prop="title" sortable :show-overflow-tooltip="true" width="150" />
      <el-table-column label="存储地址" prop="location" sortable width="100" />
@@ -117,13 +144,32 @@
      <el-table-column label="具体位置" prop="address" sortable width="100" />
      <el-table-column label="备注信息" prop="remark" sortable width="100" />
      <el-table-column label="家庭号" prop="familyId" sortable width="100" />
      <el-table-column label="创建时间" align="center" sortable prop="createTime" width="180">
      <el-table-column label="发生时间" align="center" sortable prop="happenTime" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.createTime) }}</span>
          <span>{{ parseTime(scope.row.happenTime) }}</span>
        </template>
      </el-table-column>
      <el-table-column label="电子文件" prop="url" width="160" >
           <template slot-scope="scope" >
             <img
               class="el-upload-list__item-thumbnail"
               src="../../assets/images/deviceLis.png"
               alt=""
               style="width: 35px; height: 35px;"
               fit="cover"
                v-if="scope.row.url !== null"
             >
      <img
               class="el-upload-list__item-thumbnail"
               src="../../assets/images/deviceA.png"
               alt=""
               style="width: 35px; height: 35px;"
               fit="cover"
                v-if="scope.row.url === null"
             >
           </template>
        </el-table-column>
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
        <template slot-scope="scope" v-if="scope.row.roleId !== 1">
          <el-button
@@ -271,7 +317,7 @@
//在system/note/index.js中导入接口函数
import {listProperty, getPropertyInfo, delProperty, getCategory, addProperty, uploadPic} from "@/api/note/index";
import {listProperty,enload, getPropertyInfo, delProperty, getCategory, addProperty, uploadPic} from "@/api/note/index";
export default {
  name: "Role",
  dicts: ['sys_normal_disable'],
@@ -338,8 +384,8 @@
        location:undefined,
        holder:undefined,
        address:undefined,
        createTime:undefined,
        happenStartTime:undefined,
        happenEndTime:undefined
      },
      // 表单参数
      form: {},
@@ -412,6 +458,9 @@
    /** 查询角色列表 */
    getList() {
      this.loading = true;
      this.queryParams.happenStartTime = this.dateRange.length > 0 && this.dateRange[0]
      this.queryParams.happenEndTime = this.dateRange.length > 0 && this.dateRange[1]
      // console.log(this.queryParams)
      //  listProperty(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
      listProperty(this.queryParams).then(response => {
@@ -579,6 +628,23 @@
      this.download('family/property/export', {
        ...this.queryParams
      }, `property_${new Date().getTime()}.xlsx`)
    },
    /** 导入操作*/
    handleEnport(params){
    var file = params.file;
    var formData = new FormData();
    formData.append('excelImport', file);
    let _this = this
    alert(file)
    enload(formData).then(response => {
       _this.getList();
      Message({ message: "导入成功", type: 'warning' })
    }).catch(err)
    {
      Message({ message: "导入失败", type: 'error' })
    }
    }
  }
};
ruoyi-ui/src/views/note/propertyInfo.vue
@@ -81,25 +81,56 @@
    </el-upload>
      <h4 class="form-header">其他附件 </h4>
      <el-upload
        action=""
        :file-list="fileListOther"
        class="upload-demo"
        multiple
        :on-preview="handlePreview"
    <el-upload
            action=""
            :file-list="fileListOther"
            class="upload-demo"
            multiple
            list-type="picture-card"
            :on-preview="handleFileCardPreview"
            :on-remove="handleRemove"
            :http-request="requestUpload"
            :show-file-list="true"
          >
        :on-remove="handleRemove"
        :http-request="requestUpload"
        :show-file-list="true"
      >
        <el-button type="primary">Click to upload</el-button>
        <template #tip>
          <div class="el-upload__tip">
          </div>
        </template>
              <i slot="default" class="el-icon-plus"></i>
              <div slot="file" slot-scope="{file}">
                <img
                  class="el-upload-list__item-thumbnail"
                  src="../../assets/401_images/401.gif"
                  alt=""
                  style="width: 147px; height: 147px"
                  fit="cover"
                >
                <span class="el-upload-list__item-actions">
                <span
                  class="el-upload-list__item-preview"
                  @click="handleFileCardPreview(file)"
                >
                  <i class="el-icon-zoom-in"></i>
                </span>
                <span
    v-if="!disabled"
                  @click="handleRemove(file)"
                  class="el-upload-list__item-delete"
                >
                  <i class="el-icon-download"></i>
                </span>
                <span
                  v-if="!disabled"
                  class="el-upload-list__item-delete"
                  @click="handleRemove(file)"
                >
                  <i class="el-icon-delete"></i>
                </span>
              </span>
      </el-upload>
              </div>
          </el-upload>
      <el-form-item size="large">
        <el-button type="primary" @click="submitForm" :disabled="dsb">修改</el-button>
@@ -125,7 +156,7 @@
    return {
      cdi:"资产详细信息",
      udi:"资产信息修改",
      fot:[".jpg",".jif"],
      fot:[".jpg",".jif",".png"],
      fileList:[
      ],
      fileListOther:[
@@ -143,6 +174,7 @@
        remark: undefined,
        url: undefined,
      },
       desurl:'',
        dialogImageUrl: '',
        dialogVisible: false,
        disabled: false,
@@ -275,6 +307,12 @@
    resetForm() {
      this.$refs['elForm'].resetFields()
    },
    handleFileCardPreview(file){
      this.dialogFileUrl = file.url;
      const Base64 = require('js-base64').Base64
      this.desurl = process.env.VUE_APP_BASE_OTHER_API+'onlinePreview?url='+encodeURIComponent(Base64.encode(this.dialogFileUrl));
      myWindow=window.open(this.desurl,'','width=1200,height=800,top=150,left=300');
    },
    handlePreview(file)
    {
      let formData = {'path':"/"+file.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")};
@@ -289,10 +327,18 @@
      })
    },
    handleRemoveFile(file) {
      alert(23)
      for(let i = 0; i < this.fileListOther.length; i++)
      {
        if(this.fileListOther[i].url==file.url)
          this.$delete(this.fileListOther,i);
      }
    },
    handleRemove(file) {
      alert(323)
      for(let i = 0; i < this.fileList.length; i++)
      {
        if(this.fileList[i].url==file.url)
          this.$delete(this.fileList,i);
      }
      },
      handlePictureCardPreview(file) {
        this.dialogImageUrl = file.url;
@@ -325,16 +371,12 @@
      uploadPic(formData).then(response => {
        let pth = response.data.originalFilename.substr(response.data.originalFilename.length-4, response.data.originalFilename.length)
        if(_this.fot.includes(pth) === true)
        if(_this.fot.indexOf(pth) !== -1)
        {
          _this.fileList.push({name:response.data.fileName, "url":response.data.url})
          _this.fileList.push({"name":response.data.fileName, "url":response.data.url})
        }
        else{
          _this.fileListOther.push({name:response.data.fileName, url:response.data.url})
          _this.fileListOther.push({"name":response.data.fileName, "url":response.data.url})
        }
      })