| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415 | <template>  <div class="app-container">    <!--机构数据-->    <!-- <el-col :span="4" :xs="24" v-if="false">        <org-tree          v-model="queryParams.orgId"          @defaultKey="getDefaultKey"          @checkChange="checkChange"          @click="clickTreeNode"          wholeTree        ></org-tree>      </el-col> -->    <!--用户数据-->    <div class="main-right-box">      <!--    搜索条件    -->      <div class="main-search-box">        <el-form          v-show="showSearch"          ref="queryForm"          :inline="true"          :model="queryParams"          size="small"        >          <el-form-item label="会议主题" prop="title">            <el-input              v-model="queryParams.title"              :maxlength="50"              clearable              name="title"              placeholder="请输入工作主题关键字"            />          </el-form-item>          <el-form-item label="会议时间" prop="range">            <DataRangePicker              v-model="queryParams.range"              :default-time="['00:00:00', '23:59:59']"              end-placeholder="结束日期"              start-placeholder="开始日期"              type="daterange"            >            </DataRangePicker>          </el-form-item>          <el-form-item label="组织机构" prop="orgId">            <!-- <tree-select              v-model="queryParams.orgId"              :noChildrenText="''"              :normalizer="tenantIdnormalizer"              :options="deptOptions"              :props="{ checkStrictly: true, label: 'name' }"              :show-count="true"              clearValueText="清除"              noOptionsText="没有数据"              noResultsText="没有搜索结果"              placeholder="请选择组织机构"            /> -->            <org-tree                  v-model="queryParams.orgId"                  @defaultKey="getDefaultKey"                  @checkChange="checkChange"                  @click="clickTreeNode"                  hangsheTree                  :defaultCheckSub="true"                  ref="orgTree"                ></org-tree>          </el-form-item>        </el-form>        <el-row :gutter="10">          <el-col :span="1.5">            <el-button              icon="el-icon-search"              size="mini"              type="primary"              @click="getList"            >搜索            </el-button            >          </el-col>          <el-col :span="1.5">            <el-button              icon="el-icon-refresh"              size="mini"              type="primary"              @click="resetQuery"            >重置            </el-button            >          </el-col>          <el-col :span="1.5">            <el-button              v-hasPermi="['core:hsggbsdj:add']"              icon="el-icon-plus"              size="mini"              type="primary"              @click="handleAdd(null)"            >新增            </el-button>          </el-col>          <right-toolbar            :showSearch.sync="showSearch"            @queryTable="getList"          ></right-toolbar>        </el-row>      </div>      <!-- 表格数据 -->      <el-table        v-loading="loading"        :data="dataList"        border        height="644"        size="small"      >        <el-table-column align="center" label="序号" type="index" width="60"/>        <el-table-column          align="center"          label="行社名称"          prop="orgName"          width="300"        />        <el-table-column          align="center"          label="会议主题"          prop="title"          width="300"        />        <el-table-column          align="center"          label="会议日期"          prop="date"          width="260"        >          <template slot-scope="r">            {{ r.row.date ? dayjs(r.row.date).format("YYYY年MM月DD日") : "" }}          </template>        </el-table-column>        <el-table-column align="center" label="参会人员" prop="joinNames">        </el-table-column>        <el-table-column          align="left"          class-name="small-padding fixed-width"          fixed="right"          label="操作"          width="240"        >          <template slot-scope="scope">            <!-- <el-button              size="mini"              type="text"              icon="el-icon-view"              @click="showImages(scope.row.images)"              v-hasPermi="['core:hsggbsdj:query']"              >查看照片            </el-button> -->            <el-button              v-hasPermi="['core:hsggbsdj:query']"              icon="el-icon-view"              size="mini"              type="text"              @click="handleInfo(scope.row.id)"            >详情            </el-button>            <el-button              v-hasPermi="['core:hsggbsdj:edit']"              icon="el-icon-edit-outline"              size="mini"              type="text"              @click="handleAdd(scope.row.id)"            >编辑            </el-button>            <el-button              v-hasPermi="['core:hsggbsdj:remove']"              icon="el-icon-delete"              size="mini"              type="text"              @click="handleDelete(scope.row)"            >删除            </el-button>          </template>        </el-table-column>      </el-table>      <pagination        v-show="total > 0"        :limit.sync="queryParams.pageSize"        :page.sync="queryParams.pageNum"        :total="total"        @pagination="getList"      />    </div>    <dialog-edit ref="editDialog" @success="getList()"></dialog-edit>    <dialog-des ref="desDialog"></dialog-des>    <el-image-viewer      v-if="imageViewer"      :on-close="closeImgViewer"      :url-list="srcList"    />  </div></template><script>import {delhsggbsdj, listhsggbsdj,} from "@/api/safetyBook/hsggbsdj";import {getLabel} from "@/views/commonOption";import DialogEdit from "./dialog.edit";import DialogDes from "./dialog.des";import {deptTreeSelect} from "@/api/system/public";import "@riophae/vue-treeselect/dist/vue-treeselect.css";// import OrgTree from "@/components/orgTree/index.vue";import kOrgTree from "@/components/k-orgTree/index.vue";import KFileUpload from "@/components/K-FileUpload/index.vue";import tableList from "@/mixins/tableList";import DataRangePicker from "@/components/dateTime/daterange.picker.vue";import dayjs from "dayjs";import OrgTree from "@/components/orgTree/orgQuerySelector.vue";export default {  dicts: ["safety_book_type"],  name: "hsggbsdj",  components: {    OrgTree,    kOrgTree,    KFileUpload,    DialogEdit,    DataRangePicker,    DialogDes,    "el-image-viewer": () =>      import("element-ui/packages/image/src/image-viewer"),  },  mixins: [tableList],  data() {    return {      // 遮罩层      loading: true,      // 选中数组      ids: [],      // 非单个禁用      single: true,      // 非多个禁用      multiple: true,      // 显示搜索条件      showSearch: true,      // 总条数      total: 0,      // 行社高管部署登记表格数据      dataList: [],      // 弹出层标题      title: "",      // 是否显示弹出层      open: false,      // 机构树选项      deptOptions: [],      // 机构名称      deptName: undefined,      //是否关联下级      checked: false,      timeClearable: true,      defaultProps: {        children: "children",        label: "name",      },      formFileListDefualtValue: [],      // 查询参数      queryParams: {        checkSub: true,        pageNum: 1,        pageSize: 10,        orgId: null,        searchOrgId: null,        range: [],        title: null,      },      // 表单参数      form: {},      imageViewer: false,      srcList: [],      //默认选中节点      defaultKeys: [],    };  },  watch: {    // 根据名称筛选机构树    deptName(val) {      this.$refs.tree.filter(val);    },  },  created() {    // this.getDeptTree();    this.getConfigKey("sys.user.initPassword").then((response) => {      this.initPassword = response.msg;    });    // this.getList();  },  methods: {    dayjs,    resetQuery() {      this.resetForm("queryForm");      this.getList();    },    /** treeSelect组件自定义数据*/    tenantIdnormalizer(node, instanceId) {      if (node.children && !node.children.length) {        delete node.children;      }      return {        id: node.id,        label: node.shortName,        children: node.children,      };    },    showImages(file) {      let array = file.split(",");      this.srcList = array;      this.imageViewer = true;    },    closeImgViewer() {      this.imageViewer = false;      this.srcList = [];    },    getLabel(options, value) {      return getLabel(options, value);    },    //新增    handleAdd(id) {      this.$refs.editDialog.show(id);    },    /** 查询行社高管部署登记列表 */    getList() {      this.loading = true;      listhsggbsdj(this.queryParams).then((response) => {        this.dataList = response.rows;        this.total = response.total;        this.loading = false;      }).catch(()=>{        this.loading = false;      });    },    getDeptTree() {      deptTreeSelect().then((response) => {        this.deptOptions = response.data;      });    },    // 节点单击事件    clickTreeNode(data) {      this.queryParams.orgId = data.id;      this.handleQuery();    },    /** 下穿状态改变*/    changeCheckBox() {      this.getList();    },    getDefaultKey(key) {      this.queryParams.orgId = key;      this.getList();    },    //单选框状态改变    checkChange(state) {      this.queryParams.checkSub = state;      this.handleQuery();    },    // 筛选节点    filterNode(value, data) {      if (!value) return true;      return data.name.indexOf(value) !== -1;    },    // 节点单击事件    handleNodeClick(data) {      this.queryParams.orgId = data.id;      this.handleQuery();    },    /** 搜索按钮操作 */    handleQuery() {      this.queryParams.pageNum = 1;      this.getList();    },    /** 删除按钮操作 */    handleDelete(row) {      const ids = row.id || this.ids;      this.$modal        .confirm("是否确认删除?")        .then(function () {          return delhsggbsdj(ids);        })        .then(() => {          this.getList();          this.$modal.msgSuccess("删除成功");        })        .catch(() => {        });    },    /** 详情按钮操作 */    handleInfo(id) {      this.$refs.desDialog.show(id);    },  },};</script><style lang="scss" scoped>.ellipsis {  white-space: nowrap;  overflow: hidden;  text-overflow: ellipsis;}::v-deep.formTreeItem {  .el-form-item__content {    width: 264px;  }}</style>
 |