“linengliang”
2023-11-06 bdca59f8f15e80e6dc98c1136748124844939472
部门修改加导入优化
已添加9个文件
已修改1个文件
1658 ■■■■■ 文件已修改
src/views/dashboard/Analysis.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dashboard/public/zghf.png 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/depart/DepartManage.vue 416 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/depart/modules/DepartForm.vue 156 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/depart/modules/DepartList.vue 169 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/depart/modules/DepartModel.vue 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/depart/modules/EquipmentList.vue 161 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/depart/modules/PermissionTree.vue 169 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/depart/modules/TeamList.vue 179 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/depart/modules/TeamModal.vue 341 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dashboard/Analysis.vue
@@ -1,6 +1,6 @@
<template>
  <div>
    <index-chart v-if="indexStyle==1"></index-chart>
  <div style="text-align: center;vertical-align: middle;background-color:white;">
    <!-- <index-chart v-if="indexStyle==1"></index-chart>
    <index-bdc v-if="indexStyle==2"></index-bdc>
    <index-task v-if="indexStyle==3"></index-task>
    <div style="width: 100%;text-align: right;margin-top: 20px">
@@ -10,7 +10,8 @@
        <a-radio :value="2">统计图表2</a-radio>
        <a-radio :value="3">任务表格</a-radio>
      </a-radio-group>
    </div>
    </div> -->
      <img  style="width:1000px; height:900px;" src="./public/zghf.png">
  </div>
</template>
src/views/dashboard/public/zghf.png
src/views/eam/depart/DepartManage.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,416 @@
<template>
  <a-row
    type="flex"
    :gutter="16"
  >
    <a-col
      :md="5"
      :sm="24"
    >
    <a-card
    :loading="cardLoading"
    :bordered="false"
    title="部门树"
    style="height: 100%;"
  >
    <a-spin :spinning="loading">
      <a-alert
        type="info"
        :showIcon="true"
        style="margin-right: 54px;"
      >
        <div slot="message">
          å½“前:<span v-if="this.currSelected.title">{{ getCurrSelectedTitle() }}</span>
          <a
            v-if="this.currSelected.title"
            style="margin-left: 10px"
            @click="onClearSelected"
          >取消</a>
        </div>
      </a-alert>
      <div class="drawer-bootom-button">
        <a-dropdown
          :trigger="['click']"
          placement="bottomCenter"
        >
          <a-menu slot="overlay">
            <a-menu-item
              key="1"
              @click="expandAll"
            >展开所有</a-menu-item>
            <a-menu-item
              key="2"
              @click="closeAll"
            >合并所有</a-menu-item>
            <a-menu-item
              key="3"
              @click="refreshTree"
            >刷新</a-menu-item>
          </a-menu>
          <a-button>
            <a-icon type="bars" />
          </a-button>
        </a-dropdown>
      </div>
      <a-input-search
        @search="handleSearch"
        style="width:100%;margin-top: 10px"
        placeholder="设备分类"
        allowClear
        v-model="searchInput"
        @change="handleChange"
      />
      <a-tree
        showLine
        ref="tree"
        :checkStrictly="checkStrictly"
        :expandedKeys.sync="expandedKeys"
        :selectedKeys="selectedKeys"
        :dropdownStyle="{maxHeight:'200px',overflow:'auto'}"
        :treeData="treeDataSource"
        :autoExpandParent="autoExpandParent"
        @select="onSelect"
        @expand="onExpand"
      >
      <template
          slot="title"
          slot-scope="{key,entity,title,isLeaf,value}"
        >
        <span>{{ title }}</span>
          <a-dropdown
            :trigger="['click']"
            placement="bottomCenter"
          >
            <a-menu slot="overlay">
              <a-menu-item v-if="key!='-1'">
                <a
                  href="javascript:;"
                  @click="handleEdit(entity)"
                >编辑</a>
              </a-menu-item>
              <a-menu-item>
                <a
                  href="javascript:;"
                  @click="handleAdd({parentId:value,orgCategory:'2'})"
                >
               æ·»åŠ å­ç±»åˆ«
                </a>
              </a-menu-item>
              <a-menu-item v-if="key!='-1'&&isLeaf">
                <a-popconfirm
                  title="确定删除吗?"
                  @confirm="() => handleDelete(entity.id)"
                >
                  <a>删除</a>
                </a-popconfirm>
              </a-menu-item>
            </a-menu>
            <span :style="{position: 'absolute',right: 0}">
              <a-icon type="down" />
            </span>
          </a-dropdown>
        </template>
      </a-tree>
    </a-spin>
  </a-card>
    </a-col>
    <a-col
      :md="24-5"
      :sm="24"
    >
    <a-card
    :bordered="false"
    class="card-area"
    title="关联列表"
    style="height: 100%;"
  >
    <a-tabs defaultActiveKey="1">
      <a-tab-pane tab="部门列表" key="1" forceRender>
        <depart-list :mainId="mainId"></depart-list>
      </a-tab-pane>
      <a-tab-pane tab="部门权限" key="2" forceRender v-if="false">
        <permission-tree :mainId="mainId"></permission-tree>
      </a-tab-pane>
      <a-tab-pane tab="设备列表" key="3" forceRender>
        <equipment-list :mainId="mainId"></equipment-list>
      </a-tab-pane>
      <a-tab-pane tab="班组列表" key="4" forceRender>
        <team-list :mainId="mainId"></team-list>
      </a-tab-pane>
    </a-tabs>
    </a-card>
    </a-col>
    <depart-model  ref='modalForm' @ok='modalFormOk' @reloadTree="refreshTree"></depart-model>
  </a-row>
</template>
<script>
import { getAction } from '@/api/manage'
import Tooltip from 'ant-design-vue/es/tooltip'
import JEllipsis from "@/components/jeecg/JEllipsis"
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { deleteAction } from '../../../api/manage'
import DepartList from './modules/DepartList'
import PermissionTree from './modules/PermissionTree'
import EquipmentList from './modules/EquipmentList'
import TeamList from './modules/TeamList'
import DepartModel from './modules/DepartModel'
export default {
  name: 'DepartManage',
  mixins: [JeecgListMixin],
  components: {
    Tooltip,
    JEllipsis,
    DepartList,
    PermissionTree,
    EquipmentList,
    TeamList,
    DepartModel,
  },
  data() {
    return {
      description: '设备部门',
      searchInput: '',
      disableMixinCreated:true,
      cardLoading: false,
      loading: false,
      treeDataSource: [],
      selectedKeys: [],
      expandedKeys: [],
      mainId:'',
      url: {
        equipmentCategoryTreeList: '/sys/sysDepart/myTree',
        delete: "/sys/sysDepart/delete",
        list: "/eam/equipmentCategory/getAllChildren",
      },
      searchValue: '',
      dataList: [],
      autoExpandParent: true,
      checkStrictly: true,
      allTreeKeys: [],
      currSelected: {},
      hiding: false,
    }
  },
  created() {
    this.queryTreeData();
    this.closeAll();
  },
  methods: {
    getCurrSelectedTitle() {
      return !this.currSelected.title ? '' : this.currSelected.title;
    },
    onClearSelected() {
      this.hiding = true;
      this.currSelected = {};
      this.selectedKeys = [];
    },
    onSelect(selectedKeys, e) {
      this.hiding = false;
      let record = e.node.dataRef;
      this.currSelected = Object.assign({}, record);
      this.selectedKeys = [record.key];
      this.mainId = record.key;
    },
    onExpand(expandedKeys) {
      this.expandedKeys = expandedKeys;
      this.autoExpandParent = false;
    },
    queryTreeData() {
      this.loading = true;
      this.cardLoading = true;
      getAction(this.url.equipmentCategoryTreeList).then((res) => {
        if (res.success) {
          this.dataList = [];
          this.allTreeKeys = [];
          this.treeDataSource = res.result;
          this.generateList(res.result);
        } else {
          this.$message.warn(res.message);
        }
      }).finally(() => {
        this.loading = false;
        this.cardLoading = false;
      })
    },
    handleChange() {
      let search = this.searchInput;
      let expandedKeys = this.dataList
        .map(item => {
          if (item.title.indexOf(search) > -1) {
            return this.getParentKey(item.key, this.treeDataSource);
          }
          return null;
        })
        .filter((item, i, self) => item && self.indexOf(item) === i);
      Object.assign(this, {
        expandedKeys,
        searchValue: search,
        autoExpandParent: true,
      });
    },
    handleSearch(value) {
      let search = value;
      let expandedKeys = this.dataList
        .map(item => {
          if (item.title.indexOf(search) > -1) {
            return this.getParentKey(item.key, this.treeDataSource);
          }
          return null;
        })
        .filter((item, i, self) => item && self.indexOf(item) === i);
      Object.assign(this, {
        expandedKeys,
        searchValue: search,
        autoExpandParent: true,
      });
    },
    getParentKey(key, tree) {
      let parentKey;
      for (let i = 0; i < tree.length; i++) {
        const node = tree[i];
        if (node.children) {
          if (node.children.some(item => item.key === key)) {
            parentKey = node.key;
          } else if (
            this.getParentKey(key, node.children)) {
            parentKey = this.getParentKey(key, node.children);
          }
        }
      }
      return parentKey;
    },
    handleDelete(id) {
      if (!this.url.delete) {
        this.$message.error("请设置url.delete属性!")
        return
      }
      var that = this;
      deleteAction(that.url.delete, { id: id }).then((res) => {
        if (res.success) {
          //重新计算分页问题
          that.reCalculatePage(1)
          that.$message.success(res.message);
          that.queryTreeData();
          that.$bus.$emit('loadData')
          that.alterFlag = new Date();
        } else {
          that.$message.warning(res.message);
        }
      });
    },
    generateList(data) {
      for (let i = 0; i < data.length; i++) {
        const node = data[i];
        const key = node.key;
        const title = node.title;
        // const type = node.type;
        this.dataList.push({ key, title: title });
        this.allTreeKeys.push(key);
        if (node.children) {
          this.generateList(node.children);
        }
      }
    },
    expandAll() {
      this.expandedKeys = this.allTreeKeys;
    },
    closeAll() {
      this.expandedKeys = ['-1'];
    },
    refreshTree() {
      this.queryTreeData();
    },
    handleAdd(record){
      this.$refs.modalForm.title = "新增"
      this.$refs.modalForm.add(record);
    }
  },
}
</script>
<style scoped>
@import '~@assets/less/common.less';
.replaceSearch {
  color: #00090f;
  font-weight: bold;
  background-color: rgb(204, 204, 204);
}
/* .ant-select-disabled {
  color: rgba(241, 16, 16, 0.25);
}
.ant-select-disabled .ant-select-selection {
  background: #a76b6b;
} */
/*隐藏树的默认icon*/
.ant-tree-switcher-noop {
  display: none !important;
}
/*隐藏树的默认竖线*/
.ant-tree.ant-tree-show-line li:not(:last-child):before {
  border-left: 0px;
}
.ant-card-body .table-operator {
  margin: 15px;
}
.anty-form-btn {
  width: 100%;
  text-align: center;
}
.anty-form-btn button {
  margin: 0 5px;
}
.anty-node-layout .ant-layout-header {
  padding-right: 0;
}
.header {
  padding: 0 8px;
}
.header button {
  margin: 0 3px;
}
.ant-modal-cust-warp {
  height: 100%;
}
.ant-modal-cust-warp .ant-modal-body {
  height: calc(100% - 110px) !important;
  overflow-y: auto;
}
.ant-modal-cust-warp .ant-modal-content {
  height: 90% !important;
  overflow-y: hidden;
}
#app .desktop {
  height: auto !important;
}
/** Button按钮间距 */
.ant-btn {
  margin-left: 3px;
}
.ant-alert {
  padding: 5px 15px 5px 37px;
}
.drawer-bootom-button {
  position: absolute;
  top: 1px;
  /* padding: 10px 16px; */
  text-align: left;
  right: 0;
  background: #fff;
  border-radius: 0 0 2px 2px;
}
</style>
src/views/eam/depart/modules/DepartForm.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,156 @@
<template>
  <a-spin :spinning="confirmLoading">
    <j-form-container :disabled="formDisabled">
      <a-form-model
        ref="form"
        :model="model"
        :rules="validatorRules"
        slot="detail"
      >
      <a-row :gutter="24">
          <a-col :span="24">
            <a-form-item
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
              label="父级部门"
              prop="parentId"
            >
              <j-dict-select-tag
                allow-clear
                placeholder="请选择父级部门"
                :triggerChange="true"
                dictCode="sys_depart,depart_name,id,del_flag = '0'"
                v-model="model.parentId"
                :disabled="true"
              />
            </a-form-item>
          </a-col>
        </a-row>
        <a-row>
          <a-col :span="24">
            <a-form-model-item
              label="编码"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
              prop="orgCode"
            >
              <a-input
                v-model="model.orgCode"
                placeholder="请输入编码"
              ></a-input>
            </a-form-model-item>
          </a-col>
          <a-col :span="24">
            <a-form-model-item
              label="名称"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
              prop="departName"
            >
              <a-input
                v-model="model.departName"
                placeholder="请输入名称"
              ></a-input>
            </a-form-model-item>
          </a-col>
        </a-row>
      </a-form-model>
    </j-form-container>
  </a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
  name: 'RepairPlanTypeForm',
  components: {
  },
  props: {
    //表单禁用
    disabled: {
      type: Boolean,
      default: false,
      required: false
    }
  },
  data() {
    return {
      model: {
      },
      labelCol: {
        xs: { span: 24 },
        sm: { span: 5 },
      },
      wrapperCol: {
        xs: { span: 24 },
        sm: { span: 16 },
      },
      confirmLoading: false,
      validatorRules: {
        orgCode: [
          { required: true, message: '请输入编码!' },
          { validator: (rule, value, callback) => validateDuplicateValue('sys_depart', 'org_code', value, this.model.id, callback) },
        ],
        departName: [
          { required: true, message: '请输入名称!' },
          { validator: (rule, value, callback) => validateDuplicateValue('sys_depart', 'depart_name', value, this.model.id, callback) },
        ],
      },
      url: {
        add: "/sys/sysDepart/add",
        edit: "/sys/sysDepart/edit",
      }
    }
  },
  computed: {
    formDisabled() {
      return this.disabled
    },
  },
  created() {
    //备份model原始值
    this.modelDefault = JSON.parse(JSON.stringify(this.model));
  },
  methods: {
    add(record) {
      this.edit(record);
    },
    edit(record) {
      this.model = Object.assign({}, record);
      this.visible = true;
    },
    submitForm() {
      const that = this;
      // è§¦å‘表单验证
      this.$refs.form.validate(valid => {
        if (valid) {
          that.confirmLoading = true;
          let httpurl = '';
          let method = '';
          if (!this.model.id) {
            httpurl += this.url.add;
            method = 'post';
          } else {
            httpurl += this.url.edit;
            method = 'put';
          }
          httpAction(httpurl, this.model, method).then((res) => {
            if (res.success) {
              that.$message.success(res.message);
              that.$emit('ok');
            } else {
              that.$message.warning(res.message);
            }
          }).finally(() => {
            that.confirmLoading = false;
          })
        }
      })
    },
  }
}
</script>
src/views/eam/depart/modules/DepartList.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,169 @@
<template>
  <a-card :bordered="false" :class="'cust-erp-sub-tab'">
    <!-- æŸ¥è¯¢åŒºåŸŸ -->
    <div class="table-page-search-wrapper">
      <a-form layout="inline" @keyup.enter.native="searchQuery">
        <a-row :gutter="24">
        </a-row>
      </a-form>
    </div>
    <div>
      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
        <i class="anticon anticon-info-circle ant-alert-icon"></i> å·²é€‰æ‹© <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
      </div>
      <a-table
        ref="table"
        size="middle"
        bordered
        rowKey="id"
        :scroll="{x:true}"
        :columns="columns"
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
        @change="handleTableChange">
        <template slot="htmlSlot" slot-scope="text">
          <div v-html="text"></div>
        </template>
        <template slot="imgSlot" slot-scope="text,record">
          <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
          <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
        </template>
        <template slot="fileSlot" slot-scope="text">
          <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
          <a-button
            v-else
            :ghost="true"
            type="primary"
            icon="download"
            size="small"
            @click="downloadFile(text)">
            ä¸‹è½½
          </a-button>
        </template>
        <span slot="action" slot-scope="text, record">
          <a @click="handleEdit(record)">编辑</a>
          <a-divider type="vertical" />
          <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
            <a>删除</a>
          </a-popconfirm>
        </span>
      </a-table>
    </div>
  </a-card>
</template>
<script>
  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  export default {
    name: "DepartList",
    mixins:[JeecgListMixin],
    components: { },
    props:{
      mainId:{
        type:String,
        default:'',
        required:false
      }
    },
    watch:{
      mainId:{
        immediate: true,
        handler(val) {
          if(!this.mainId){
            this.clearList()
          }else{
            this.queryParam['parentId'] = val
            this.queryParam['delFlag'] = '0'
            this.loadData(1);
          }
        }
      }
    },
    data () {
      return {
        description: '材料出库单管理页面',
        disableMixinCreated:true,
        // è¡¨å¤´
        columns: [
          {
            title: '#',
            dataIndex: '',
            key:'rowIndex',
            width:40,
            align:"center",
            customRender:function (t,r,index) {
              return parseInt(index)+1;
            }
          },
          {
            title:'部门编码',
            align:"center",
            dataIndex: 'orgCode',
            width:100,
          },
          {
            title:'部门名称',
            align:"center",
            dataIndex: 'departName',
            ellipsis:true,
            width:100,
          },
          {
            title:'创建人',
            align:"center",
            dataIndex: 'createBy',
            width:100,
          },
          {
            title:'创建日期',
            align:"center",
            dataIndex: 'createTime',
            width:100,
          },
          {
            title:'更新人',
            align:"center",
            dataIndex: 'updateBy',
            width:100,
          },
          {
            title:'更新日期',
            align:"center",
            dataIndex: 'updateTime',
            width:100,
          },
        ],
        url: {
          list: "/sys/sysDepart/list",
        },
        dictOptions:{
        }
      }
    },
    created() {
    },
    computed: {
      importExcelUrl(){
        return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId}`;
      }
    },
    methods: {
      clearList(){
        this.dataSource=[]
        this.selectedRowKeys=[]
        this.ipagination.current = 1
      }
    },
  }
</script>
<style scoped>
  @import '~@assets/less/common.less'
</style>
src/views/eam/depart/modules/DepartModel.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,60 @@
<template>
  <j-modal
    :title="title"
    :width="width"
    :visible="visible"
    switchFullscreen
    @ok="handleOk"
    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
    @cancel="handleCancel"
    >
    <depart-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></depart-form>
  </j-modal>
</template>
<script>
  import DepartForm from './DepartForm'
  export default {
    name: "DepartModal",
    components: {
        DepartForm
    },
    data () {
      return {
        title:'',
        width:800,
        visible: false,
        disableSubmit: false
      }
    },
    methods: {
      add (record) {
        this.visible=true
        this.$nextTick(()=>{
          this.$refs.realForm.add(record);
        })
      },
      edit (record) {
        this.visible=true
        this.$nextTick(()=>{
          this.$refs.realForm.edit(record);
        })
      },
      close () {
        this.$emit('close');
        this.visible = false;
      },
      handleOk () {
        this.$refs.realForm.submitForm();
      },
      submitCallback(){
        this.$emit('reloadTree');
        this.visible = false;
      },
      handleCancel () {
        this.close()
      },
    }
  }
</script>
src/views/eam/depart/modules/EquipmentList.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,161 @@
<template>
  <a-card :bordered="false" :class="'cust-erp-sub-tab'">
    <!-- æŸ¥è¯¢åŒºåŸŸ -->
    <div class="table-page-search-wrapper">
      <a-form layout="inline" @keyup.enter.native="searchQuery">
        <a-row :gutter="24">
        </a-row>
      </a-form>
    </div>
    <div>
      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
        <i class="anticon anticon-info-circle ant-alert-icon"></i> å·²é€‰æ‹© <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
      </div>
      <a-table
        ref="table"
        size="middle"
        bordered
        rowKey="id"
        :scroll="{x:true}"
        :columns="columns"
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
        @change="handleTableChange">
        <template slot="htmlSlot" slot-scope="text">
          <div v-html="text"></div>
        </template>
        <template slot="imgSlot" slot-scope="text,record">
          <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
          <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
        </template>
        <template slot="fileSlot" slot-scope="text">
          <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
          <a-button
            v-else
            :ghost="true"
            type="primary"
            icon="download"
            size="small"
            @click="downloadFile(text)">
            ä¸‹è½½
          </a-button>
        </template>
        <span slot="action" slot-scope="text, record">
          <a @click="handleEdit(record)">编辑</a>
          <a-divider type="vertical" />
          <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
            <a>删除</a>
          </a-popconfirm>
        </span>
      </a-table>
    </div>
  </a-card>
</template>
<script>
  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  export default {
    name: "EquipmentList",
    mixins:[JeecgListMixin],
    components: { },
    props:{
      mainId:{
        type:String,
        default:'',
        required:false
      }
    },
    watch:{
      mainId:{
        immediate: true,
        handler(val) {
          if(!this.mainId){
            this.clearList()
          }else{
            this.queryParam['useId'] = val
            this.loadData(1);
          }
        }
      }
    },
    data () {
      return {
        description: '材料出库单管理页面',
        disableMixinCreated:true,
        // è¡¨å¤´
        columns: [
          {
            title: '#',
            dataIndex: '',
            key:'rowIndex',
            width:40,
            align:"center",
            customRender:function (t,r,index) {
              return parseInt(index)+1;
            }
          },
          {
          title: '设备类型',
          align: "center",
          dataIndex: 'equipmentCategoryId_dictText',
          width:100
          },
        {
          title: '统一编码',
          align: "center",
          dataIndex: 'num',
          width:100
        },
        {
          title: '设备名称',
          align: "center",
          dataIndex: 'name',
          width:100
        },
        {
          title: '型号',
          align: "center",
          dataIndex: 'model',
          width:100
        },
        {
          title: '规格',
          align: "center",
          dataIndex: 'specification',
          width:100
        },
        ],
        url: {
          list: "/eam/equipment/getEquipmentList",
        },
        dictOptions:{
        }
      }
    },
    created() {
    },
    computed: {
      importExcelUrl(){
        return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId}`;
      }
    },
    methods: {
      clearList(){
        this.dataSource=[]
        this.selectedRowKeys=[]
        this.ipagination.current = 1
      }
    },
  }
</script>
<style scoped>
  @import '~@assets/less/common.less'
</style>
src/views/eam/depart/modules/PermissionTree.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,169 @@
<template>
  <a-card :bordered="false" :class="'cust-erp-sub-tab'">
    <!-- æŸ¥è¯¢åŒºåŸŸ -->
    <div class="table-page-search-wrapper">
      <a-form layout="inline" @keyup.enter.native="searchQuery">
        <a-row :gutter="24">
        </a-row>
      </a-form>
    </div>
    <div>
      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
        <i class="anticon anticon-info-circle ant-alert-icon"></i> å·²é€‰æ‹© <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
      </div>
      <a-table
        ref="table"
        size="middle"
        bordered
        rowKey="id"
        :scroll="{x:true}"
        :columns="columns"
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
        @change="handleTableChange">
        <template slot="htmlSlot" slot-scope="text">
          <div v-html="text"></div>
        </template>
        <template slot="imgSlot" slot-scope="text,record">
          <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
          <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
        </template>
        <template slot="fileSlot" slot-scope="text">
          <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
          <a-button
            v-else
            :ghost="true"
            type="primary"
            icon="download"
            size="small"
            @click="downloadFile(text)">
            ä¸‹è½½
          </a-button>
        </template>
        <span slot="action" slot-scope="text, record">
          <a @click="handleEdit(record)">编辑</a>
          <a-divider type="vertical" />
          <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
            <a>删除</a>
          </a-popconfirm>
        </span>
      </a-table>
    </div>
  </a-card>
</template>
<script>
  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  export default {
    name: "UpdateABC",
    mixins:[JeecgListMixin],
    components: { },
    props:{
      mainId:{
        type:String,
        default:'',
        required:false
      }
    },
    watch:{
      mainId:{
        immediate: true,
        handler(val) {
          if(!this.mainId){
            this.clearList()
          }else{
            this.queryParam['equipmentId'] = val
            this.queryParam['updateType'] = 'ABC'
            this.loadData(1);
          }
        }
      }
    },
    data () {
      return {
        description: '材料出库单管理页面',
        disableMixinCreated:true,
        // è¡¨å¤´
        columns: [
          {
            title: '#',
            dataIndex: '',
            key:'rowIndex',
            width:60,
            align:"center",
            customRender:function (t,r,index) {
              return parseInt(index)+1;
            }
          },
          {
            title:'ABC标识(旧)',
            align:"center",
            dataIndex: 'oldAbcTag_dictText',
            width:300
          },
          {
            title:'ABC标识(新)',
            align:"center",
            dataIndex: 'newAbcTag_dictText',
            width:300
          },
          {
            title:'变更日期',
            align:"center",
            dataIndex: 'updateDate',
            width:300
          },
          {
            title:'变更人',
            align:"center",
            dataIndex: 'updatePerson_dictText',
            width:300
          },
          {
            title:'备注',
            align:"center",
            dataIndex: 'remark',
            width:300
          },
        ],
        url: {
          list: "/eam/equipmentUpdateInfo/list",
        },
        dictOptions:{
        }
      }
    },
    created() {
    },
    computed: {
      importExcelUrl(){
        return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId}`;
      }
    },
    methods: {
      clearList(){
        this.dataSource=[]
        this.selectedRowKeys=[]
        this.ipagination.current = 1
      }
    },
    mounted(){
      this.$bus.$on('loadData', (data) => {
            this.loadData();
      });
    }
  }
</script>
<style scoped>
  @import '~@assets/less/common.less'
</style>
src/views/eam/depart/modules/TeamList.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,179 @@
<template>
  <a-card :bordered="false" :class="'cust-erp-sub-tab'">
    <!-- æŸ¥è¯¢åŒºåŸŸ -->
    <div class="table-page-search-wrapper">
      <a-form layout="inline" @keyup.enter.native="searchQuery">
        <a-row :gutter="24">
        </a-row>
      </a-form>
    </div>
    <!-- <div class="table-operator">
      <a-button
        @click="handleAdd"
        type="primary"
        icon="plus"
      >新增班组</a-button>
    </div> -->
    <div>
      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
        <i class="anticon anticon-info-circle ant-alert-icon"></i> å·²é€‰æ‹© <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
      </div>
      <a-table
        ref="table"
        size="middle"
        bordered
        rowKey="id"
        :scroll="{x:true}"
        :columns="columns"
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
        @change="handleTableChange">
        <template slot="htmlSlot" slot-scope="text">
          <div v-html="text"></div>
        </template>
        <template slot="imgSlot" slot-scope="text,record">
          <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
          <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
        </template>
        <template slot="fileSlot" slot-scope="text">
          <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
          <a-button
            v-else
            :ghost="true"
            type="primary"
            icon="download"
            size="small"
            @click="downloadFile(text)">
            ä¸‹è½½
          </a-button>
        </template>
        <span slot="action" slot-scope="text, record">
          <a @click="handleEdit(record)">编辑</a>
          <a-divider type="vertical" />
          <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
            <a>删除</a>
          </a-popconfirm>
        </span>
      </a-table>
    </div>
    <team-modal ref='modalForm' @ok='modalFormOk' :mainId="mainId"></team-modal>
  </a-card>
</template>
<script>
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TeamModal from './TeamModal.vue'
  export default {
    name: "TeamList",
    mixins:[JeecgListMixin],
    components: {TeamModal },
    props:{
      mainId:{
        type:String,
        default:'',
        required:false
      }
    },
    watch:{
      mainId:{
        immediate: true,
        handler(val) {
          if(!this.mainId){
            this.clearList()
          }else if(val!=='-1'){
            this.queryParam['departId'] = val
            this.queryParam['delFlag'] = '0'
            this.loadData(1);
          }else{
            this.queryParam['delFlag'] = '0'
            this.loadData(1);
          }
        }
      }
    },
    data () {
      return {
        description: '材料出库单管理页面',
        disableMixinCreated:true,
        // è¡¨å¤´
        columns: [
          {
            title: '#',
            dataIndex: '',
            key:'rowIndex',
            width:60,
            align:"center",
            customRender:function (t,r,index) {
              return parseInt(index)+1;
            }
          },
          {
            title:'班组编码',
            align:"center",
            dataIndex: 'num',
            width:100
          },
          {
            title:'班组名称',
            align:"center",
            dataIndex: 'name',
            width:100
          },
          {
            title:'创建人',
            align:"center",
            dataIndex: 'createBy',
            width:100,
          },
          {
            title:'创建日期',
            align:"center",
            dataIndex: 'createTime',
            width:100,
          },
          {
            title:'更新人',
            align:"center",
            dataIndex: 'updateBy',
            width:100,
          },
          {
            title:'更新日期',
            align:"center",
            dataIndex: 'updateTime',
            width:100,
          },
        ],
        url: {
          list: "/base/team/list",
        },
        dictOptions:{
        }
      }
    },
    created() {
    },
    computed: {
      importExcelUrl(){
        return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId}`;
      }
    },
    methods: {
      clearList(){
        this.dataSource=[]
        this.selectedRowKeys=[]
        this.ipagination.current = 1
      },
      handleAdd(){
       this.$refs.modalForm.title = "新增"
       this.$refs.modalForm.visible = true;
      }
    },
  }
</script>
<style scoped>
  @import '~@assets/less/common.less'
</style>
src/views/eam/depart/modules/TeamModal.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,341 @@
<template>
  <a-modal
    :title="title"
    :width="1600"
    :visible="visible"
    :confirmLoading="confirmLoading"
    :okButtonProps="{ props: {disabled: disableSubmit} }"
    @ok="handleOk"
    @cancel="handleCancel"
    cancelText="关闭"
  >
    <a-spin :spinning="confirmLoading">
      <a-form :form="form">
        <div class="table-page-search-wrapper">
          <a-form
            layout="inline"
            @keyup.enter.native="searchQuery"
          >
            <a-row :gutter="24">
              <a-col
                :md="6"
                :sm="8"
              >
                <a-form-item label="单据号">
                  <j-input
                    placeholder="请输入单据号检索"
                    v-model="queryParam.num"
                  ></j-input>
                </a-form-item>
              </a-col>
              <a-col
                :md="6"
                :sm="8"
              >
                <a-form-item label="设备名称">
                  <j-input
                    placeholder="请输入设备名称检索"
                    v-model="queryParam.equipmentName"
                  ></j-input>
                </a-form-item>
              </a-col>
              <a-col
                :md="6"
                :sm="8"
              >
                <a-button
                  type="primary"
                  @click="searchQuery"
                  icon="search"
                >查询</a-button>
                <a-button
                  @click="searchReset"
                  icon="reload"
                  style="margin-left:8px;"
                >重置</a-button>
              </a-col>
            </a-row>
            <a-row :gutter="24">
              <a-col :span="24">
              </a-col>
            </a-row>
          </a-form>
        </div>
        <div style="margin-top:8px;">
          <a-table
            ref="table"
            size="middle"
            bordered
            rowKey="id"
            :columns="columns"
            :dataSource="dataSource"
            :pagination="ipagination"
            :loading="confirmLoading"
            @change="handleTableChange"
            :customRow="clickThenCheck"
            :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
          >
          <span slot="faultDescription" slot-scope="text">
            <j-ellipsis :value="text" :length="10" />
          </span>
          </a-table>
        </div>
      </a-form>
    </a-spin>
  </a-modal>
</template>
<script>
import { postAction, getAction } from '@/api/manage'
import JDate from '@/components/jeecg/JDate'
import Tooltip from 'ant-design-vue/es/tooltip'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import JEllipsis from '@/components/jeecg/JEllipsis'//引入过长裁剪
import store from '@/store'
export default {
  name: "FaultReportRepair",
  mixins: [JeecgListMixin],
  components: {
    JDate,
    Tooltip,
    JEllipsis,
    store
  },
  props:{
      mainId:{
        type:String,
        required:false,
        default:"",
      }
  },
  watch:{
      mainId:{
        immediate: true,
        handler(val) {
          if(!this.mainId){
            this.clearList()
          }else{
            this.queryParam['noEqId'] = val
            this.loadData(1);
          }
        }
      }
    },
  data() {
    return {
      title: "选择故障报修信息",
      visible: false,
      model: {},
      dataSource: [],
      disableSubmit: false,
      type: "radio",
      /* åˆ†é¡µå‚æ•° */
      ipagination: {
        current: 1,
        pageSize: 10,
        pageSizeOptions: ['10', '20', '30'],
        showTotal: (total, range) => {
          return range[0] + "-" + range[1] + " å…±" + total + "条"
        },
        showQuickJumper: true,
        showSizeChanger: true,
        total: 0
      },
      labelCol: {
        xs: { span: 24 },
        sm: { span: 6 },
      },
      wrapperCol: {
        xs: { span: 24 },
        sm: { span: 18 },
      },
      confirmLoading: false,
      form: this.$form.createForm(this),
      columns: [
      {
          title: '#',
          dataIndex: '',
          key: 'rowIndex',
          width: 60,
          align: "center",
          customRender: function (t, r, index) {
            return parseInt(index) + 1;
          }
        },
        {
            title:'班组编码',
            align:"center",
            dataIndex: 'num',
            width:100
          },
          {
            title:'班组名称',
            align:"center",
            dataIndex: 'name',
            width:100
          },
          {
            title:'创建人',
            align:"center",
            dataIndex: 'createBy',
            width:100,
          },
          {
            title:'创建日期',
            align:"center",
            dataIndex: 'createTime',
            width:100,
          },
          {
            title:'更新人',
            align:"center",
            dataIndex: 'updateBy',
            width:100,
          },
          {
            title:'更新日期',
            align:"center",
            dataIndex: 'updateTime',
            width:100,
          },
      ],
      url: {
        list: "/base/team/list",
        add:  "/eam/repairOrder/addBySelectReport"
      },
    }
  },
  methods: {
    searchQuery() {
      this.loadData(1);
    },
    searchReset() {
      this.queryParam = {};
      this.loadData(1)
    },
    clickThenCheck(record) {
      return {
        on: {
          click: (e) => {
            this.selectedRowRecord = record;
            this.onSelectChange(record.id.split(","), [record]);
          }
        }
      };
    },
    onSelectChange(selectedRowKeys, selectionRows) {
      this.selectedRowKeys = selectedRowKeys;
      this.selectionRows = selectionRows;
    },
    close() {
      this.queryParam = {};
      this.$emit('close');
      this.visible = false;
    },
    handleOk() {
      const that = this;
      // è§¦å‘表单验证
      this.confirmLoading=true;
      if (that.selectedRowKeys.length === 0) {
        that.$message.error("请选择故障报修单后提交!")
        return false;
      }
      postAction(this.url.add,this.selectionRows).then(res=>{
        if(res.success){
          that.$message.success("领取成功!")
          that.$emit('ok');
        }else{
          that.$message.error("领取出现异常!")
        }
      }).finally(res=>{
        that.confirmLoading = false;
        that.close();
      });
    },
    handleCancel() {
      this.close();
    },
    clearList(){
        this.dataSource=[]
        this.selectedRowKeys=[]
        this.ipagination.current = 1
     },
  },
}
</script>
<style scoped>
.ant-btn {
  padding: 0 10px;
  margin-left: 3px;
}
.ant-form-item-control {
  line-height: 0px;
}
.fontweight {
  font-weight: bold;
}
/** ä¸»è¡¨å•行间距 */
.ant-form .ant-form-item {
  margin-bottom: 10px;
}
/** Tab页面行间距 */
.ant-tabs-content .ant-form-item {
  margin-bottom: 0px;
}
.ant-table-tbody .ant-table-row td {
  padding-top: 10px;
  padding-bottom: 10px;
}
.anty-row-operator button {
  margin: 0 5px;
}
.ant-btn-danger {
  background-color: #ffffff;
}
.ant-modal-cust-warp {
  height: 100%;
}
.ant-modal-cust-warp .ant-modal-body {
  height: calc(100% - 110px) !important;
  overflow-y: auto;
}
.ant-modal-cust-warp .ant-modal-content {
  height: 90% !important;
  overflow-y: hidden;
}
 .notshow {
  display: none;
}
.frozenRowClass {
  color: #c9c9c9;
}
.hight {
  color: #f5222d;
}
.middle {
  color: #fa8c16;
}
.low {
  color: #52c41a;
}
.dataUnKnow {
  color: #1890ff;
} .frozenRowClass {
  color: #c9c9c9;
}
</style>