产品结构树:
1、实现文档批量删除功能
2、实现文档列表的排序以及筛选功能
设备结构树:
1、新增权限配置弹窗,提交后由后端测试
| | |
| | | assignPermissionToUser: ({ treeNodeType, treeNodeId, isAssignSonNode, userIdArray }) => { |
| | | return postAction(`/nc/product/assign/add/user/${treeNodeType}/${treeNodeId}/${isAssignSonNode}`, userIdArray) |
| | | }, |
| | | // ç§»é¤é¨é¨æé |
| | | // ç§»é¤ç¨æ·æé |
| | | removePermissionFromUser: ({ treeNodeType, treeNodeId, isAssignSonNode, userIdArray }) => { |
| | | return postAction(`/nc/product/assign/remove/user/${treeNodeType}/${treeNodeId}/${isAssignSonNode}`, userIdArray) |
| | | }, |
| | | |
| | | //-------------------------设å¤ç»ææ ------------------------------------------------ |
| | | // å é¤ææ¡£ |
| | | deleteDeviceRelativeDocumentApi: ({ docId, attributionId }) => deleteAction(`doc/relative/delete/device/${docId}/${attributionId}`) |
| | | deleteDeviceRelativeDocumentApi: ({ docId, attributionId }) => deleteAction(`doc/relative/delete/device/${docId}/${attributionId}`), |
| | | // è·åææéçç¨æ·å表 |
| | | getDeviceTreeHasPermissionUserApi: ({ type, key }) => getAction(`/nc/device/get/perm/user/${type}/${key}`), |
| | | // åé
ç¨æ¶æé |
| | | assignDeviceDeviceTreePermissionToUser: ({ treeNodeType, treeNodeId, isAssignSonNode, userIdArray }) => { |
| | | return postAction(`/nc/device/assign/add/user/${treeNodeType}/${treeNodeId}/${isAssignSonNode}`, userIdArray) |
| | | }, |
| | | // ç§»é¤ç¨æ·æé |
| | | removeDeviceTreePermissionFromUser: ({ treeNodeType, treeNodeId, isAssignSonNode, userIdArray }) => { |
| | | return postAction(`/nc/device/assign/remove/user/${treeNodeType}/${treeNodeId}/${isAssignSonNode}`, userIdArray) |
| | | }, |
| | | } |
| | |
| | | column: 'createTime', |
| | | order: 'desc', |
| | | }, |
| | | defaultSorter:{ |
| | | column: 'createTime', |
| | | order: 'desc', |
| | | }, |
| | | /* çéåæ° */ |
| | | filters: {}, |
| | | /* tableå è½½ç¶æ */ |
| | |
| | | this.ipagination.current = 1; |
| | | } |
| | | var params = this.getQueryParams();//æ¥è¯¢æ¡ä»¶ |
| | | console.log('params',params) |
| | | if(!params){ |
| | | return false; |
| | | } |
| | |
| | | </div> |
| | | </div> |
| | | </a-spin> |
| | | |
| | | <!--æéé
置弹çª--> |
| | | <AssignPermissionModal :currentTreeNodeInfo="rightClickSelected" @submitSuccess="getTreeDataByApi"/> |
| | | </a-card> |
| | | </template> |
| | | |
| | |
| | | import { mapActions } from 'vuex' |
| | | import { deleteAction } from '@/api/manage' |
| | | import DeviceStructureTreeContextMenu from './DeviceStructureTreeContextMenu' |
| | | import AssignPermissionModal from './Permission/AssignPermissionModal' |
| | | |
| | | export default { |
| | | name: 'DeviceStructureTree', |
| | | components: { |
| | | AssignPermissionModal, |
| | | DeviceStructureTreeContextMenu |
| | | }, |
| | | data() { |
| | |
| | | // è¥å³é®æ¶å½åå³ä¾§å±ç¤ºå±çº§ä¸ºè®¾å¤å±çº§ä¸å½åå³é®æ å±çº§å为设å¤å±çº§æ¶åå¨è§¦åå³é®èååè½æ¶åæ¶è§¦åå·¦é®éä¸åè½ |
| | | if (this.currentSelected.type === 2 && record.type === 2) this.handleTreeSelect([record.key], { node }) |
| | | this.rightClickSelected = Object.assign({}, record) |
| | | }, |
| | | |
| | | // æ èç¹å³é®åå»èåä¸å 餿鮿¶è§¦å |
| | | handleDelete() { |
| | | const that = this |
| | | that.$confirm({ |
| | | title: 'æç¤º', |
| | | content: '确认å 餿¤æ¡è®°å½åï¼', |
| | | okText: '确认', |
| | | okType: 'danger', |
| | | cancelText: 'åæ¶', |
| | | onOk: () => { |
| | | if (!this.url.delete) { |
| | | this.$message.error('请设置url.delete屿§!') |
| | | return |
| | | } |
| | | deleteAction(that.url.delete, { id: this.rightClickSelected.id }) |
| | | .then((res) => { |
| | | if (res.success) { |
| | | that.getTreeDataByApi() |
| | | that.$notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } else { |
| | | that.$notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | that.$destroyAll() |
| | | }) |
| | | }, |
| | | onCancel: () => { |
| | | that.$destroyAll() |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * èªå¨å±å¼æ·»å ä¸çº§èç¹çç¶èç¹ |
| | | */ |
| | | modalFormSubmitSuccess(isAddNextLevel) { |
| | | // 夿æ¯å¦ä¸ºæ·»å ä¸çº§å¹¶ä¸å¤æç¶èç¹æ¯å¦å±å¼ |
| | | if (isAddNextLevel && !this.expandedKeys.includes(this.rightClickSelected.id)) this.expandedKeys.push(this.rightClickSelected.id) |
| | | this.getTreeDataByApi() |
| | | }, |
| | | |
| | | /** |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-modal :visible="visible" :title="title" width="50%" :maskClosable="false" @cancel="handleModalClose" |
| | | :footer="null"> |
| | | <a-form-model layout="inline"> |
| | | <a-form-item label="åç§°"> |
| | | <a-input readOnly :value="currentTreeNodeInfo.title"></a-input> |
| | | </a-form-item> |
| | | <a-form-item label="æ¯å¦åæ¶é
ç½®åèç¹" v-if="currentTreeNodeInfo.type!==2"> |
| | | <a-switch v-model="isAssignSonNode"></a-switch> |
| | | </a-form-item> |
| | | </a-form-model> |
| | | |
| | | <a-tabs v-model="activeTabKey"> |
| | | <a-tab-pane :key="1" tab="åé
ç¨æ·"> |
| | | <UserPermissionTransfer ref="userPermissionTransferRef" :currentTreeNodeInfo="currentTreeNodeInfo" |
| | | :dataSource="allUsersList" :isAssignSonNode="isAssignSonNode"/> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | </a-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import dncApi from '@/api/dnc' |
| | | import UserPermissionTransfer from './UserPermissionTransfer' |
| | | import { queryProductionTreeList } from '@/api/api' |
| | | |
| | | export default { |
| | | name: 'AssignPermissionModal', |
| | | components: { UserPermissionTransfer }, |
| | | props: { |
| | | currentTreeNodeInfo: { |
| | | type: Object |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | visible: false, |
| | | title: '', |
| | | isAssignSonNode: true, |
| | | activeTabKey: 1, |
| | | allDepartmentsList: [], |
| | | allUsersList: [], |
| | | allTreeKeys: [], |
| | | hasLoadedDataTabKeyArray: [] |
| | | } |
| | | }, |
| | | watch: { |
| | | visible: { |
| | | handler(value) { |
| | | if (value) { |
| | | if (this.currentTreeNodeInfo.type === 1) this.isAssignSonNode = true |
| | | else this.isAssignSonNode = false |
| | | this.getAllUsersListByApi() |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | this.$bus.$on('treeMenuItemMethodTrigger', this.triggerCorrespondingMethod) |
| | | }, |
| | | methods: { |
| | | // ç¹å»æ èç¹å³é®èåæéé
ç½®æé®å触å |
| | | handleAssignPermission() { |
| | | this.visible = true |
| | | }, |
| | | |
| | | // è°ç¨æ¥å£è·åææç¨æ·å表 |
| | | getAllUsersListByApi() { |
| | | dncApi.getAllUsersListApi() |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.allUsersList = res.result.records.map(item => { |
| | | return { |
| | | ...item, |
| | | disabled: item.username === 'admin' |
| | | } |
| | | }) |
| | | this.$nextTick(() => this.$refs.userPermissionTransferRef.getHasPermissionUserByApi()) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | // æ§å¶å¼¹çªå
³é |
| | | handleModalClose() { |
| | | this.visible = false |
| | | }, |
| | | |
| | | triggerCorrespondingMethod({ methodName, modalTitle }) { |
| | | if (this[methodName]) { |
| | | this[methodName]() |
| | | this.title = modalTitle |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-spin :spinning="spinning"> |
| | | <a-transfer |
| | | class="transfer-container" |
| | | :data-source="dataSource" |
| | | show-search |
| | | :list-style="{flex:1,height: '500px'}" |
| | | :titles="['æªåé
ç¨æ·', 'å·²åé
ç¨æ·']" |
| | | :operations="['åé
ç¨æ·', 'ç§»é¤ç¨æ·']" |
| | | :target-keys="targetKeys" |
| | | :render="item => `${item.realname}`" |
| | | @change="handleChange" |
| | | :rowKey="record => record.id" |
| | | > |
| | | <span slot="notFoundContent">ææ æ°æ®</span> |
| | | </a-transfer> |
| | | </a-spin> |
| | | </template> |
| | | |
| | | <script> |
| | | import dncApi from '@/api/dnc' |
| | | |
| | | export default { |
| | | name: 'UserPermissionTransfer', |
| | | components: {}, |
| | | props: { |
| | | currentTreeNodeInfo: { |
| | | type: Object |
| | | }, |
| | | dataSource: { |
| | | type: Array |
| | | }, |
| | | isAssignSonNode: { |
| | | type: Boolean |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | targetKeys: [], |
| | | spinning: false |
| | | } |
| | | }, |
| | | methods: { |
| | | // è·åææéçç¨æ·å表 |
| | | getHasPermissionUserByApi() { |
| | | const that = this |
| | | that.spinning = true |
| | | that.targetKeys = [] |
| | | dncApi.getDeviceTreeHasPermissionUserApi(this.currentTreeNodeInfo) |
| | | .then(res => { |
| | | if (res.success) this.targetKeys = res.list.map(item => item.id) |
| | | }) |
| | | .finally(() => { |
| | | that.spinning = false |
| | | }) |
| | | }, |
| | | |
| | | handleChange(targetKeys, direction, moveKeys) { |
| | | const { currentTreeNodeInfo: { type, key }, isAssignSonNode, $notification, dataSource } = this |
| | | const that = this |
| | | let method |
| | | const params = { |
| | | treeNodeType: type, |
| | | treeNodeId: key, |
| | | isAssignSonNode: isAssignSonNode ? 1 : 2, |
| | | userIdArray: moveKeys |
| | | } |
| | | console.log('params--------------------------', params) |
| | | console.log(targetKeys, direction, moveKeys) |
| | | if (direction === 'right') { |
| | | method = dncApi.assignPermissionToUser |
| | | } else { |
| | | method = dncApi.removePermissionFromUser |
| | | } |
| | | that.spinning = true |
| | | method(params) |
| | | .then(res => { |
| | | if (res.success) { |
| | | $notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | this.targetKeys = targetKeys |
| | | } else { |
| | | $notification.error({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }) |
| | | .catch(err => { |
| | | $notification.error({ |
| | | message: 'æ¶æ¯', |
| | | description: err.message |
| | | }) |
| | | }) |
| | | .finally(() => { |
| | | that.spinning = false |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="less"> |
| | | .transfer-container { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | </style> |
| | |
| | | <a-row :gutter="24"> |
| | | <a-col :md="7" :sm="7"> |
| | | <a-form-item label="æä»¶åç§°"> |
| | | <a-input placeholder="请è¾å
¥æä»¶åç§°" v-model="queryParam.docName"></a-input> |
| | | <a-input placeholder="请è¾å
¥æä»¶åç§°" v-model="queryParam.docName" allow-clear></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <a-col :md="11" :sm="11"> |
| | | <a-form-item label="ä¸ä¼ æ¶é´"> |
| | | <a-range-picker v-model="queryParam.collectTime"></a-range-picker> |
| | | <a-range-picker v-model="date" value-format="YYYY-MM-DD" |
| | | @change="handleDateChange" allow-clear></a-range-picker> |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | |
| | | |
| | | <a-table :columns="columns" :data-source="dataSource" bordered :pagination="false" :loading="loading" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
| | | @change="handleTableChange" |
| | | :scroll="{y:456}" :size="size" rowKey="docId"> |
| | | |
| | | </a-table> |
| | |
| | | <a-tree blockNode checkable :checkedKeys="checkedKeys" :expandedKeys.sync="expandedKeys" |
| | | :autoExpandParent="autoExpandParent" @select="handleTreeNodeSelect" |
| | | :treeData="treeDataSource" @check="handleTreeNodeCheck" @expand="handleTreeNodeExpand"> |
| | | <template slot="title" slot-scope="{ label, parentId, entity, key:treeKey,type}"> |
| | | <span v-if="label.indexOf(searchValue) > -1">{{ label.substr(0, label.indexOf(searchValue)) }}<span |
| | | class="replaceSearch">{{ searchValue }}</span>{{ label.substr(label.indexOf(searchValue) + searchValue.length) }}</span> |
| | | <span v-else>{{ label }}</span> |
| | | <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> |
| | | <span v-else>{{ title }}</span> |
| | | </template> |
| | | </a-tree> |
| | | </div> |
| | |
| | | import { getAction } from '@/api/manage' |
| | | import dncApi from '@/api/dnc' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import { mapActions } from 'vuex' |
| | | |
| | | export default { |
| | | name: 'NcDocumentAssignModal', |
| | |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | { title: 'æä»¶åç§°', dataIndex: 'docName', align: 'center', width: 300 }, |
| | | { |
| | | title: 'æä»¶åç§°', |
| | | dataIndex: 'docName', |
| | | key: 'docName', |
| | | align: 'center', |
| | | width: 300, |
| | | sorter: true |
| | | }, |
| | | { title: '设å¤ç¼å·', dataIndex: 'docCode', align: 'center' }, |
| | | { title: 'åºåºç¶æ', dataIndex: 'pullStatus_dictText', align: 'center' }, |
| | | { title: 'ç¶ æ', dataIndex: 'docStatus_dictText', align: 'center' }, |
| | | { title: 'ä¸ä¼ æ¶é´', dataIndex: 'createTime', align: 'center', width: 200 } |
| | | { |
| | | title: 'åºåºç¶æ', |
| | | dataIndex: 'pullStatus_dictText', |
| | | key: 'pullStatus', |
| | | align: 'center', |
| | | filters: [ |
| | | { text: 'æªåºåº', value: 1 }, |
| | | { text: 'å·²åºåº', value: 2 } |
| | | ] |
| | | }, |
| | | { |
| | | title: 'ç¶ æ', |
| | | dataIndex: 'docStatus_dictText', |
| | | key: 'docStatus', |
| | | align: 'center', |
| | | filters: [ |
| | | { text: '设计', value: 1 }, |
| | | { text: 'åå¸', value: 2 }, |
| | | { text: '彿¡£', value: 3 } |
| | | ] |
| | | }, |
| | | { |
| | | title: 'å建æ¶é´', |
| | | dataIndex: 'createTime', |
| | | align: 'center', |
| | | width: 200, |
| | | sorter: true |
| | | } |
| | | ], |
| | | searchValue: '', |
| | | searchInput: '', |
| | |
| | | expandedKeys: [], |
| | | autoExpandParent: true, |
| | | isExpandAllTreeNode: false, |
| | | date: [], |
| | | url: { |
| | | list: '/nc/doc/find/list' |
| | | } |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | ...mapActions(['QueryProduction']), |
| | | |
| | | // è·åå½åå·¥åºæå·¥æ¥å¯¹åºææ¡£å表 |
| | | loadData() { |
| | | this.dataSource = [] |
| | | if (!this.url.list) { |
| | |
| | | return |
| | | } |
| | | var params = this.getQueryParams()//æ¥è¯¢æ¡ä»¶ |
| | | if (!params) { |
| | | return false |
| | | } |
| | | if (!params) return false |
| | | const { attributionType, attributionId, param } = this.currentDocumentInfo |
| | | params.attributionType = attributionType |
| | | params.attributionId = attributionId |
| | | params.docClassCode = param |
| | | console.log('params', params) |
| | | this.loading = true |
| | | getAction(this.url.list, params).then((res) => { |
| | | if (res.success) this.dataSource = res.result |
| | |
| | | }) |
| | | }, |
| | | |
| | | // è·åDNCè®¾å¤æ |
| | | getDocumentAssignDeviceTreeByApi() { |
| | | this.spinning = true |
| | | this.treeDataSource = [] |
| | | dncApi.getDocumentAssignDeviceTreeApi(this.currentDocumentInfo) |
| | | this.QueryProduction('DNC') |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.dataList = [] |
| | | this.allTreeKeys = [] |
| | | this.treeDataSource = res.list |
| | | this.treeDataSource = res.result |
| | | this.generateList(this.treeDataSource) |
| | | this.expandedKeys = this.allTreeKeys |
| | | } else { |
| | | this.$message.warn(res.message) |
| | | } |
| | |
| | | }) |
| | | }, |
| | | |
| | | // æ¶é´éæ©å¨éæ©å®æå触å |
| | | handleDateChange(value) { |
| | | this.queryParam.startTime = value[0] |
| | | this.queryParam.endTime = value[1] |
| | | }, |
| | | |
| | | /** |
| | | * è¡¨æ ¼å页ãæåºæ¹åãçéæ¶è§¦å |
| | | * @param pagination å页å¨é项 |
| | | * @param filters çéé项 |
| | | * @param sorter æåºé项 |
| | | */ |
| | | handleTableChange(pagination, filters, sorter) { |
| | | if (sorter.order) { |
| | | this.isorter.column = sorter.field |
| | | this.isorter.order = sorter.order === 'ascend' ? 'asc' : 'desc' |
| | | } else { |
| | | this.isorter.column = 'createTime' |
| | | this.isorter.order = 'desc' |
| | | } |
| | | for (let key in filters) { |
| | | this.filters[key] = filters[key].join(',') |
| | | } |
| | | this.loadData() |
| | | }, |
| | | |
| | | // ææ´¾å°è®¾å¤çªå£ç¹å»ç¡®å®ææ´¾è®¾å¤å触å |
| | | handleAssignDocumentToDevice() { |
| | | const { checkedKeys, selectedRowKeys, dataList, $confirm, $notification, currentDocumentInfo, queryParam: { applyReason }, $set } = this |
| | | const { publishFileId, attributionId } = currentDocumentInfo |
| | | const { checkedKeys, selectedRowKeys, dataList, $confirm, $notification, currentDocumentInfo, queryParam: { applyReason }, $destroyAll, $bus } = this |
| | | const { publishFileId, attributionId, attributionType } = currentDocumentInfo |
| | | const paramsArray = [] |
| | | // è¿æ»¤åç»Idä»
æ¾å
¥è®¾å¤Id |
| | | // è¿æ»¤è½¦é´keyä»
æ¾å
¥è®¾å¤key |
| | | const treeCheckedDeviceKeys = [] |
| | | checkedKeys.forEach(checkedKey => { |
| | | const deviceId = dataList.find(item => item.key === checkedKey && item.type === 2) |
| | | if (deviceId) treeCheckedDeviceKeys.push(deviceId.key) |
| | | const device = dataList.find(item => item.key === checkedKey && item.type === 2) |
| | | if (device) treeCheckedDeviceKeys.push(device.key) |
| | | }) |
| | | |
| | | if (treeCheckedDeviceKeys.length === 0 || selectedRowKeys.length === 0) { |
| | |
| | | okText: '确认', |
| | | cancelText: 'åæ¶', |
| | | onOk: () => { |
| | | // åé循ç¯ç¡®å®æ¯ä¸ç»è®¾å¤ä¸ææ¡£çåæ° |
| | | treeCheckedDeviceKeys.forEach(deviceId => { |
| | | selectedRowKeys.forEach(docId => { |
| | | paramsArray.push({ |
| | | docId, |
| | | deviceId, |
| | | fileId: publishFileId, |
| | | processId: attributionId, |
| | | attributionId, |
| | | attributionType, |
| | | applyReason |
| | | }) |
| | | }) |
| | |
| | | dncApi.assignDocumentToDeviceApi(item) |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.$bus.$emit('reloadMainBottomTableData', 'useDocumentEquipment') |
| | | $bus.$emit('reloadMainBottomTableData', 'useDocumentEquipment') |
| | | $notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | |
| | | description: err.message |
| | | }) |
| | | }) |
| | | .finally(() => { |
| | | $destroyAll() |
| | | }) |
| | | console.log('paramsArray', paramsArray) |
| | | }) |
| | | }, |
| | | onCancel: () => { |
| | | $destroyAll() |
| | | } |
| | | }) |
| | | // console.log('table', this.selectedRowKeys) |
| | | // console.log('treeCheckedDeviceKeys', treeCheckedDeviceKeys) |
| | | // console.log('currentDocumentInfo', this.currentDocumentInfo) |
| | | }, |
| | | |
| | | /* è¾å
¥æ¥è¯¢å
容ååæ¶è§¦å */ |
| | |
| | | this.checkedKeys = checkedKeys |
| | | }, |
| | | |
| | | /** |
| | | * æ èç¹é䏿¶è§¦åï¼æ¨¡ææ èç¹å¤éæ¡é䏿¶çææï¼ |
| | | * @param selectedKeys éä¸èç¹key |
| | | * @param {node} node èç¹å¯¹è±¡ |
| | | */ |
| | | handleTreeNodeSelect(selectedKeys, { node }) { |
| | | node.$el.childNodes[1].click() |
| | | }, |
| | |
| | | |
| | | /** |
| | | * éå½è·å¾æææ èç¹key |
| | | * @param data |
| | | * @param data è®¾å¤æ æ°æ® |
| | | */ |
| | | generateList(data) { |
| | | for (let i = 0; i < data.length; i++) { |
| | | data[i].key = data[i].id |
| | | const node = data[i] |
| | | const key = node.id |
| | | const title = node.label |
| | | const key = node.key |
| | | const title = node.title |
| | | const type = node.type |
| | | this.dataList.push({ key, title, type }) |
| | | this.allTreeKeys.push(key) |
| | |
| | | this.expandedKeys = [] |
| | | this.selectedRowKeys = [] |
| | | this.checkedKeys = [] |
| | | this.filters = {} |
| | | this.isorter = Object.assign({}, this.defaultSorter) |
| | | } |
| | | } |
| | | } |
| | |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | { title: 'æä»¶åç§°', dataIndex: 'docName', align: 'center' }, |
| | | { |
| | | title: 'æä»¶åç§°', |
| | | dataIndex: 'docName', |
| | | key: 'docName', |
| | | align: 'center', |
| | | width: 300, |
| | | sorter: true |
| | | }, |
| | | { title: '代ç çæ¬', dataIndex: 'docAlias', align: 'center' }, |
| | | { title: 'åºåºç¶æ', dataIndex: 'pullStatus_dictText', align: 'center' }, |
| | | { title: 'ç¶ æ', dataIndex: 'docStatus_dictText', align: 'center' }, |
| | | { title: 'ç³»ç»æå®çæ¬', dataIndex: 'publishVersion', align: 'center' }, |
| | | { title: 'ä¸ä¼ æ¶é´', dataIndex: 'createTime', align: 'center' } |
| | | { |
| | | title: 'åºåºç¶æ', |
| | | dataIndex: 'pullStatus_dictText', |
| | | key: 'pullStatus', |
| | | align: 'center', |
| | | filters: [ |
| | | { text: 'æªåºåº', value: 1 }, |
| | | { text: 'å·²åºåº', value: 2 } |
| | | ] |
| | | }, |
| | | { |
| | | title: 'ç¶ æ', |
| | | dataIndex: 'docStatus_dictText', |
| | | key: 'docStatus', |
| | | align: 'center', |
| | | filters: [ |
| | | { text: '设计', value: 1 }, |
| | | { text: 'åå¸', value: 2 }, |
| | | { text: '彿¡£', value: 3 } |
| | | ] |
| | | }, |
| | | { title: 'ç³»ç»æå®çæ¬', dataIndex: 'publishVersion', align: 'center', width: 200 }, |
| | | { |
| | | title: 'å建æ¶é´', |
| | | dataIndex: 'createTime', |
| | | align: 'center', |
| | | width: 200, |
| | | sorter: true |
| | | } |
| | | ], |
| | | dataSource: [], |
| | | currentRightClickedDocumentInfo: {}, |
| | |
| | | //å è½½æ°æ® è¥ä¼ å
¥åæ°1åå 载第ä¸é¡µçå
容 |
| | | if (arg === 1) this.ipagination.current = 1 |
| | | var params = this.getQueryParams()//æ¥è¯¢æ¡ä»¶ |
| | | console.log('currentTreeNodeInfo', this.currentTreeNodeInfo) |
| | | params.attributionId = this.currentTreeNodeInfo.id |
| | | params.attributionType = this.currentTreeNodeInfo.type |
| | | params.docClassCode = 'NC' |
| | |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * è¡¨æ ¼å页ãæåºæ¹åãçéæ¶è§¦å |
| | | * @param pagination å页å¨é项 |
| | | * @param filters çéé项 |
| | | * @param sorter æåºé项 |
| | | */ |
| | | handleTableChange(pagination, filters, sorter) { |
| | | if (sorter.order) { |
| | | this.isorter.column = sorter.field |
| | | this.isorter.order = sorter.order === 'ascend' ? 'asc' : 'desc' |
| | | } else { |
| | | this.isorter.column = 'createTime' |
| | | this.isorter.order = 'desc' |
| | | } |
| | | for (let key in filters) { |
| | | this.filters[key] = filters[key].join(',') |
| | | } |
| | | this.ipagination = pagination |
| | | this.loadData() |
| | | }, |
| | | |
| | | handleDocumentEdit(record, modalTitle) { |
| | | this.$refs.modalForm.edit(record) |
| | | this.$refs.modalForm.title = modalTitle |
| | | }, |
| | | |
| | | handleDocumentAssign(record, modalTitle) { |
| | | if (!this.$refs.documentAssignModalRef) return |
| | | this.$refs.documentAssignModalRef.title = modalTitle |
| | | this.$refs.documentAssignModalRef.visible = true |
| | | }, |
| | |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | { title: 'æä»¶åç§°', dataIndex: 'docName', align: 'center' }, |
| | | { |
| | | title: 'æä»¶åç§°', |
| | | dataIndex: 'docName', |
| | | key: 'docName', |
| | | align: 'center', |
| | | width: 300, |
| | | sorter: true |
| | | }, |
| | | { title: '设å¤ç¼å·', dataIndex: 'docCode', align: 'center' }, |
| | | { title: 'åºåºç¶æ', dataIndex: 'pullStatus_dictText', align: 'center' }, |
| | | { title: 'ç¶ æ', dataIndex: 'docStatus_dictText', align: 'center' }, |
| | | { title: 'ç³»ç»æå®çæ¬', dataIndex: 'publishVersion', align: 'center' }, |
| | | { title: 'ä¸ä¼ æ¶é´', dataIndex: 'createTime', align: 'center' } |
| | | { |
| | | title: 'åºåºç¶æ', |
| | | dataIndex: 'pullStatus_dictText', |
| | | key: 'pullStatus', |
| | | align: 'center', |
| | | filters: [ |
| | | { text: 'æªåºåº', value: 1 }, |
| | | { text: 'å·²åºåº', value: 2 } |
| | | ] |
| | | }, |
| | | { |
| | | title: 'ç¶ æ', |
| | | dataIndex: 'docStatus_dictText', |
| | | key: 'docStatus', |
| | | align: 'center', |
| | | filters: [ |
| | | { text: '设计', value: 1 }, |
| | | { text: 'åå¸', value: 2 }, |
| | | { text: '彿¡£', value: 3 } |
| | | ] |
| | | }, |
| | | { title: 'ç³»ç»æå®çæ¬', dataIndex: 'publishVersion', align: 'center', width: 200 }, |
| | | { |
| | | title: 'å建æ¶é´', |
| | | dataIndex: 'createTime', |
| | | align: 'center', |
| | | width: 200, |
| | | sorter: true |
| | | } |
| | | ], |
| | | dataSource: [], |
| | | currentClickedDocumentInfo: {}, |
| | |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * è¡¨æ ¼å页ãæåºæ¹åãçéæ¶è§¦å |
| | | * @param pagination å页å¨é项 |
| | | * @param filters çéé项 |
| | | * @param sorter æåºé项 |
| | | */ |
| | | handleTableChange(pagination, filters, sorter) { |
| | | if (sorter.order) { |
| | | this.isorter.column = sorter.field |
| | | this.isorter.order = sorter.order === 'ascend' ? 'asc' : 'desc' |
| | | } else { |
| | | this.isorter.column = 'createTime' |
| | | this.isorter.order = 'desc' |
| | | } |
| | | for (let key in filters) { |
| | | this.filters[key] = filters[key].join(',') |
| | | } |
| | | this.ipagination = pagination |
| | | this.loadData() |
| | | }, |
| | | |
| | | handleDocumentEdit(record, modalTitle) { |
| | | this.$refs.modalForm.edit(record) |
| | | this.$refs.modalForm.title = modalTitle |
| | |
| | | </a-form-model> |
| | | |
| | | <a-tabs v-model="activeTabKey"> |
| | | <a-tab-pane :key="1" tab="åé
é¨é¨"> |
| | | <a-tab-pane :key="1" tab="åé
车é´"> |
| | | <DepartPermissionTransfer ref="departPermissionTransferRef" :currentTreeNodeInfo="currentTreeNodeInfo" |
| | | :treeDataProps="allDepartmentsList" :allTreeKeys="allTreeKeys" |
| | | :isAssignSonNode="isAssignSonNode"/> |
| | |
| | | this.visible = true |
| | | }, |
| | | |
| | | // è°ç¨æ¥å£è·åææé¨é¨å表 |
| | | // è°ç¨æ¥å£è·åææè½¦é´å表 |
| | | getAllDepartmentsListByApi() { |
| | | this.allTreeKeys = [] |
| | | queryProductionTreeList() |
| | |
| | | this.$refs.departPermissionTransferRef.expandedKeys = this.allTreeKeys |
| | | this.$refs.departPermissionTransferRef.flatten(JSON.parse(JSON.stringify(this.allDepartmentsList))) |
| | | }) |
| | | // åªæä¸æ¬¡éåºæ¶å¨é¨é¨åé
tabç颿ä¼è¿å
¥æ¤å¤æ |
| | | // åªæä¸æ¬¡éåºæ¶å¨è½¦é´åé
tabç颿ä¼è¿å
¥æ¤å¤æ |
| | | // è¥ä¸æ¬¡éåºæ¶å¨ç¨æ·åé
tabçé¢å忬¡è¿å
¥æ¶keyç±2å为1æ¶ä¼è§¦åwatchçæµactiveTabKeyåååä¼å°key:1å å
¥hasLoadedDataTabKeyArrayï¼å æ¤æ é忬¡å å
¥key:1 |
| | | if (!this.hasLoadedDataTabKeyArray.includes(this.activeTabKey)) this.hasLoadedDataTabKeyArray.push(this.activeTabKey) |
| | | } |
| | |
| | | :data-source="dataSource" |
| | | show-search |
| | | :list-style="{flex:1,height: '500px'}" |
| | | :titles="['æªåé
é¨é¨', 'å·²åé
é¨é¨']" |
| | | :operations="['åé
é¨é¨', 'ç§»é¤é¨é¨']" |
| | | :titles="['æªåé
车é´', 'å·²åé
车é´']" |
| | | :operations="['åé
车é´', 'ç§»é¤è½¦é´']" |
| | | :target-keys="targetKeys" |
| | | :render="item => `${item.title}`" |
| | | @change="handleChange" |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | // è°ç¨æ¥å£è·åææéçé¨é¨å表 |
| | | // è°ç¨æ¥å£è·åææéç车é´å表 |
| | | getHasPermissionDepartByApi() { |
| | | const that = this |
| | | that.spinning = true |
| | |
| | | </a-tab-pane> |
| | | |
| | | <TableContextMenu :tableRowInfo="currentRightClickedTableRowInfo" ref="tableContextMenuRef"/> |
| | | |
| | | <DocumentBatchDeleteModal :currentDocumentInfo="currentRightClickedTableRowInfo" :size="tableContainerSize" |
| | | @reloadDocumentListData="reloadDocumentListData" ref="documentBatchDeleteModalRef"/> |
| | | </a-tabs> |
| | | </template> |
| | | |
| | |
| | | import NcDocumentTableList from './Document/NcDocumentTableList' |
| | | import OtherDocumentTableList from './Document/OtherDocumentTableList' |
| | | import TableContextMenu from '../../../common/TableContextMenu' |
| | | import DocumentBatchDeleteModal from '../../../common/DocumentBatchDeleteModal' |
| | | |
| | | export default { |
| | | name: 'ProductStructureMainTop', |
| | | components: { TableContextMenu, OtherDocumentTableList, NcDocumentTableList }, |
| | | components: { DocumentBatchDeleteModal, TableContextMenu, OtherDocumentTableList, NcDocumentTableList }, |
| | | data() { |
| | | return { |
| | | activeTabKey: 1, |
| | |
| | | }) |
| | | }, |
| | | |
| | | handleBatchRemove(modalTitle) { |
| | | if (!this.$refs.documentBatchDeleteModalRef) return |
| | | this.$refs.documentBatchDeleteModalRef.title = modalTitle |
| | | this.$refs.documentBatchDeleteModalRef.visible = true |
| | | }, |
| | | |
| | | /** |
| | | * åºåºå½åå³é®éä¸ææ¡£ |
| | | * @param menuLabel |
| | |
| | | <template> |
| | | <div> |
| | | <a-modal width="65%" :title="title" :visible="visible" @cancel="visible=false" :maskClosable="false" centered |
| | | @ok="confirmBatchDeleteDocument"> |
| | | <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-input placeholder="请è¾å
¥æä»¶åç§°" v-model="queryParam.docName" allow-clear></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <a-col :md="8" :sm="8"> |
| | | <a-form-item label="å建æ¶é´"> |
| | | <a-range-picker v-model="date" value-format="YYYY-MM-DD" @change="handleDateChange" |
| | | allow-clear></a-range-picker> |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <a-col :md="4" :sm="4"> |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | |
| | | <a-table :columns="columns" :data-source="dataSource" bordered :pagination="ipagination" :loading="loading" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" @change="handleTableChange" |
| | | :scroll="{y:380}" :size="size" rowKey="docId" style="min-height: 480px"> |
| | | <span slot="docName" slot-scope="text">{{text}}</span> |
| | | </a-table> |
| | | </a-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getAction } from '@/api/manage' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import dncApi from '@/api/dnc' |
| | | |
| | | export default { |
| | | name: 'DocumentBatchDeleteModal', |
| | | components: {}, |
| | | data() { |
| | | return {} |
| | | mixins: [JeecgListMixin], |
| | | props: { |
| | | currentDocumentInfo: { |
| | | type: Object |
| | | }, |
| | | methods: {} |
| | | size: { |
| | | type: String |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | disableMixinCreated: true, |
| | | visible: false, |
| | | title: '', |
| | | date: [], |
| | | columns: [ |
| | | { |
| | | title: 'åºå·', |
| | | dataIndex: 'rowIndex', |
| | | key: 'rowIndex', |
| | | width: 65, |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | { |
| | | title: 'æä»¶åç§°', |
| | | dataIndex: 'docName', |
| | | key: 'docName', |
| | | align: 'center', |
| | | width: 300, |
| | | sorter: true |
| | | }, |
| | | { title: '设å¤ç¼å·', dataIndex: 'docCode', align: 'center' }, |
| | | { |
| | | title: 'åºåºç¶æ', |
| | | dataIndex: 'pullStatus_dictText', |
| | | key: 'pullStatus', |
| | | align: 'center', |
| | | filters: [ |
| | | { text: 'æªåºåº', value: 1 }, |
| | | { text: 'å·²åºåº', value: 2 } |
| | | ], |
| | | }, |
| | | { |
| | | title: 'ç¶ æ', |
| | | dataIndex: 'docStatus_dictText', |
| | | key: 'docStatus', |
| | | align: 'center', |
| | | filters: [ |
| | | { text: '设计', value: 1 }, |
| | | { text: 'åå¸', value: 2 }, |
| | | { text: '彿¡£', value: 3 } |
| | | ], |
| | | }, |
| | | { title: 'ç³»ç»æå®çæ¬', dataIndex: 'publishVersion', align: 'center', width: 200 }, |
| | | { |
| | | title: 'å建æ¶é´', |
| | | dataIndex: 'createTime', |
| | | align: 'center', |
| | | width: 200, |
| | | sorter: true |
| | | } |
| | | ], |
| | | spinning: false, |
| | | url: { |
| | | list: '/nc/doc/find/page' |
| | | } |
| | | } |
| | | }, |
| | | watch: { |
| | | visible: { |
| | | handler(value) { |
| | | if (value) { |
| | | this.resetData() |
| | | this.loadData() |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | // è·åå½åå·¥åºæå·¥æ¥å¯¹åºææ¡£å表 |
| | | loadData() { |
| | | this.dataSource = [] |
| | | if (!this.url.list) { |
| | | this.$message.error('请设置url.list屿§!') |
| | | return |
| | | } |
| | | |
| | | var params = this.getQueryParams()//æ¥è¯¢æ¡ä»¶ |
| | | if (!params) return false |
| | | const { attributionType, attributionId, param } = this.currentDocumentInfo |
| | | params.attributionType = attributionType |
| | | params.attributionId = attributionId |
| | | params.docClassCode = param |
| | | console.log('params', params) |
| | | this.loading = true |
| | | getAction(this.url.list + `/${this.ipagination.current}/${this.ipagination.pageSize}`, params).then((res) => { |
| | | if (res.success) { |
| | | this.dataSource = res.result.records |
| | | if (res.result.total) { |
| | | this.ipagination.total = res.result.total |
| | | } else { |
| | | this.ipagination.total = 0 |
| | | } |
| | | } |
| | | else this.$message.warning(res.message) |
| | | }).finally(() => { |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * è¡¨æ ¼å页ãæåºæ¹åãçéæ¶è§¦å |
| | | * @param pagination å页å¨é项 |
| | | * @param filters çéé项 |
| | | * @param sorter æåºé项 |
| | | */ |
| | | handleTableChange(pagination, filters, sorter) { |
| | | if (sorter.order) { |
| | | this.isorter.column = sorter.field |
| | | this.isorter.order = sorter.order === 'ascend' ? 'asc' : 'desc' |
| | | } else { |
| | | this.isorter.column = 'createTime' |
| | | this.isorter.order = 'desc' |
| | | } |
| | | for (let key in filters) { |
| | | this.filters[key] = filters[key].join(',') |
| | | } |
| | | this.ipagination = pagination |
| | | this.loadData() |
| | | }, |
| | | |
| | | // æ¶é´éæ©å¨éæ©å®æå触å |
| | | handleDateChange(value) { |
| | | this.queryParam.startTime = value[0] |
| | | this.queryParam.endTime = value[1] |
| | | }, |
| | | |
| | | // 确认æ¹éå é¤ææ¡£ |
| | | confirmBatchDeleteDocument() { |
| | | const that = this |
| | | const { selectedRowKeys, $notification, $confirm, currentDocumentInfo: { param, attributionId } } = that |
| | | |
| | | if (selectedRowKeys.length === 0) { |
| | | $notification.warning({ |
| | | message: 'æ¶æ¯', |
| | | description: 'è¯·éæ©ææ¡£' |
| | | }) |
| | | return |
| | | } |
| | | |
| | | $confirm({ |
| | | title: 'æç¤º', |
| | | content: `å é¤åä¸å¯åæ¶ï¼ç¡®è®¤å é¤åï¼`, |
| | | okText: '确认', |
| | | cancelText: 'åæ¶', |
| | | onOk: () => { |
| | | let hasRequestedSuccessCount = 0 |
| | | let hasRequestedCount = 0 |
| | | selectedRowKeys.forEach(key => { |
| | | dncApi.deleteDocumentApi(key) |
| | | .then(res => { |
| | | if (res.success) { |
| | | $notification.success({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | hasRequestedSuccessCount++ |
| | | } else { |
| | | $notification.error({ |
| | | message: 'æ¶æ¯', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | hasRequestedCount++ |
| | | if (hasRequestedCount === selectedRowKeys.length && hasRequestedSuccessCount > 0) { |
| | | this.loadData() |
| | | this.$emit('reloadDocumentListData', { docClassCode: param, attributionId }) |
| | | } |
| | | }) |
| | | }) |
| | | that.$destroyAll() |
| | | }, |
| | | onCancel: () => { |
| | | that.$destroyAll() |
| | | } |
| | | }) |
| | | |
| | | |
| | | }, |
| | | |
| | | resetData() { |
| | | this.queryParam = {} |
| | | this.selectedRowKeys = [] |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
| | |
| | | { label: '导å
¥NCç¨åº', code: 'document_import', subMenu: [], icon: 'import', isCommonMethod: true }, |
| | | { label: 'ä¸è½½', code: 'document_download', subMenu: [], icon: 'download', isCommonMethod: true }, |
| | | { label: 'å é¤', code: 'document_delete', subMenu: [], icon: 'delete', isCommonMethod: true }, |
| | | { label: 'æ¹éå é¤', code: 'document_batch_remove', subMenu: [], icon: 'delete', isCommonMethod: false }, |
| | | { label: 'æ¹éå é¤', code: 'document_batch_remove', subMenu: [], icon: 'delete', isCommonMethod: true }, |
| | | { |
| | | label: 'çå½å¨æ', |
| | | subMenu: [ |
| | |
| | | { label: '导å
¥ææ¡£', code: 'document_import', subMenu: [], icon: 'import', isCommonMethod: true }, |
| | | { label: 'ä¸è½½', code: 'document_download', subMenu: [], icon: 'download', isCommonMethod: true }, |
| | | { label: 'å é¤', code: 'document_delete', subMenu: [], icon: 'delete', isCommonMethod: true }, |
| | | { label: 'æ¹éå é¤', code: 'document_batch_remove', subMenu: [], icon: 'delete', isCommonMethod: false }, |
| | | { label: 'æ¹éå é¤', code: 'document_batch_remove', subMenu: [], icon: 'delete', isCommonMethod: true }, |
| | | { |
| | | label: 'çå½å¨æ', |
| | | subMenu: [ |
| | |
| | | { label: '导å
¥NCç¨åº', code: 'document_import', subMenu: [], icon: 'import', isCommonMethod: true }, |
| | | { label: 'ä¸è½½', code: 'document_download', subMenu: [], icon: 'download', isCommonMethod: true }, |
| | | { label: 'å é¤', code: 'document_delete', subMenu: [], icon: 'delete', isCommonMethod: true }, |
| | | { label: 'æ¹éå é¤', code: 'document_batch_remove', subMenu: [], icon: 'delete', isCommonMethod: false }, |
| | | { label: 'æ¹éå é¤', code: 'document_batch_remove', subMenu: [], icon: 'delete', isCommonMethod: true }, |
| | | { |
| | | label: 'çå½å¨æ', |
| | | subMenu: [ |
| | |
| | | { label: '导å
¥NCç¨åº', code: 'document_import', subMenu: [], icon: 'import', isCommonMethod: true }, |
| | | { label: 'ä¸è½½', code: 'document_download', subMenu: [], icon: 'download', isCommonMethod: true }, |
| | | { label: 'å é¤', code: 'document_delete', subMenu: [], icon: 'delete', isCommonMethod: true }, |
| | | { label: 'æ¹éå é¤', code: 'document_batch_remove', subMenu: [], icon: 'delete', isCommonMethod: false }, |
| | | { label: 'æ¹éå é¤', code: 'document_batch_remove', subMenu: [], icon: 'delete', isCommonMethod: true }, |
| | | { |
| | | label: 'çå½å¨æ', |
| | | subMenu: [ |
| | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="ç»ä¸ç¼ç " :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentId"> |
| | | <a-input-search :readOnly="true" |
| | | v-model="model.equipmentId" |
| | | :disabled="disSearch" @search="deviceSearch" enter-button placeholder='è¯·éæ©ç»ä¸ç¼ç ' /> |
| | | <a-input-search v-model="model.equipmentId" :disabled="disableSubmit" @search="deviceSearch" enter-button |
| | | placeholder='è¯·éæ©ç»ä¸ç¼ç '/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="设å¤åç§°" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input :disabled="disSearch" :readOnly="disableSubmit" allow-clear placeholder="请è¾å
¥è®¾å¤åç§°" |
| | | <a-input :disabled="disableSubmit" allow-clear placeholder="请è¾å
¥è®¾å¤åç§°" |
| | | v-model="model.equipmentName"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-model-item v-if="isDepartType == 0" label="é¨é¨åé
" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!departDisabled"> |
| | | <j-select-equipment-depart :disabled="disableSubmit" v-model="model.selectedDeparts" :multi="false" @back="backDepartInfo" :backDepart="true" :treeOpera="true"></j-select-equipment-depart> |
| | | <a-form-model-item v-if="isDepartType == 0" label="é¨é¨åé
" :labelCol="labelCol" :wrapperCol="wrapperCol" |
| | | v-show="!departDisabled"> |
| | | <j-select-equipment-depart :disabled="disableSubmit" v-model="model.selectedDeparts" :multi="false" |
| | | @back="backDepartInfo" :backDepart="true" |
| | | :treeOpera="true"></j-select-equipment-depart> |
| | | </a-form-model-item> |
| | | |
| | | <a-form-model-item v-if="isDepartType == -1" label="设å¤ç±»å" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-select :disabled="disableSubmit" :readOnly="disableSubmit" placeholder="è¯·éæ©è®¾å¤ç±»å" |
| | | <a-select :disabled="disableSubmit" placeholder="è¯·éæ©è®¾å¤ç±»å" |
| | | :triggerChange="true" |
| | | v-model="model.equipmentType"> |
| | | <a-select-option v-for='item in selectList' :key='item.id' :value='item.equipmentTypeName'> |
| | |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="车é´åé
" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!productionDisabled" ref="selectedProduction" prop="selectedProduction"> |
| | | <a-form-model-item label="车é´åé
" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!productionDisabled" |
| | | ref="selectedProduction" prop="selectedProduction"> |
| | | <!--<j-select-equipment-production v-decorator="['selectedProduction',{rules:[{required:true,message:'è¯·éæ©è½¦é´!'}]}]" :multi="false" @back="backProductionInfo" :backProduction="true" :treeProductOpera="true"></j-select-equipment-production>--> |
| | | <j-select-equipment-production :disabled="disableSubmit" v-model="model.selectedProduction" :multi="false" @back="backProductionInfo" :backProduction="true" :treeProductOpera="true"></j-select-equipment-production> |
| | | <j-select-equipment-production :disabled="disableSubmit" v-model="model.selectedProduction" :multi="false" |
| | | @back="backProductionInfo" :backProduction="true" |
| | | :treeProductOpera="true"></j-select-equipment-production> |
| | | </a-form-model-item> |
| | | |
| | | </a-col> |
| | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-model-item v-if="isDepartType == -1" label="ç³»ç»çæ¬å·" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input :disabled="disableSubmit" :readOnly="disableSubmit" allow-clear placeholder="请è¾å
¥ç³»ç»çæ¬å·" |
| | | <a-input :disabled="disableSubmit" allow-clear placeholder="请è¾å
¥ç³»ç»çæ¬å·" |
| | | v-model="model.systemVersion"/> |
| | | </a-form-model-item> |
| | | <a-form-model-item v-if="isDepartType == 0" label="设å¤ç±»å" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-select :disabled="disableSubmit" :readOnly="disableSubmit" placeholder="è¯·éæ©è®¾å¤ç±»å" |
| | | <a-select :disabled="disableSubmit" placeholder="è¯·éæ©è®¾å¤ç±»å" |
| | | :triggerChange="true" |
| | | v-model="model.equipmentType"> |
| | | <a-select-option v-for='item in selectList' :key='item.id' :value='item.equipmentTypeName'> |
| | |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="设å¤åç(kw)" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input :disabled="disableSubmit" :readOnly="disableSubmit" allow-clear placeholder="请è¾å
¥è®¾å¤åç" |
| | | <a-input :disabled="disableSubmit" allow-clear placeholder="请è¾å
¥è®¾å¤åç" |
| | | v-model="model.devicePower"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="æºåºIP" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input :disabled="true" :readOnly="disableSubmit" placeholder="请è¾å
¥æºåºIP" |
| | | <a-input :disabled="true" placeholder="请è¾å
¥æºåºIP" |
| | | v-model="model.equipmentIp"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="æºåºç«¯å£" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input :disabled="true" :readOnly="disableSubmit" placeholder="请è¾å
¥æºåºç«¯å£" |
| | | <a-input :disabled="true" placeholder="请è¾å
¥æºåºç«¯å£" |
| | | v-model="model.dataPort"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="驱å¨ç±»å" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <j-dict-select-tag :disabled="true" :readOnly="disableSubmit" placeholder="è¯·éæ©é©±å¨ç±»å" |
| | | <j-dict-select-tag :disabled="true" placeholder="è¯·éæ©é©±å¨ç±»å" |
| | | :triggerChange="true" dictCode="mdc_driveType" |
| | | v-model="model.driveType" allow-clear/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="设å¤åå·" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input :disabled="true" :readOnly="disableSubmit" allow-clear placeholder="请è¾å
¥è®¾å¤åå·" |
| | | <a-input :disabled="true" allow-clear placeholder="请è¾å
¥è®¾å¤åå·" |
| | | v-model="model.equipmentModel"/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="ç³»ç»ç±»å" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <j-dict-select-tag placeholder="è¯·éæ©ç³»ç»ç±»å" :triggerChange="true" dictCode="system_type" v-model="model.systemType" allow-clear/> |
| | | <j-dict-select-tag placeholder="è¯·éæ©ç³»ç»ç±»å" :triggerChange="true" dictCode="system_type" :disabled="disableSubmit" |
| | | v-model="model.systemType" allow-clear/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="设å¤çº§å«" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <j-dict-select-tag placeholder="è¯·éæ©è®¾å¤çº§å«" dictCode="device_level" v-model="model.deviceLevel" allow-clear/> |
| | | <j-dict-select-tag placeholder="è¯·éæ©è®¾å¤çº§å«" dictCode="device_level" v-model="model.deviceLevel" :disabled="disableSubmit" allow-clear/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="设å¤ç§ç±»" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <j-dict-select-tag placeholder="è¯·éæ©è®¾å¤ç§ç±»" dictCode="device_category" v-model="model.deviceCategory" allow-clear/> |
| | | <j-dict-select-tag placeholder="è¯·éæ©è®¾å¤ç§ç±»" dictCode="device_category" v-model="model.deviceCategory" :disabled="disableSubmit" |
| | | allow-clear/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | |
| | | |
| | | <a-row :gutter="24" v-if="systemType"> |
| | | <a-col :span='24'> |
| | | <a-form-model-item label="ç³»ç»ç±»å" :labelCol="{span:3}" :wrapperCol="{span:21}"> |
| | | <a-radio-group name="radioGroup" v-model="systemValue"> |
| | | <a-form-model-item label="ç³»ç»ç±»å" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> |
| | | <a-radio-group name="radioGroup" v-model="systemValue" :disabled="disableSubmit"> |
| | | <a-radio value="1">DNC</a-radio> |
| | | <a-radio value="2">MDC</a-radio> |
| | | <a-radio value="3">éç¨</a-radio> |
| | |
| | | |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | <a-form-model-item :labelCol="{span:3}" :wrapperCol="{span:21}" label="夿³¨"> |
| | | <a-form-model-item :labelCol="labelColLong" :wrapperCol="wrapperColLong" label="夿³¨"> |
| | | <a-textarea :disabled="disableSubmit" :readOnly="disableSubmit" placeholder="请è¾å
¥å¤æ³¨" |
| | | v-model="model.remark"/> |
| | | </a-form-model-item> |
| | |
| | | import pick from 'lodash.pick' |
| | | import moment from 'moment' |
| | | import Vue from 'vue' |
| | | import { ACCESS_TOKEN } from "@/store/mutation-types" |
| | | import { ACCESS_TOKEN } from '@/store/mutation-types' |
| | | import { getAction } from '@/api/manage' |
| | | import { addEquipment,editEquipment} from '@/api/api' |
| | | import { disabledAuthFilter } from "@/utils/authFilter" |
| | | import { disabledAuthFilter } from '@/utils/authFilter' |
| | | import { duplicateCheck } from '@/api/api' |
| | | import JSelectEquipmentProduction from '../../../../../components/jeecgbiz/JSelectEquipmentProduction' |
| | | import JSelectProduction from '../../../../../components/jeecgbiz/JSelectProduction' |
| | | import DeviceListModel from './DeviceListModal' |
| | | import JSelectEquipmentDepart from '../../../../../components/jeecgbiz/JSelectEquipmentDepart' |
| | | import {mapActions} from 'vuex' |
| | | |
| | | export default { |
| | | name: "UserModal", |
| | | name: 'UserModal', |
| | | components: { |
| | | JSelectProduction, |
| | | JSelectEquipmentDepart, |
| | |
| | | }, |
| | | data () { |
| | | return { |
| | | disSearch:false, |
| | | departDisabled: false, //æ¯å¦æ¯æçé¨é¨è°ç¨è¯¥é¡µé¢ |
| | | productionDisabled: false, //æ¯å¦æ¯æç车é´è°ç¨è¯¥é¡µé¢ |
| | | roleDisabled: false, //æ¯å¦æ¯è§è²ç»´æ¤è°ç¨è¯¥é¡µé¢ |
| | |
| | | drawerWidth:700, |
| | | modalToggleFlag:true, |
| | | confirmDirty: false, |
| | | userId:"", //ä¿åç¨æ·id |
| | | userId: '', //ä¿åç¨æ·id |
| | | // disableSubmit:false, |
| | | disableSubmit: true, |
| | | dateFormat:"YYYY-MM-DD", |
| | | dateFormat: 'YYYY-MM-DD', |
| | | form: this.$form.createForm(this), |
| | | |
| | | validatorRules:{ |
| | |
| | | [ |
| | | { |
| | | required: true, message: 'è¯·éæ©è®¾å¤ç¼å·!' |
| | | }, |
| | | } |
| | | // { |
| | | // validator: this.validatequipmentId |
| | | // } |
| | |
| | | |
| | | }, |
| | | departIdShow:false, |
| | | title:"æä½", |
| | | title: 'æä½', |
| | | visible: false, |
| | | model: { |
| | | equipmentId: "", |
| | | equipmentName: "", |
| | | equipmentModel: "", |
| | | equipmentIp: "", |
| | | dataPort: "", |
| | | driveType: "", |
| | | systemType: "", |
| | | deviceLevel: "", |
| | | deviceCategory: "", |
| | | deviceTypeDnc:"", |
| | | deviceTypeMdc:"", |
| | | equipmentId: '', |
| | | equipmentName: '', |
| | | equipmentModel: '', |
| | | equipmentIp: '', |
| | | dataPort: '', |
| | | driveType: '', |
| | | systemType: '', |
| | | deviceLevel: '', |
| | | deviceCategory: '', |
| | | deviceTypeDnc: '', |
| | | deviceTypeMdc: '' |
| | | }, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 8 }, |
| | | sm: { span: 8 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 15 }, |
| | | sm: { span: 14 } |
| | | }, |
| | | labelColLong: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 4 } |
| | | }, |
| | | wrapperColLong: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 19 } |
| | | }, |
| | | uploadLoading:false, |
| | | confirmLoading: false, |
| | | headers:{}, |
| | | systemType:false, |
| | | systemValue:"3", |
| | | systemValue: '3', |
| | | url: { |
| | | fileUpload: window._CONFIG['domianURL']+"/sys/common/upload", |
| | | userWithDepart: "/mdc/mdcEquipment/equipmentDepartList", // å¼å
¥ä¸ºæå®ç¨æ·æ¥çé¨é¨ä¿¡æ¯éè¦çurl |
| | | fileUpload: window._CONFIG['domianURL'] + '/sys/common/upload', |
| | | userWithDepart: '/mdc/mdcEquipment/equipmentDepartList', // å¼å
¥ä¸ºæå®ç¨æ·æ¥çé¨é¨ä¿¡æ¯éè¦çurl |
| | | //å¼å
¥ä¸ºæå®ç¨æ·æ¥ç车é´ä¿¡æ¯éè¦çurl |
| | | userProductionList: '/mdc/mdcEquipment/equipmentProductionList', |
| | | userId:"/sys/user/generateUserId", // å¼å
¥çææ·»å ç¨æ·æ
åµä¸çurl |
| | | syncUserByUserName:"/act/process/extActProcess/doSyncUserByUserName",//åæ¥ç¨æ·å°å·¥ä½æµ |
| | | userId: '/sys/user/generateUserId', // å¼å
¥çææ·»å ç¨æ·æ
åµä¸çurl |
| | | syncUserByUserName: '/act/process/extActProcess/doSyncUserByUserName',//åæ¥ç¨æ·å°å·¥ä½æµ |
| | | queryTenantList: '/sys/tenant/queryList', |
| | | check:'/sys/duplicate/check', |
| | | queryEquipmentType:'/mdc/mdcEquipmentType/queryEquipmentType' |
| | |
| | | } |
| | | }, |
| | | created () { |
| | | const token = Vue.ls.get(ACCESS_TOKEN); |
| | | this.headers = {"X-Access-Token":token} |
| | | const token = Vue.ls.get(ACCESS_TOKEN) |
| | | this.headers = { 'X-Access-Token': token } |
| | | this.queryGroup() |
| | | this.queryTreeData() |
| | | this.getAppPlatformName(); |
| | | this.getAppPlatformName() |
| | | // this.initRoleList() |
| | | // this.initTenantList() |
| | | }, |
| | | computed:{ |
| | | uploadAction:function () { |
| | | return this.url.fileUpload; |
| | | return this.url.fileUpload |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | this.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | }) |
| | | } |
| | | }).finally(() =>{ |
| | | }) |
| | |
| | | getAppPlatformName(){ |
| | | getAction(`/system/sysParams/query/by/settingKey?settingKey=system_type`).then(res=>{ |
| | | if(res.success){ |
| | | this.systemType = res.result.settingValue === '0'; |
| | | this.systemType = res.result.settingValue === '0' |
| | | } |
| | | }) |
| | | }, |
| | |
| | | this.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | }) |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | this.$refs.deviceListModel.disableSubmit = false |
| | | }, |
| | | add () { |
| | | this.refresh(); |
| | | this.edit({activitiSync:'1',userIdentity:1,equipmentId:"",equipmentName:"",equipmentModel:"",equipmentIp:'',dataPort:"",driveType:"",controlSystem:"",saveTableName:""}); |
| | | this.refresh() |
| | | this.edit({ |
| | | activitiSync: '1', |
| | | userIdentity: 1, |
| | | equipmentId: '', |
| | | equipmentName: '', |
| | | equipmentModel: '', |
| | | equipmentIp: '', |
| | | dataPort: '', |
| | | driveType: '', |
| | | controlSystem: '', |
| | | saveTableName: '' |
| | | }) |
| | | }, |
| | | edit (record) { |
| | | let that = this; |
| | | that.visible = true; |
| | | let that = this |
| | | that.visible = true |
| | | //æ ¹æ®å±å¹å®½åº¦èªéåºæ½å±å®½åº¦ |
| | | this.resetScreenSize(); |
| | | this.resetScreenSize() |
| | | |
| | | // that.userId = record.id; |
| | | // console.log(record) |
| | | if (record.systemValue!=null){ |
| | | this.systemValue=record.systemValue; |
| | | this.systemValue = record.systemValue |
| | | }else { |
| | | this.systemValue="3" |
| | | this.systemValue = '3' |
| | | } |
| | | that.model = Object.assign({}, record); |
| | | that.model = Object.assign({}, record) |
| | | // that.model = Object.assign({},{selectedroles:'',selectedProduction:''}, record); |
| | | // this.model = Object.assign({}, record) |
| | | |
| | |
| | | this.form.setFieldsValue(pick(that.model, 'selectedDeparts', 'selectedProduction', 'equipmentId', 'equipmentName', 'equipmentModel', 'equipmentType', 'equipmentIp', 'dataPort', |
| | | 'driveType', 'sortNo', 'remark','systemVersion','devicePower','controlSystem','saveTableName','systemValue')) |
| | | }) |
| | | if(record.hasOwnProperty("id")){ |
| | | if (record.hasOwnProperty('id')) { |
| | | // that.getUserRoles(record.id); |
| | | that.getUserDeparts(record.id); |
| | | that.getUserDeparts(record.id) |
| | | } |
| | | // console.log('that.model=',that.model) |
| | | }, |
| | | isDisabledAuth(code){ |
| | | return disabledAuthFilter(code); |
| | | return disabledAuthFilter(code) |
| | | }, |
| | | //çªå£æå¤§å忢 |
| | | toggleScreen(){ |
| | | if(this.modalToggleFlag){ |
| | | this.modalWidth = window.innerWidth; |
| | | this.modalWidth = window.innerWidth |
| | | }else{ |
| | | this.modalWidth = 800; |
| | | this.modalWidth = 800 |
| | | } |
| | | this.modalToggleFlag = !this.modalToggleFlag; |
| | | this.modalToggleFlag = !this.modalToggleFlag |
| | | }, |
| | | // æ ¹æ®å±å¹åå,设置æ½å±å°ºå¯¸ |
| | | resetScreenSize(){ |
| | | let screenWidth = document.body.clientWidth; |
| | | let screenWidth = document.body.clientWidth |
| | | if(screenWidth < 500){ |
| | | this.drawerWidth = screenWidth; |
| | | this.drawerWidth = screenWidth |
| | | }else{ |
| | | this.drawerWidth = 700; |
| | | this.drawerWidth = 700 |
| | | } |
| | | }, |
| | | getUserDeparts(userid){ |
| | | let that = this; |
| | | let that = this |
| | | //é¨é¨çurl |
| | | getAction(that.url.userWithDepart,{equipmentId:userid}).then((res)=>{ |
| | | if(res.success){ |
| | | // console.log(res.result) |
| | | let departOptions=[]; |
| | | let departOptions = [] |
| | | let selectDepartKeys=[] |
| | | for (let i = 0; i < res.result.length; i++) { |
| | | selectDepartKeys.push(res.result[i].key); |
| | | selectDepartKeys.push(res.result[i].key) |
| | | //æ°å¢è´è´£é¨é¨éæ©ä¸ææ¡ |
| | | departOptions.push({ |
| | | value: res.result[i].key, |
| | |
| | | }) |
| | | } |
| | | |
| | | that.model.selectedDeparts = selectDepartKeys.join(",") |
| | | that.model.selectedDeparts = selectDepartKeys.join(',') |
| | | // that.model.selectedProduction = selectDepartKeys.join(",") |
| | | |
| | | that.nextDepartOptions=departOptions; |
| | | that.nextDepartOptions = departOptions |
| | | // console.log('that.nextDepartOptions=',that.nextDepartOptions) |
| | | } |
| | | }) |
| | |
| | | getAction(that.url.userProductionList,{equipmentId:userid}).then((res)=>{ |
| | | if(res.success){ |
| | | // console.log(res.result) |
| | | let ProductionOptions=[]; |
| | | let ProductionOptions = [] |
| | | let selectProductKeys=[] |
| | | // console.log(res.result) |
| | | for (let i = 0; i < res.result.length; i++) { |
| | | selectProductKeys.push(res.result[i].key); |
| | | selectProductKeys.push(res.result[i].key) |
| | | //æ°å¢è´è´£é¨é¨éæ©ä¸ææ¡ |
| | | ProductionOptions.push({ |
| | | value: res.result[i].key, |
| | |
| | | }) |
| | | } |
| | | |
| | | that.model.selectedProduction = selectProductKeys.join(",") |
| | | that.model.selectedProduction = selectProductKeys.join(',') |
| | | |
| | | that.nextProductionOptions=ProductionOptions; |
| | | that.nextProductionOptions = ProductionOptions |
| | | // console.log('that.nextProductionOptions=',that.nextProductionOptions) |
| | | } |
| | | }) |
| | |
| | | }, |
| | | backDepartInfo(info) { |
| | | // console.log(info) |
| | | this.model.departIds = this.model.selectedDeparts; |
| | | this.model.departIds = this.model.selectedDeparts |
| | | this.nextDepartOptions = info.map((item,index,arr)=>{ |
| | | let c = {label:item.text, value: item.value+""} |
| | | return c; |
| | | let c = { label: item.text, value: item.value + '' } |
| | | return c |
| | | }) |
| | | }, |
| | | backProductionInfo(info) { |
| | | // console.log(info) |
| | | this.model.productionIds = this.model.selectedProduction; |
| | | this.model.productionIds = this.model.selectedProduction |
| | | this.nextProductionOptions = info.map((item,index,arr)=>{ |
| | | let c = {label:item.text, value: item.value+""} |
| | | return c; |
| | | let c = { label: item.text, value: item.value + '' } |
| | | return c |
| | | }) |
| | | }, |
| | | |
| | | refresh () { |
| | | this.userId="" |
| | | this.nextDepartOptions=[]; |
| | | this.nextProductionOptions = []; |
| | | this.departIdShow=false; |
| | | this.userId = '' |
| | | this.nextDepartOptions = [] |
| | | this.nextProductionOptions = [] |
| | | this.departIdShow = false |
| | | }, |
| | | close () { |
| | | this.$emit('close'); |
| | | this.visible = false; |
| | | this.disableSubmit = false; |
| | | this.nextDepartOptions=[]; |
| | | this.$emit('close') |
| | | this.visible = false |
| | | this.disableSubmit = false |
| | | this.nextDepartOptions = [] |
| | | this.nextProductionOptions = [] |
| | | this.departIdShow=false; |
| | | this.departIdShow = false |
| | | // this.$refs.form.resetFields(); |
| | | }, |
| | | moment, |
| | | handleSubmit () { |
| | | const that = this; |
| | | const that = this |
| | | // 触å表åéªè¯ |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | that.confirmLoading = true; |
| | | that.confirmLoading = true |
| | | //妿æ¯ä¸çº§æ©ä¼ å
¥departIds,å¦å为空 |
| | | // if(this.model.userIdentity!==2){ |
| | | // this.model.departIds=""; |
| | | // } |
| | | let obj; |
| | | let obj |
| | | if(!this.model.id){ |
| | | this.model.id = this.userId; |
| | | this.model.systemValue=this.systemValue; |
| | | obj=addEquipment(this.model); |
| | | this.model.id = this.userId |
| | | this.model.systemValue = this.systemValue |
| | | obj = addEquipment(this.model) |
| | | }else{ |
| | | this.model.systemValue=this.systemValue; |
| | | this.model.systemValue = this.systemValue |
| | | obj=editEquipment(this.model,{ |
| | | id: this.model.id |
| | | }); |
| | | }) |
| | | } |
| | | obj.then((res)=>{ |
| | | if(res.success){ |
| | | that.$notification.success({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | that.$emit('ok'); |
| | | }) |
| | | that.$emit('ok') |
| | | }else{ |
| | | that.$notification.warning({ |
| | | message:'æ¶æ¯', |
| | | description:res.message |
| | | }); |
| | | }) |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false; |
| | | that.close(); |
| | | that.confirmLoading = false |
| | | that.close() |
| | | }) |
| | | }else{ |
| | | return false; |
| | | return false |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | handleConfirmBlur(e) { |
| | | const value = e.target.value; |
| | | const value = e.target.value |
| | | this.confirmDirty = this.confirmDirty || !!value |
| | | }, |
| | | identityChange(e){ |
| | | if(e.target.value===1){ |
| | | this.departIdShow=false; |
| | | this.departIdShow = false |
| | | }else{ |
| | | this.departIdShow=true; |
| | | this.departIdShow = true |
| | | } |
| | | }, |
| | | /** |
| | |
| | | removeValidate(){ |
| | | this.$refs.form.clearValidate() |
| | | } |
| | | }, |
| | | } |
| | | |
| | | } |
| | | </script> |
| | |
| | | width:104px; |
| | | height:104px; |
| | | } |
| | | |
| | | .ant-upload-select-picture-card i { |
| | | font-size: 49px; |
| | | color: #999; |