• 记一下公司的备注怎么写


    首先是点击添加备注按钮,会向后台发起一个请求,获得当前角色的备注,然后循环到备注的区域,然后可以自己写备注,点击确定按钮也会向后台发送请求,添加备注.

    data 里面的数据
         // 备注信息模态框
          notesModule: {
            notesShow: false,
            id: '',
            taskName: '',
            status: '',
            info: ''
          },
          objdata: [], //备注容器
    
    
    // 修改备注按钮
    <el-table-column label="备注" width="100"> <template slot-scope="scope"> <span class="action-btn" @click="notesEdit(scope.row)"> 我是备注</span> </template> </el-table-column>
      //  点击备注按钮发送请求
    notesEdit(obj) {
          this.notesModule = {
            notesShow: true,
            name: obj.taskName,
            id: obj.id,
            info: ''
          }
          this.getTaskReMark()
        },
     // 获取备注的列表
        getTaskReMark() {
          this.$http(this.GLOBALApi.commonBrandRemarkList(), {
            sourceType: 8,
            sourceId: this.notesModule.id,
            personId: '1' //用户的iD-或者管理员的id
          }).then(res => {
            if (res.status == 1) {
              this.objdata = res.data
              console.log(res.data)
            } else {
            }
          })
          this.initPage()
        },

    获得了objdata就去循环渲染页面咯

      <!-- 您讲给谁进行备注 -->
            <p style="height:30px; line-height:30px;text-align: center;font-size: 22px;margin: 0;">
              您将给
              <span style="color: #ff4081;">{{ notesModule.name }}</span> 进行备注
            </p>
            <!-- 备注内容滚动条 -->
            <div class="scrollarea">
              <el-scrollbar style="height:100%; 100%;margin: 0 auto;">
                <div style="height: 40px;line-height: 40px;" v-for="(item, index) in objdata" :key="index">
                  <span>{{ item.createTime }}</span>
                  <span>管理员名称:{{ item.personName }}</span>
                  <span>备注内容:{{ item.description }}</span>
                </div>
              </el-scrollbar>
           </div>

    // 点击确定按钮
           <div>
              <span>取 消</span>
              <span @click="notesSubmit">确 定</span>
            </div>
      // 点击确定按钮发送请求
        // 发起请求提交备注的信息
        notesSubmit() {
          this.$http(this.GLOBALApi.commonRemark(), {
            sourceType: 8,
            sourceId: this.notesModule.id,
            description: this.notesModule.info,
            personId: '1' //用户的iD-或者管理员的id
          }).then(res => {
            if (res.status == 1) {
              this.$message({
                message: '保存成功',
                type: 'info'
              })
              this.notesModule = {
                notesShow: false,
                name: '',
                id: '',
                info: ''
              }
              this.initPage()
            } else {
              this.$message({
                message: '请填写备注',
                type: 'error'
              })
            }
          })
        },












  • 相关阅读:
    分享:十Python之Http Web服务(网页抓取二)
    分享:C语言打印long long类型
    分享:svn 添加*.so等文件
    visual assist x 安装
    设计模式之MVC模式
    php一个递归读取目录文件脚本
    转:javax.swing.JFrame中使用jpanel来布局
    alter table 总结
    php 函数:func_get_args()、func_get_arg()与func_num_args()
    Visual Assist X简介
  • 原文地址:https://www.cnblogs.com/yadi001/p/12919000.html
Copyright © 2020-2023  润新知