| | |
| | | |
| | | |
| | | <a-table :columns="columns" :data-source="dataSource" bordered :pagination="false" :loading="loading" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys,selectedRows:selectionRows, onChange: onSelectChange}" |
| | | @change="handleTableChange" |
| | | :scroll="{y:456}" :size="size" rowKey="docId"> |
| | | |
| | |
| | | :treeData="treeDataSource" @check="handleTreeNodeCheck" @expand="handleTreeNodeExpand"> |
| | | <template slot="title" slot-scope="{ title, parentId, entity, key:treeKey,type}"> |
| | | <span v-if="title.indexOf(searchValue) > -1">{{ title.substr(0, title.indexOf(searchValue)) }}<span |
| | | class="replaceSearch">{{ searchValue }}</span>{{ title.substr(title.indexOf(searchValue) + searchValue.length) }}</span> |
| | | class="replaceSearch">{{ |
| | | searchValue |
| | | }}</span>{{ title.substr(title.indexOf(searchValue) + searchValue.length) }}</span> |
| | | <span v-else>{{ title }}</span> |
| | | </template> |
| | | </a-tree> |
| | |
| | | |
| | | // 指派到设备窗口点击确定指派设备后触发 |
| | | handleAssignDocumentToDevice() { |
| | | const { checkedKeys, selectedRowKeys, dataList, $confirm, $notification, currentDocumentInfo, queryParam: { applyReason }, $destroyAll, $bus } = this |
| | | const { publishFileId, attributionId, attributionType } = currentDocumentInfo |
| | | const { |
| | | checkedKeys, |
| | | selectedRowKeys, |
| | | selectionRows, |
| | | dataList, |
| | | $confirm, |
| | | $notification, |
| | | currentDocumentInfo, |
| | | queryParam: { applyReason }, |
| | | $destroyAll, |
| | | $bus |
| | | } = this |
| | | const { attributionId, attributionType } = currentDocumentInfo |
| | | const paramsArray = [] |
| | | // 过滤车间key仅放入设备key |
| | | const treeCheckedDeviceKeys = [] |
| | |
| | | onOk: () => { |
| | | // 双重循环确定每一组设备与文档的参数 |
| | | treeCheckedDeviceKeys.forEach(deviceId => { |
| | | selectedRowKeys.forEach(docId => { |
| | | selectionRows.forEach(({ docId, publishFileId }) => { |
| | | paramsArray.push({ |
| | | docId, |
| | | deviceId, |
| | |
| | | this.searchInput = '' |
| | | this.expandedKeys = [] |
| | | this.selectedRowKeys = [] |
| | | this.selectionRows = {} |
| | | this.checkedKeys = [] |
| | | this.filters = {} |
| | | this.isorter = Object.assign({}, this.defaultSorter) |