MrShi
2025-08-19 ff087240b3dee29ce4e14ad0836e76b9fdf312cf
admin/src/views/business/managersSheNotice.vue
@@ -3,8 +3,8 @@
    <!-- 搜索表单 -->
    <div slot="search-form">
      <el-form ref="searchForm" :model="searchForm" label-width="100px" inline>
        <el-form-item label="人员搜索 " prop="memberName">
          <el-input v-model="searchForm.memberName" placeholder="可输入姓名/手机号/部门" @keypress.enter.native="search"></el-input>
        <el-form-item label="人员搜索 " prop="keyword">
          <el-input v-model="searchForm.keyword" placeholder="可输入姓名/手机号/部门" @keypress.enter.native="search"></el-input>
        </el-form-item>
        <section>
          <el-button type="primary" @click="search">搜索</el-button>
@@ -16,32 +16,48 @@
    <template v-slot:table-wrap>
      <ul class="toolbar" v-permissions="['business:managers:create', 'business:managers:delete']">
        <li><el-button type="primary" @click="$refs.operaManagersWindow.open('新建事件通知人管理',{type:3})" icon="el-icon-plus" v-permissions="['business:managers:create']">新建</el-button></li>
        <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:managers:delete']">删除</el-button></li>
        <li><el-button type="danger" @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:managers:delete']">删除</el-button></li>
      </ul>
      <el-table
          :height="tableHeightNew"
        v-loading="isWorking.search"
        :data="tableData.list"
        stripe
        strip
        @selection-change="handleSelectionChange"
      >
        <el-table-column type="selection" width="55"></el-table-column>
        <el-table-column prop="memberName" label="人员姓名" min-width="100px"></el-table-column>
        <el-table-column prop="memberPhone" label="人员手机号" min-width="100px"></el-table-column>
        <el-table-column prop="memberEmail" label="人员邮箱" min-width="100px"></el-table-column>
        <el-table-column prop="memberQwId" label="企微ID" min-width="100px"></el-table-column>
        <el-table-column prop="memberEmail" label="人员邮箱" min-width="100px">
          <template slot-scope="{row}">
             <div v-if="row.memberEmail">{{row.memberEmail}}</div>
             <div v-else style="color: #dc362e;cursor: pointer"  title="暂未配置人员邮箱,请前往【人员管理】-【员工管理】菜单编辑该员工信息,设置邮箱信息">
                <el-button type="text" style="color: red"  title="暂未配置人员邮箱,请前往【人员管理】-【员工管理】菜单编辑该员工信息,设置邮箱信息" icon="el-icon-error" >未配置</el-button>
             </div>
          </template>
        </el-table-column>
        <el-table-column prop="companyName" label="所属部门" min-width="100px"></el-table-column>
        <el-table-column prop="isQw" label="企微通知" min-width="80px">
          <template slot-scope="{row}">
            <el-switch v-model="row.isQw"  :active-value="1" :inactive-value="0" @change="updateInfo(row)"/>
          </template>
        </el-table-column>
        <el-table-column prop="isEmail" label="邮件通知" min-width="80px">
          <template slot-scope="{row}">
            <el-switch v-model="row.isEmail" :active-value="1" :inactive-value="0" @change="updateEmailInfo(row)"/>
          </template>
        </el-table-column>
        <el-table-column prop="editorName" label="操作人" min-width="100px"></el-table-column>
        <el-table-column prop="editDate" label="更新时间" min-width="100px"></el-table-column>
        <el-table-column prop="editDate" label="更新时间" min-width="150px"></el-table-column>
        <el-table-column prop="remark" label="备注" min-width="100px"></el-table-column>
        <el-table-column
          v-if="containPermissions(['business:managers:update', 'business:managers:delete'])"
          label="操作"
          min-width="120"
          fixed="right"
        >
          fixed="right" >
          <template slot-scope="{row}">
<!--
            <el-button type="text" @click="$refs.operaManagersWindow.open('编辑责任人信息表', row)" icon="el-icon-edit" v-permissions="['business:managers:update']">编辑</el-button>
-->
<!--  <el-button type="text" @click="$refs.operaManagersWindow.open('编辑责任人信息表', row)" icon="el-icon-edit" v-permissions="['business:managers:update']">编辑</el-button> -->
            <el-button type="text" style="color: red" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:managers:delete']">删除</el-button>
          </template>
        </el-table-column>
@@ -70,8 +86,9 @@
  data () {
    return {
      // 搜索
      updating: false,
      searchForm: {
        memberName: '',
        keyword: '',
        type: 3
      }
    }
@@ -84,6 +101,30 @@
      'field.main': 'id'
    })
    this.search()
  },
  methods: {
    updateInfo (row) {
      const newValue = row.isQw
      row.isQw = !row.isQw
      // 开启
      this.api.updateById({ id: row.id, isQw: newValue }).then(() => {
        this.$tip.success('设置成功!')
        this.search()
      }).final(() => {
        this.updating = false
      })
    },
    updateEmailInfo (row) {
      const newValue = row.isEmail
      row.isEmail = !row.isEmail
      // 开启
      this.api.updateById({ id: row.id, isEmail: newValue }).then(() => {
        this.$tip.success('设置成功!')
        this.search()
      }).finally(() => {
        this.updating = false
      })
    }
  }
}
</script>