| | |
| | | |
| | | <template> |
| | | <a-modal :title="title" :width="1000" :visible="visible" :maskClosable="false" @ok="handleOk" @cancel="handleCancel" |
| | | <a-modal :title="title" width="70%" :visible="visible" :maskClosable="false" @ok="handleOk" @cancel="handleCancel" |
| | | cancelText="关闭"> |
| | | <a-card :bordered="false"> |
| | | <!-- 查询区域 --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | <a-col :md="6" :sm="6"> |
| | | <a-form-item label="部门" > |
| | | <a-col :md="6" :sm="6" v-if="isDepartType == 0"> |
| | | <a-form-item label="部门" v-if="isDepartType == 0"> |
| | | <!--<a-select v-model="queryParam.sectionPid" placeholder="请选择部门" :options="sectionPData" @change="initGroupOptions" />--> |
| | | <a-tree-select |
| | | v-model="value" |
| | |
| | | placeholder="请选择部门" |
| | | tree-default-expand-all |
| | | > |
| | | <!--<span v-if="key === '0-0-1'" slot="title" slot-scope="{ key, value }" style="color: #08c">--> |
| | | <!--Child Node1 {{ value }}--> |
| | | <!--</span>--> |
| | | <!--<span v-if="key === '0-0-1'" slot="title" slot-scope="{ key, value }" style="color: #08c">--> |
| | | <!--Child Node1 {{ value }}--> |
| | | <!--</span>--> |
| | | </a-tree-select> |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <a-col :md="6" :sm="6"> |
| | | <a-form-item label="车间" > |
| | | <!--<a-select v-model="queryParam.sectionId" placeholder="请选择车间" :options="sectionData"/>--> |
| | | <!--<a-select v-model="queryParam.sectionId" placeholder="请选择团队" :options="sectionData"/>--> |
| | | <a-tree-select |
| | | v-model="valueProduct" |
| | | style="width: 100%" |
| | |
| | | </div> |
| | | <!-- table区域-begin --> |
| | | <div> |
| | | <a-table ref="table" size="middle" bordered rowKey="id" :scroll="{ y: 300 }" :columns="columns" |
| | | <a-table ref="table" size="middle" bordered rowKey="id" :scroll="{ y: 400 }" :columns="columns" |
| | | :dataSource="dataSource" :pagination="ipagination" :loading="loading" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
| | | @change="handleTableChange"> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import {mapActions} from 'vuex' |
| | | import { |
| | | ajaxGetSelectItems |
| | | } from '@/api/api' |
| | |
| | | import moment from 'moment' |
| | | |
| | | export default { |
| | | name: 'DeviceRepairListModel', |
| | | name: 'DeviceCalendarListModel', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | JDictSelectTag, |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | treeData:[], |
| | | readOnly:true, |
| | | isDepartType:'', |
| | | /*readOnly:true,*/ |
| | | title:'', |
| | | visible: false, |
| | | disableMixinCreated: true, |
| | | queryParam: {}, |
| | | columns: [{ |
| | | title: '设备编码', |
| | | align: 'center', |
| | | dataIndex: 'equipmentId', |
| | | }, |
| | | SelectedList:[], |
| | | treeData:[], |
| | | /*disableMixinCreated: true, |
| | | queryParam: {},*/ |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 60, |
| | | align: "center", |
| | | customRender: function (t, r, index) { |
| | | return parseInt(index) + 1; |
| | | } |
| | | },{ |
| | | |
| | | title: '设备编码', |
| | | align: 'center', |
| | | dataIndex: 'equipmentId', |
| | | }, |
| | | { |
| | | title: '设备名称', |
| | | align: 'center', |
| | |
| | | { |
| | | title: '驱动类型', |
| | | align: 'center', |
| | | dataIndex: 'driveType', |
| | | dataIndex: 'driveType' |
| | | }, |
| | | { |
| | | title: '数控系统', |
| | | align: 'center', |
| | | dataIndex: 'controlSystem', |
| | | } |
| | | dataIndex: 'controlSystem' |
| | | }, |
| | | ], |
| | | sectionPData: [], |
| | | sectionData: [], |
| | |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | this.queryTreeData() |
| | | }, |
| | | watch: { |
| | | value(value) { |
| | |
| | | this.queryParam.productionId = value |
| | | } |
| | | }, |
| | | |
| | | methods: { |
| | | openPage() { |
| | | this.visible = true |
| | | this.onClearSelected() |
| | | this.dataSource = []; |
| | | this.queryParam = { |
| | | status: this.status |
| | | }; |
| | | this.loadData(); |
| | | this.initOptions(); |
| | | this.initGroupOptions() |
| | | ...mapActions(['QueryDepartTree']), |
| | | queryTreeData() { |
| | | this.QueryDepartTree().then(res => { |
| | | if (res.success) { |
| | | this.isDepartType = res.result[0].value |
| | | } else { |
| | | // this.$message.warn(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() =>{ |
| | | }) |
| | | }, |
| | | onSelectChange(selectedRowKeys, selectionRows) { |
| | | // this.SelectedList.push(selectedRowKeys); |
| | |
| | | this.selectionRows = selectionRows |
| | | // this.SelectedList =[...this.SelectedList,...selectionRows]; |
| | | // console.log(this.SelectedList); |
| | | }, |
| | | handleTableChange(pagination, filters, sorter) { |
| | | // this.onClearSelected() |
| | | //分页、排序、筛选变化时触发 |
| | | //TODO 筛选 |
| | | if (Object.keys(sorter).length > 0) { |
| | | this.isorter.column = sorter.field; |
| | | this.isorter.order = "ascend" == sorter.order ? "asc" : "desc" |
| | | } |
| | | this.ipagination = pagination; |
| | | this.loadData(); |
| | | }, |
| | | openPage() { |
| | | this.visible = true |
| | | this.onClearSelected() |
| | | this.dataSource = []; |
| | | this.queryParam = { |
| | | status: this.status |
| | | }; |
| | | |
| | | this.loadData(); |
| | | this.initOptions(); |
| | | this.initGroupOptions() |
| | | }, |
| | | loadData(arg) { |
| | | if(!this.url.list){ |
| | |
| | | modalFormOk(val) { |
| | | // 新增/修改 成功时,重载列表 |
| | | this.loadData(); |
| | | |
| | | this.selectedRowKeys = [val.id]; |
| | | }, |
| | | searchQuery() { |
| | |
| | | this.close() |
| | | }, |
| | | handleOk() { |
| | | // this.selectionRows = this.SelectedList; |
| | | // console.log(this.selectionRows); |
| | | this.$emit('sendSelectionRows', this.selectionRows) |
| | | this.close() |
| | | }, |