主要修改了petInfo里面的查看饲养人的接口,还有修改了查看备忘录接口和显示部分
2个文件已修改
125 ■■■■ 已修改文件
ruoyi-ui/src/api/pet/index.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/views/pet/petInfo.vue 124 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-ui/src/api/pet/index.js
@@ -48,6 +48,7 @@
  //根据宠物id查询主人信息
  export function getPetowner(id) {
    alert(id)
    return request({
      url: '/zfMaster/' + id,
      method: 'get',
ruoyi-ui/src/views/pet/petInfo.vue
@@ -3,7 +3,7 @@
    <div class="form-header mt">
      <h4 class="dt h4">基本信息 </h4>
      <el-button type="primary" class="pt"  icon="el-icon-edit" @click="handleEdit()" :disabled="btn">编辑</el-button>
      <el-button type="primary"  @click="Petnote(id)" :disabled="btn">魅宠备忘录</el-button>
      <el-button type="primary"  @click="Petnote(pid)" :disabled="btn">魅宠备忘录</el-button>
    </div>
    <h2 style="width: 100px;height: 16px;font-size: 15px;font-family: Microsoft YaHei-Regular, Microsoft YaHei;font-weight: 400;color: #000000;line-height: 15px;">基本信息</h2>
    <el-container >
@@ -209,10 +209,61 @@
    <el-dialog  :visible.sync="dialogVisible">
      <img w-full :src="dialogImageUrl" alt="Preview Image" />
    </el-dialog>
    <el-dialog :title="title" :visible.sync="openDataScope" width="1000px" append-to-body>
        <el-table v-loading="loading" :data="PetNoteList" @selection-change="handleSelectionChange" :row-class-name="tableRowClassName">
          <el-table-column type="selection" width="55"  align="center" />
          <el-table-column  label="序号" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="120"/>
          <el-table-column label="题名" prop="title" sortable :show-overflow-tooltip="true" width="150" />
          <el-table-column label="提醒时间" prop="remindTime" sortable :show-overflow-tooltip="true" width="150" />
         <el-table-column label="记录时间" prop="createTime" sortable :show-overflow-tooltip="true" width="150" />
          <el-table-column label="备注" prop="remark" sortable width="100" />
          <!-- <el-table-column label="主人姓名" prop="holder" sortable width="100" /> -->
          <!-- <el-table-column label="家庭号" prop="familyId" sortable width="100" /> -->
          <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
            <template slot-scope="scope" v-if="scope.row.roleId !== 1">
              <el-button
                size="mini"
                type="text"
                icon="el-icon-edit"
                @click="handleUpdate(scope.row)"
                v-hasPermi="['familymodel:property:info']"
              >修改</el-button>
              <el-button
                size="mini"
                type="text"
                icon="el-icon-delete"
                @click="handleDelete(scope.row)"
                v-hasPermi="['system:role:remove']"
              >删除</el-button>
              <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['familymodel:property:info']">
                <el-button size="mini" type="text" icon="el-icon-d-arrow-right"  @click="handleCheck(scope.row)">查看详情</el-button>
              </el-dropdown>
            </template>
          </el-table-column>
        </el-table>
        <pagination
          v-show="total>0"
          :total="total"
          :page.sync="queryParams.pageNum"
          :limit.sync="queryParams.pageSize"
          @pagination="getList"
          style="background: #FEF7FC;"
        />
    </el-dialog>
  </div>
</template>
<script>
import {getPetList, getPetownerList, uploadPic, download} from "@/api/pet/index";
import {getPetList, getPetowner, listPetnote,getPetnoteList,uploadPic, download} from "@/api/pet/index";
import {addRole, updateRole} from "@/api/system/role";
import {blobValidate} from "@/utils/ruoyi";
import errorCode from "@/utils/errorCode";
@@ -231,8 +282,32 @@
      fileListOther:[
      ],
      // 总条数
      total: 0,
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        title:undefined,
        remindTime:undefined,
        createTime:undefined,
        remark:undefined,
        url:undefined,
        happenStartTime:undefined,
        happenEndTime:undefined
      },
      pid:undefined,
      dsb:true,
      btn:false,
      title: '魅宠备忘录',
      openDataScope: false,
      PetNoteList:{
        pid:undefined,
        title:undefined,
        remide_time:undefined,
        create_time:undefined,
        remark:undefined,
        url:undefined,
      },
      petList: {
        type: undefined,
        kind: undefined,
@@ -301,6 +376,7 @@
  watch: {},
  created() {
    const id = this.$route.params && this.$route.params.pid;
    this.pid = id;
    let jd;
    if(this.$route.query.detail!=undefined)
    {
@@ -316,34 +392,43 @@
    }
    let _this = this
    if (id) {
      this.loading = true;
      getPetList(id).then((response) => {
        this.petList = response.data;
        console.log(response.data)
        this.loading = false;
      });
      this.getCateInfor()
    };
    if (id) {
      this.loading = true;
      getPetownerList(id).then((response) => {
      getPetowner(id).then((response) => {
        this.petownerList = response.data;
        console.log(response.data)
        this.loading = false;
      });
      this.getCateInfor()
    };
    this.getList();
    }
  },
  mounted() {},
  methods: {
    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)
      this.queryParams.pid = this.pid;
      //  listProperty(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
      listPetnote(this.queryParams).then(response => {
          //  alert(123)
          //   console.log(response.data)
          console.log(response.data)
          this.PetNoteList = response.data.data;
          this.total = response.data.total;
          this.loading = false;
        }
      );
    },
    submitForm() {
      let ul = this.fileList.map(function (elem){
        return elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
@@ -390,7 +475,10 @@
   /** 备忘录 */
        Petnote(pid){
      this.$router.push("/familymodel/pet/petnote/" + pid);
          this.openDataScope = true
          this.getList()
     // this.$router.push("/familymodel/pet/petnote/" + pid);
    },
      handlePictureCardPreview(file) {
        this.dialogFileUrl = file.url;