art:设备管理-基础数据-附件管理,工艺参数,精度参数 新增
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <j-modal |
| | | :title="title" |
| | | :width="800" |
| | | :visible="visible" |
| | | switchFullscreen |
| | | @ok="handleOk" |
| | | @cancel="handleCancel" |
| | | :footer="null" |
| | | cancelText="å
³é"> |
| | | <a-spin :spinning="confirmLoading"> |
| | | <img v-if="isImage" :src="fileUrl" width="100%" height="100%" alt="å¾çé¢è§" /> |
| | | <iframe v-else-if="isPdf" :src="fileUrl" width="100%" height="600px"></iframe> |
| | | <video v-else-if="isVideo" controls> |
| | | <source :src="fileUrl" type="video/mp4"> |
| | | æ¨çæµè§å¨ä¸æ¯æ video æ ç¾ã |
| | | </video> |
| | | <pre v-else-if="isText">{{ textContent }}</pre> |
| | | <h1 v-else>䏿¯æé¢è§ï¼è¯·ä¸è½½åæ¥ç</h1> |
| | | </a-spin> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getFileAccessHttpUrl } from '@/api/manage' |
| | | |
| | | export default { |
| | | props: { |
| | | fileUrl: String |
| | | }, |
| | | data() { |
| | | return { |
| | | title: 'é¢è§', |
| | | textContent: '', |
| | | confirmLoading: false, |
| | | visible: false |
| | | } |
| | | }, |
| | | computed: { |
| | | isImage() { |
| | | return /\.(jpeg|jpg|png|gif|bmp|webp)$/i.test(this.fileUrl) |
| | | }, |
| | | isPdf() { |
| | | return /\.pdf$/i.test(this.fileUrl) |
| | | }, |
| | | isVideo() { |
| | | return /\.(mp4|webm|ogg)$/i.test(this.fileUrl) |
| | | }, |
| | | isText() { |
| | | return /\.(txt|md|json|xml|yaml|yml)$/i.test(this.fileUrl) |
| | | } |
| | | }, |
| | | watch: { |
| | | fileUrl: 'fetchTextContent' |
| | | }, |
| | | mounted() { |
| | | if (this.isText) { |
| | | this.fetchTextContent() |
| | | } |
| | | }, |
| | | methods: { |
| | | async fetchTextContent() { |
| | | try { |
| | | const response = await fetch(this.fileUrl) |
| | | if (!response.ok) throw new Error('ç½ç»ååºä¸æ¯OK') |
| | | const text = await response.text() |
| | | this.textContent = text |
| | | } catch (error) { |
| | | console.error('è·åææ¬å
容失败:', error) |
| | | this.textContent = 'æ æ³å è½½ææ¬å
容' |
| | | } |
| | | }, |
| | | close() { |
| | | this.$emit('close') |
| | | this.visible = false |
| | | }, |
| | | preview(fileUrl) { |
| | | let url = getFileAccessHttpUrl(fileUrl) |
| | | this.visible = true |
| | | this.fileUrl = url |
| | | }, |
| | | handleOk() { |
| | | this.close() |
| | | }, |
| | | handleCancel() { |
| | | this.close() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | |
| | | /deep/ .ant-modal { |
| | | height: 80%; |
| | | /* æ»å¨æ¡ä¼å start */ |
| | | ::-webkit-scrollbar{ |
| | | width:8px; |
| | | height:8px; |
| | | } |
| | | |
| | | .ant-modal-content { |
| | | height: 100%; |
| | | display: flex; |
| | | flex-direction: column; |
| | | |
| | | .ant-modal-body { |
| | | flex: 1; |
| | | overflow: auto; |
| | | } |
| | | } |
| | | } |
| | | |
| | | pre { |
| | | overflow: visible; |
| | | } |
| | | |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div :id="containerId" style="position: relative"> |
| | | |
| | | <!-- ---------------------------- begin å¾ç左峿¢ä½ç½® ------------------------------------- --> |
| | | <div class="movety-container" :style="{top:top+'px',left:left+'px',display:moveDisplay}" |
| | | style="padding:0 8px;position: absolute;z-index: 91;height: 32px;width: 104px;text-align: center;"> |
| | | <div :id="containerId+'-mover'" :class="showMoverTask?'uploadty-mover-mask':'movety-opt'" |
| | | style="margin-top: 12px"> |
| | | <a @click="moveLast" style="margin: 0 5px;"> |
| | | <a-icon type="arrow-left" style="color: #fff;font-size: 16px" /> |
| | | </a> |
| | | <a @click="moveNext" style="margin: 0 5px;"> |
| | | <a-icon type="arrow-right" style="color: #fff;font-size: 16px" /> |
| | | </a> |
| | | </div> |
| | | </div> |
| | | <!-- ---------------------------- end å¾ç左峿¢ä½ç½® ------------------------------------- --> |
| | | |
| | | <a-upload |
| | | name="file" |
| | | :multiple="multiple" |
| | | :action="uploadAction" |
| | | :headers="headers" |
| | | :data="{'biz':bizPath}" |
| | | :fileList="fileList" |
| | | :beforeUpload="doBeforeUpload" |
| | | @change="handleChange" |
| | | :disabled="disabled" |
| | | :listType="complistType" |
| | | @preview="handlePreview" |
| | | :class="{'uploadty-disabled':disabled}"> |
| | | <template> |
| | | <div v-if="isImageComp"> |
| | | <a-icon type="plus" /> |
| | | <div class="ant-upload-text">{{ text }}</div> |
| | | </div> |
| | | <a-button v-else-if="buttonVisible"> |
| | | <a-icon type="upload" /> |
| | | {{ text }} |
| | | </a-button> |
| | | </template> |
| | | </a-upload> |
| | | <a-modal :visible="previewVisible" :footer="null" @cancel="handleCancel"> |
| | | <img alt="example" style="width: 100%" :src="previewImage" /> |
| | | </a-modal> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import Vue from 'vue' |
| | | import { ACCESS_TOKEN } from '@/store/mutation-types' |
| | | import { getFileAccessHttpUrl } from '@/api/manage' |
| | | |
| | | const FILE_TYPE_ALL = 'all' |
| | | const FILE_TYPE_IMG = 'image' |
| | | const FILE_TYPE_TXT = 'file' |
| | | const uidGenerator = () => { |
| | | return '-' + parseInt(Math.random() * 10000 + 1, 10) |
| | | } |
| | | const getFileName = (path) => { |
| | | if (path.lastIndexOf('\\') >= 0) { |
| | | let reg = new RegExp('\\\\', 'g') |
| | | path = path.replace(reg, '/') |
| | | } |
| | | return path.substring(path.lastIndexOf('/') + 1) |
| | | } |
| | | export default { |
| | | name: 'LXUpload', |
| | | data() { |
| | | return { |
| | | uploadAction: window._CONFIG['domianURL'] + '/eam/sysFiles/upload', |
| | | headers: {}, |
| | | fileList: [], |
| | | newFileList: [], |
| | | uploadGoOn: true, |
| | | previewVisible: false, |
| | | //---------------------------- begin å¾ç左峿¢ä½ç½® ------------------------------------- |
| | | previewImage: '', |
| | | containerId: '', |
| | | top: '', |
| | | left: '', |
| | | moveDisplay: 'none', |
| | | showMoverTask: false, |
| | | moverHold: false, |
| | | currentImg: '' |
| | | //---------------------------- end å¾ç左峿¢ä½ç½® ------------------------------------- |
| | | } |
| | | }, |
| | | props: { |
| | | text: { |
| | | type: String, |
| | | required: false, |
| | | default: 'ç¹å»ä¸ä¼ ' |
| | | }, |
| | | fileType: { |
| | | type: String, |
| | | required: false, |
| | | default: FILE_TYPE_ALL |
| | | }, |
| | | /*è¿ä¸ªå±æ§ç¨äºæ§å¶æä»¶ä¸ä¼ çä¸å¡è·¯å¾*/ |
| | | bizPath: { |
| | | type: String, |
| | | required: false, |
| | | default: 'temp' |
| | | }, |
| | | value: { |
| | | type: [String, Array], |
| | | required: false |
| | | }, |
| | | // update-begin- --- author:wangshuai ------ date:20190929 ---- for:Juploadç»ä»¶å¢å æ¯å¦è½å¤ç¹å» |
| | | disabled: { |
| | | type: Boolean, |
| | | required: false, |
| | | default: false |
| | | }, |
| | | // update-end- --- author:wangshuai ------ date:20190929 ---- for:Juploadç»ä»¶å¢å æ¯å¦è½å¤ç¹å» |
| | | //æ¤å±æ§è¢«åºå¼äº |
| | | triggerChange: { |
| | | type: Boolean, |
| | | required: false, |
| | | default: false |
| | | }, |
| | | /** |
| | | * update -- author:lvdandan -- date:20190219 -- for:Juploadç»ä»¶å¢å æ¯å¦è¿åurlï¼ |
| | | * trueï¼ä»
è¿åurl |
| | | * falseï¼è¿åfileName filePath fileSize |
| | | */ |
| | | // returnUrl: { |
| | | // type: Boolean, |
| | | // required: false, |
| | | // default: true |
| | | // }, |
| | | number: { |
| | | type: Number, |
| | | required: false, |
| | | default: 0 |
| | | }, |
| | | buttonVisible: { |
| | | type: Boolean, |
| | | required: false, |
| | | default: true |
| | | }, |
| | | multiple: { |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | beforeUpload: { |
| | | type: Function |
| | | } |
| | | }, |
| | | watch: { |
| | | value: { |
| | | immediate: true, |
| | | handler() { |
| | | let val = this.value |
| | | if (val instanceof Array) { |
| | | this.initFileListArr(val) |
| | | } else { |
| | | this.initFileList(val) |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | isImageComp() { |
| | | return this.fileType === FILE_TYPE_IMG |
| | | }, |
| | | complistType() { |
| | | return this.fileType === FILE_TYPE_IMG ? 'picture-card' : 'text' |
| | | } |
| | | }, |
| | | created() { |
| | | const token = Vue.ls.get(ACCESS_TOKEN) |
| | | //---------------------------- begin å¾ç左峿¢ä½ç½® ------------------------------------- |
| | | this.headers = { 'X-Access-Token': token } |
| | | this.containerId = 'container-ty-' + new Date().getTime() |
| | | //---------------------------- end å¾ç左峿¢ä½ç½® ------------------------------------- |
| | | }, |
| | | |
| | | methods: { |
| | | initFileListArr(val) { |
| | | if (!val || val.length == 0) { |
| | | this.fileList = [] |
| | | return |
| | | } |
| | | let fileList = [] |
| | | for (var a = 0; a < val.length; a++) { |
| | | let url = getFileAccessHttpUrl(val[a].filePath) |
| | | fileList.push({ |
| | | uid: uidGenerator(), |
| | | name: val[a].fileName, |
| | | status: 'done', |
| | | url: url, |
| | | response: { |
| | | status: 'history', |
| | | message: val[a].filePath |
| | | } |
| | | }) |
| | | } |
| | | this.fileList = fileList |
| | | }, |
| | | initFileList(paths) { |
| | | if (!paths || paths.length == 0) { |
| | | //return []; |
| | | // update-begin- --- author:os_chengtgen ------ date:20190729 ---- for:issues:326,Juploadç»ä»¶åå§åbug |
| | | this.fileList = [] |
| | | return |
| | | // update-end- --- author:os_chengtgen ------ date:20190729 ---- for:issues:326,Juploadç»ä»¶åå§åbug |
| | | } |
| | | let fileList = [] |
| | | let arr = paths.split(',') |
| | | for (var a = 0; a < arr.length; a++) { |
| | | let url = getFileAccessHttpUrl(arr[a]) |
| | | fileList.push({ |
| | | uid: uidGenerator(), |
| | | name: getFileName(arr[a]), |
| | | status: 'done', |
| | | url: url, |
| | | response: { |
| | | status: 'history', |
| | | message: arr[a] |
| | | } |
| | | }) |
| | | } |
| | | this.fileList = fileList |
| | | }, |
| | | doBeforeUpload(file) { |
| | | this.uploadGoOn = true |
| | | var fileType = file.type |
| | | if (this.fileType === FILE_TYPE_IMG) { |
| | | if (fileType.indexOf('image') < 0) { |
| | | this.$message.warning('请ä¸ä¼ å¾ç') |
| | | this.uploadGoOn = false |
| | | return false |
| | | } |
| | | } |
| | | // æ©å± beforeUpload éªè¯ |
| | | if (typeof this.beforeUpload === 'function') { |
| | | return this.beforeUpload(file) |
| | | } |
| | | return true |
| | | }, |
| | | handleChange(info) { |
| | | console.log('--æä»¶å表æ¹å--') |
| | | if (!info.file.status && this.uploadGoOn === false) { |
| | | info.fileList.pop() |
| | | } |
| | | let fileList = info.fileList |
| | | if (info.file.status === 'done') { |
| | | if (this.number > 0) { |
| | | fileList = fileList.slice(-this.number) |
| | | } |
| | | if (info.file.response.success) { |
| | | fileList = fileList.map((file) => { |
| | | if (file.response) { |
| | | let reUrl = file.response.result.filePath; |
| | | file.url = getFileAccessHttpUrl(reUrl) |
| | | } |
| | | return file |
| | | }) |
| | | } |
| | | //this.$message.success(`${info.file.name} ä¸ä¼ æå!`); |
| | | } else if (info.file.status === 'error') { |
| | | this.$message.error(`${info.file.name} ä¸ä¼ 失败.`) |
| | | } else if (info.file.status === 'removed') { |
| | | this.handleDelete(info.file) |
| | | } |
| | | this.fileList = fileList |
| | | if (info.file.status === 'done' || info.file.status === 'removed') { |
| | | //returnUrl为falseæ¶è¿åæä»¶åç§°ãæä»¶è·¯å¾åæä»¶å¤§å° |
| | | this.newFileList = [] |
| | | for (var a = 0; a < fileList.length; a++) { |
| | | // update-begin-author:lvdandan date:20200603 for:ãTESTA-514ãã弿ºissueãå¤ä¸ªæä»¶åæ¶ä¸ä¼ æ¶ï¼æ§å¶å°æ¥é |
| | | if (fileList[a].status === 'done') { |
| | | let fileJson = { |
| | | fileName: fileList[a].name, |
| | | filePath: fileList[a].response.result.filePath, |
| | | fileSize: fileList[a].size, |
| | | fileEncodeName: fileList[a].response.result.fileEncodeName, |
| | | fileSuffix: fileList[a].response.result.fileSuffix, |
| | | } |
| | | this.newFileList.push(fileJson) |
| | | } else { |
| | | return |
| | | } |
| | | // update-end-author:lvdandan date:20200603 for:ãTESTA-514ãã弿ºissueãå¤ä¸ªæä»¶åæ¶ä¸ä¼ æ¶ï¼æ§å¶å°æ¥é |
| | | } |
| | | this.$emit('change', this.newFileList) |
| | | } |
| | | }, |
| | | handleDelete(file) { |
| | | //妿éè¦æ°å¢ å é¤é»è¾ |
| | | console.log(file) |
| | | }, |
| | | handlePreview(file) { |
| | | if (this.fileType === FILE_TYPE_IMG) { |
| | | this.previewImage = file.url || file.thumbUrl |
| | | this.previewVisible = true |
| | | } else { |
| | | location.href = file.url |
| | | } |
| | | }, |
| | | handleCancel() { |
| | | this.previewVisible = false |
| | | }, |
| | | //---------------------------- begin å¾ç左峿¢ä½ç½® ------------------------------------- |
| | | moveLast() { |
| | | //console.log(ev) |
| | | //console.log(this.fileList) |
| | | //console.log(this.currentImg) |
| | | let index = this.getIndexByUrl() |
| | | if (index == 0) { |
| | | this.$message.warn('æªç¥çæä½') |
| | | } else { |
| | | let curr = this.fileList[index].url |
| | | let last = this.fileList[index - 1].url |
| | | let arr = [] |
| | | for (let i = 0; i < this.fileList.length; i++) { |
| | | if (i == index - 1) { |
| | | arr.push(curr) |
| | | } else if (i == index) { |
| | | arr.push(last) |
| | | } else { |
| | | arr.push(this.fileList[i].url) |
| | | } |
| | | } |
| | | this.currentImg = last |
| | | this.$emit('change', arr.join(',')) |
| | | } |
| | | }, |
| | | moveNext() { |
| | | let index = this.getIndexByUrl() |
| | | if (index == this.fileList.length - 1) { |
| | | this.$message.warn('已尿å~') |
| | | } else { |
| | | let curr = this.fileList[index].url |
| | | let next = this.fileList[index + 1].url |
| | | let arr = [] |
| | | for (let i = 0; i < this.fileList.length; i++) { |
| | | if (i == index + 1) { |
| | | arr.push(curr) |
| | | } else if (i == index) { |
| | | arr.push(next) |
| | | } else { |
| | | arr.push(this.fileList[i].url) |
| | | } |
| | | } |
| | | this.currentImg = next |
| | | this.$emit('change', arr.join(',')) |
| | | } |
| | | }, |
| | | getIndexByUrl() { |
| | | for (let i = 0; i < this.fileList.length; i++) { |
| | | if (this.fileList[i].url === this.currentImg || encodeURI(this.fileList[i].url) === this.currentImg) { |
| | | return i |
| | | } |
| | | } |
| | | return -1 |
| | | } |
| | | }, |
| | | mounted() { |
| | | const moverObj = document.getElementById(this.containerId + '-mover') |
| | | if (moverObj) { |
| | | moverObj.addEventListener('mouseover', () => { |
| | | this.moverHold = true |
| | | this.moveDisplay = 'block' |
| | | }) |
| | | moverObj.addEventListener('mouseout', () => { |
| | | this.moverHold = false |
| | | this.moveDisplay = 'none' |
| | | }) |
| | | } |
| | | |
| | | let picList = document.getElementById(this.containerId) ? document.getElementById(this.containerId).getElementsByClassName('ant-upload-list-picture-card') : [] |
| | | if (picList && picList.length > 0) { |
| | | picList[0].addEventListener('mouseover', (ev) => { |
| | | ev = ev || window.event |
| | | let target = ev.target || ev.srcElement |
| | | if ('ant-upload-list-item-info' == target.className) { |
| | | this.showMoverTask = false |
| | | let item = target.parentElement |
| | | this.left = item.offsetLeft |
| | | this.top = item.offsetTop + item.offsetHeight - 50 |
| | | this.moveDisplay = 'block' |
| | | this.currentImg = target.getElementsByTagName('img')[0].src |
| | | } |
| | | |
| | | }) |
| | | |
| | | picList[0].addEventListener('mouseout', (ev) => { |
| | | ev = ev || window.event |
| | | let target = ev.target || ev.srcElement |
| | | //console.log('ç§»é¤',target) |
| | | if ('ant-upload-list-item-info' == target.className) { |
| | | this.showMoverTask = true |
| | | setTimeout(() => { |
| | | if (this.moverHold === false) { |
| | | this.moveDisplay = 'none' |
| | | } |
| | | }, 100) |
| | | } |
| | | if ('ant-upload-list-item ant-upload-list-item-done' == target.className || 'ant-upload-list ant-upload-list-picture-card' == target.className) { |
| | | this.moveDisplay = 'none' |
| | | } |
| | | }) |
| | | //---------------------------- end å¾ç左峿¢ä½ç½® ------------------------------------- |
| | | } |
| | | }, |
| | | model: { |
| | | prop: 'value', |
| | | event: 'change' |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less"> |
| | | .uploadty-disabled { |
| | | .ant-upload-list-item { |
| | | .anticon-close { |
| | | display: none; |
| | | } |
| | | |
| | | .anticon-delete { |
| | | display: none; |
| | | } |
| | | } |
| | | |
| | | /*update-begin-author:taoyan date:2022-12-5 for: issues/4250 建议JUploadç»ä»¶ï¼disabled为trueçæ¶åä¸ä¼ buttonè½å¤åç°æè
å
¶ä»æ ·å¼å¾æ¡ï¼ä¾¿äºç¥ææ æ³åç¹å»ä¸ä¼ */ |
| | | |
| | | .ant-btn, .ant-upload-disabled { |
| | | cursor: not-allowed; |
| | | color: rgba(0, 0, 0, 0.25); |
| | | background-color: #f5f5f5; |
| | | border-color: #d9d9d9; |
| | | } |
| | | |
| | | /*update-end-author:taoyan date:2022-12-5 for: issues/4250 建议JUploadç»ä»¶ï¼disabled为trueçæ¶åä¸ä¼ buttonè½å¤åç°æè
å
¶ä»æ ·å¼å¾æ¡ï¼ä¾¿äºç¥ææ æ³åç¹å»ä¸ä¼ */ |
| | | |
| | | } |
| | | |
| | | //---------------------------- begin å¾ç左峿¢ä½ç½® ------------------------------------- |
| | | .uploadty-mover-mask { |
| | | background-color: rgba(0, 0, 0, 0.5); |
| | | opacity: .8; |
| | | color: #fff; |
| | | height: 28px; |
| | | line-height: 28px; |
| | | } |
| | | |
| | | //---------------------------- end å¾ç左峿¢ä½ç½® ------------------------------------- |
| | | </style> |
| | |
| | | import JTime from './JTime.vue' |
| | | import JTreeTable from './JTreeTable.vue' |
| | | import JEasyCron from '@/components/jeecg/JEasyCron' |
| | | import LxUpload from './LxUpload.vue' |
| | | import LxFilePreview from './LxFilePreview.vue' |
| | | //jeecgbiz |
| | | import JSelectDepart from '../jeecgbiz/JSelectDepart.vue' |
| | | import JSelectMultiUser from '../jeecgbiz/JSelectMultiUser.vue' |
| | |
| | | Vue.component('JTreeSelect', JTreeSelect) |
| | | Vue.component('JTreeTable', JTreeTable) |
| | | Vue.component('JUpload', JUpload) |
| | | Vue.component('LxUpload', LxUpload) |
| | | Vue.component('LxFilePreview', LxFilePreview) |
| | | |
| | | //jeecgbiz |
| | | Vue.component('JSelectDepart', JSelectDepart) |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card :bordered="false"> |
| | | |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="å 餿 è®°"> |
| | | <a-input placeholder="请è¾å
¥å 餿 è®°" v-model="queryParam.delFlag"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="åæ°ç¼ç "> |
| | | <a-input placeholder="请è¾å
¥åæ°ç¼ç " v-model="queryParam.parameterCode"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <template v-if="toggleSearchStatus"> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="æ£æµé¡¹ç®"> |
| | | <a-input placeholder="请è¾å
¥æ£æµé¡¹ç®" v-model="queryParam.parameterName"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | </template> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">éç½®</a-button> |
| | | <a @click="handleToggleSearch" style="margin-left: 8px"> |
| | | {{ toggleSearchStatus ? 'æ¶èµ·' : 'å±å¼' }} |
| | | <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> |
| | | </a> |
| | | </span> |
| | | </a-col> |
| | | |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator"> |
| | | <a-button @click="handleAdd" type="primary" icon="plus">æ°å¢</a-button> |
| | | <a-button type="primary" icon="download" @click="handleExportXls('ç²¾åº¦åæ°ç»´æ¤')">导åº</a-button> |
| | | <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> |
| | | <a-button type="primary" icon="import">导å
¥</a-button> |
| | | </a-upload> |
| | | <a-dropdown v-if="selectedRowKeys.length > 0"> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>å é¤</a-menu-item> |
| | | </a-menu> |
| | | <a-button style="margin-left: 8px"> æ¹éæä½ <a-icon type="down" /></a-button> |
| | | </a-dropdown> |
| | | </div> |
| | | |
| | | <!-- tableåºå-begin --> |
| | | <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" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | class="j-table-force-nowrap" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
| | | @change="handleTableChange"> |
| | | |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a @click="handleEdit(record)">ç¼è¾</a> |
| | | |
| | | <a-divider type="vertical" /> |
| | | <a-dropdown> |
| | | <a class="ant-dropdown-link">æ´å¤ <a-icon type="down" /></a> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item> |
| | | <a-popconfirm title="ç¡®å®å é¤å?" @confirm="() => handleDelete(record.id)"> |
| | | <a>å é¤</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | </a-menu> |
| | | </a-dropdown> |
| | | </span> |
| | | |
| | | </a-table> |
| | | </div> |
| | | <!-- tableåºå-end --> |
| | | |
| | | <!-- 表ååºå --> |
| | | <eamPrecisionParameters-modal ref="modalForm" @ok="modalFormOk"></eamPrecisionParameters-modal> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import '@/assets/less/TableExpand.less' |
| | | import EamPrecisionParametersModal from './modules/EamPrecisionParametersModal' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | |
| | | export default { |
| | | name: "EamPrecisionParametersList", |
| | | mixins:[JeecgListMixin], |
| | | components: { |
| | | EamPrecisionParametersModal |
| | | }, |
| | | data () { |
| | | return { |
| | | description: 'ç²¾åº¦åæ°ç»´æ¤ç®¡ç页é¢', |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key:'rowIndex', |
| | | width:60, |
| | | align:"center", |
| | | customRender:function (t,r,index) { |
| | | return parseInt(index)+1; |
| | | } |
| | | }, |
| | | { |
| | | title: 'å 餿 è®°', |
| | | align:"center", |
| | | dataIndex: 'delFlag' |
| | | }, |
| | | { |
| | | title: 'åæ°ç¼ç ', |
| | | align:"center", |
| | | dataIndex: 'parameterCode' |
| | | }, |
| | | { |
| | | title: 'æ£æµé¡¹ç®', |
| | | align:"center", |
| | | dataIndex: 'parameterName' |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align:"center", |
| | | scopedSlots: { customRender: 'action' }, |
| | | } |
| | | ], |
| | | url: { |
| | | list: "/eam/eamPrecisionParameters/list", |
| | | delete: "/eam/eamPrecisionParameters/delete", |
| | | deleteBatch: "/eam/eamPrecisionParameters/deleteBatch", |
| | | exportXlsUrl: "eam/eamPrecisionParameters/exportXls", |
| | | importExcelUrl: "eam/eamPrecisionParameters/importExcel", |
| | | }, |
| | | } |
| | | }, |
| | | computed: { |
| | | importExcelUrl: function(){ |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
| | | } |
| | | }, |
| | | methods: { |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card :bordered="false"> |
| | | |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="å 餿 è®°"> |
| | | <a-input placeholder="请è¾å
¥å 餿 è®°" v-model="queryParam.delFlag"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="åæ°ç¼ç "> |
| | | <a-input placeholder="请è¾å
¥åæ°ç¼ç " v-model="queryParam.parameterCode"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <template v-if="toggleSearchStatus"> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="åæ°åç§°"> |
| | | <a-input placeholder="请è¾å
¥åæ°åç§°" v-model="queryParam.parameterName"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="åæ°åç±»"> |
| | | <a-input placeholder="请è¾å
¥åæ°åç±»" v-model="queryParam.parameterCategory"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="计éåä½"> |
| | | <a-input placeholder="请è¾å
¥è®¡éåä½" v-model="queryParam.parameterUnit"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | </template> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">éç½®</a-button> |
| | | <a @click="handleToggleSearch" style="margin-left: 8px"> |
| | | {{ toggleSearchStatus ? 'æ¶èµ·' : 'å±å¼' }} |
| | | <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> |
| | | </a> |
| | | </span> |
| | | </a-col> |
| | | |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator"> |
| | | <a-button @click="handleAdd" type="primary" icon="plus">æ°å¢</a-button> |
| | | <a-button type="primary" icon="download" @click="handleExportXls('å·¥åºåæ°ç»´æ¤')">导åº</a-button> |
| | | <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> |
| | | <a-button type="primary" icon="import">导å
¥</a-button> |
| | | </a-upload> |
| | | <a-dropdown v-if="selectedRowKeys.length > 0"> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>å é¤</a-menu-item> |
| | | </a-menu> |
| | | <a-button style="margin-left: 8px"> æ¹éæä½ <a-icon type="down" /></a-button> |
| | | </a-dropdown> |
| | | </div> |
| | | |
| | | <!-- tableåºå-begin --> |
| | | <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" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | class="j-table-force-nowrap" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
| | | @change="handleTableChange"> |
| | | |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a @click="handleEdit(record)">ç¼è¾</a> |
| | | |
| | | <a-divider type="vertical" /> |
| | | <a-dropdown> |
| | | <a class="ant-dropdown-link">æ´å¤ <a-icon type="down" /></a> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item> |
| | | <a-popconfirm title="ç¡®å®å é¤å?" @confirm="() => handleDelete(record.id)"> |
| | | <a>å é¤</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | </a-menu> |
| | | </a-dropdown> |
| | | </span> |
| | | |
| | | </a-table> |
| | | </div> |
| | | <!-- tableåºå-end --> |
| | | |
| | | <!-- 表ååºå --> |
| | | <eamProcessParameters-modal ref="modalForm" @ok="modalFormOk"></eamProcessParameters-modal> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import '@/assets/less/TableExpand.less' |
| | | import EamProcessParametersModal from './modules/EamProcessParametersModal' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | |
| | | export default { |
| | | name: "EamProcessParametersList", |
| | | mixins:[JeecgListMixin], |
| | | components: { |
| | | EamProcessParametersModal |
| | | }, |
| | | data () { |
| | | return { |
| | | description: 'å·¥åºåæ°ç»´æ¤ç®¡ç页é¢', |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key:'rowIndex', |
| | | width:60, |
| | | align:"center", |
| | | customRender:function (t,r,index) { |
| | | return parseInt(index)+1; |
| | | } |
| | | }, |
| | | { |
| | | title: 'å 餿 è®°', |
| | | align:"center", |
| | | dataIndex: 'delFlag' |
| | | }, |
| | | { |
| | | title: 'åæ°ç¼ç ', |
| | | align:"center", |
| | | dataIndex: 'parameterCode' |
| | | }, |
| | | { |
| | | title: 'åæ°åç§°', |
| | | align:"center", |
| | | dataIndex: 'parameterName' |
| | | }, |
| | | { |
| | | title: 'åæ°åç±»', |
| | | align:"center", |
| | | dataIndex: 'parameterCategory' |
| | | }, |
| | | { |
| | | title: '计éåä½', |
| | | align:"center", |
| | | dataIndex: 'parameterUnit' |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align:"center", |
| | | scopedSlots: { customRender: 'action' }, |
| | | } |
| | | ], |
| | | url: { |
| | | list: "/eam/eamProcessParameters/list", |
| | | delete: "/eam/eamProcessParameters/delete", |
| | | deleteBatch: "/eam/eamProcessParameters/deleteBatch", |
| | | exportXlsUrl: "eam/eamProcessParameters/exportXls", |
| | | importExcelUrl: "eam/eamProcessParameters/importExcel", |
| | | }, |
| | | } |
| | | }, |
| | | computed: { |
| | | importExcelUrl: function(){ |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
| | | } |
| | | }, |
| | | methods: { |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card :bordered="false"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="æä»¶åç§°"> |
| | | <j-input placeholder="请è¾å
¥æä»¶åç§°" v-model="queryParam.fileName"></j-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | <a-button type="info" @click="searchReset" icon="reload" style="margin-left: 8px">éç½®</a-button> |
| | | </span> |
| | | </a-col> |
| | | |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator"> |
| | | <a-button @click="handleAdd" type="primary" icon="plus">æ°å¢</a-button> |
| | | <a-dropdown v-if="selectedRowKeys.length > 0"> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item key="1" @click="batchDel"> |
| | | <a-icon type="delete" /> |
| | | å é¤ |
| | | </a-menu-item> |
| | | </a-menu> |
| | | <a-button style="margin-left: 8px"> æ¹éæä½ |
| | | <a-icon type="down" /> |
| | | </a-button> |
| | | </a-dropdown> |
| | | </div> |
| | | |
| | | <!-- tableåºå-begin --> |
| | | <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" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | class="j-table-force-nowrap" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
| | | @change="handleTableChange"> |
| | | |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a @click="handleEdit(record)">ç¼è¾</a> |
| | | |
| | | <a-divider type="vertical" /> |
| | | <a-dropdown> |
| | | <a class="ant-dropdown-link">æ´å¤ <a-icon type="down" /></a> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item> |
| | | <a @click="handlePreview(record)">é¢è§</a> |
| | | </a-menu-item> |
| | | <a-menu-item> |
| | | <a-popconfirm title="ç¡®å®ä¸è½½æä»¶å?" @confirm="() => handleDownload(record)"> |
| | | <a>ä¸è½½</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | <a-menu-item> |
| | | <a-popconfirm title="ç¡®å®å é¤å?" @confirm="() => handleDelete(record.id)"> |
| | | <a>å é¤</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | </a-menu> |
| | | </a-dropdown> |
| | | </span> |
| | | |
| | | </a-table> |
| | | </div> |
| | | <!-- tableåºå-end --> |
| | | |
| | | <!-- 表ååºå --> |
| | | <eamSysFiles-modal ref="modalForm" @ok="modalFormOk"></eamSysFiles-modal> |
| | | <lx-file-preview ref="lxFilePreview" :fileUrl="fileUrl"></lx-file-preview> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import '@/assets/less/TableExpand.less' |
| | | import EamSysFilesModal from './modules/EamSysFilesModal' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import { downFile } from '@/api/manage'; |
| | | |
| | | export default { |
| | | name: 'EamSysFilesList', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | EamSysFilesModal |
| | | }, |
| | | data() { |
| | | return { |
| | | description: '设å¤é件管ç管ç页é¢', |
| | | fileUrl: '', |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 60, |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | { |
| | | title: 'æä»¶å å¯å', |
| | | align: 'center', |
| | | dataIndex: 'fileEncodeName', |
| | | ellipsis: true, |
| | | }, |
| | | { |
| | | title: 'æä»¶åç§°', |
| | | align: 'center', |
| | | dataIndex: 'fileName', |
| | | ellipsis: true, |
| | | }, |
| | | { |
| | | title: 'æä»¶è·¯å¾', |
| | | align: 'center', |
| | | dataIndex: 'filePath', |
| | | ellipsis: true, |
| | | }, |
| | | { |
| | | title: 'æä»¶åç¼å', |
| | | align: 'center', |
| | | dataIndex: 'fileSuffix' |
| | | }, |
| | | { |
| | | title: 'æä»¶å¤§å°', |
| | | align: 'center', |
| | | dataIndex: 'fileSize' |
| | | }, |
| | | { |
| | | title: 'æè¿°', |
| | | align: 'center', |
| | | dataIndex: 'description', |
| | | ellipsis: true, |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | ], |
| | | url: { |
| | | list: '/eam/sysFiles/list', |
| | | delete: '/eam/sysFiles/delete', |
| | | deleteBatch: '/eam/sysFiles/deleteBatch', |
| | | download: '/eam/sysFiles/downloadFile', |
| | | } |
| | | } |
| | | }, |
| | | computed: {}, |
| | | methods: { |
| | | handleDownload(record) { |
| | | downFile(this.url.download, { id: record.id }).then((res) => { |
| | | if (!res) { |
| | | this.$message.warning('æä»¶ä¸è½½å¤±è´¥') |
| | | return |
| | | } else { |
| | | let fileName = record.fileName; |
| | | if (typeof window.navigator.msSaveBlob !== 'undefined') { |
| | | window.navigator.msSaveBlob(new Blob([res]), fileName); |
| | | } else { |
| | | let url = window.URL.createObjectURL(new Blob([res])); |
| | | let link = document.createElement('a'); |
| | | link.style.display = 'none'; |
| | | link.href = url; |
| | | link.setAttribute('download', fileName); |
| | | document.body.appendChild(link); |
| | | link.click() |
| | | document.body.removeChild(link) //ä¸è½½å®æç§»é¤å
ç´ |
| | | window.URL.revokeObjectURL(url) //éæ¾æblob对象 |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | handlePreview: function (record) { |
| | | this.$refs.lxFilePreview.preview(record.filePath); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <j-modal |
| | | :title="title" |
| | | :width="800" |
| | | :visible="visible" |
| | | :confirmLoading="confirmLoading" |
| | | switchFullscreen |
| | | @ok="handleOk" |
| | | @cancel="handleCancel" |
| | | cancelText="å
³é"> |
| | | |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form-model ref="form" :model="model" :rules="validatorRules"> |
| | | |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="delFlag" label="å 餿 è®°"> |
| | | <a-input-number v-model="model.delFlag"/> |
| | | </a-form-model-item> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="parameterCode" label="åæ°ç¼ç "> |
| | | <a-input placeholder="请è¾å
¥åæ°ç¼ç " v-model="model.parameterCode" /> |
| | | </a-form-model-item> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="parameterName" label="æ£æµé¡¹ç®"> |
| | | <a-input placeholder="请è¾å
¥æ£æµé¡¹ç®" v-model="model.parameterName" /> |
| | | </a-form-model-item> |
| | | |
| | | </a-form-model> |
| | | </a-spin> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import { httpAction } from '@/api/manage' |
| | | import moment from "moment" |
| | | |
| | | export default { |
| | | name: "EamPrecisionParametersModal", |
| | | data () { |
| | | return { |
| | | title:"æä½", |
| | | visible: false, |
| | | model: {}, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 }, |
| | | }, |
| | | |
| | | confirmLoading: false, |
| | | validatorRules:{ |
| | | }, |
| | | url: { |
| | | add: "/eam/eamPrecisionParameters/add", |
| | | edit: "/eam/eamPrecisionParameters/edit", |
| | | }, |
| | | } |
| | | }, |
| | | created () { |
| | | }, |
| | | methods: { |
| | | add () { |
| | | //åå§åé»è®¤å¼ |
| | | this.edit({}); |
| | | }, |
| | | edit (record) { |
| | | this.model = Object.assign({}, record); |
| | | this.visible = true; |
| | | }, |
| | | close () { |
| | | this.$emit('close'); |
| | | this.visible = false; |
| | | this.$refs.form.clearValidate(); |
| | | }, |
| | | handleOk () { |
| | | 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; |
| | | that.close(); |
| | | }) |
| | | }else{ |
| | | return false; |
| | | } |
| | | }) |
| | | }, |
| | | handleCancel () { |
| | | this.close() |
| | | }, |
| | | |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <j-modal |
| | | :title="title" |
| | | :width="800" |
| | | :visible="visible" |
| | | :confirmLoading="confirmLoading" |
| | | switchFullscreen |
| | | @ok="handleOk" |
| | | @cancel="handleCancel" |
| | | cancelText="å
³é"> |
| | | |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form-model ref="form" :model="model" :rules="validatorRules"> |
| | | |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="delFlag" label="å 餿 è®°"> |
| | | <a-input-number v-model="model.delFlag"/> |
| | | </a-form-model-item> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="parameterCode" label="åæ°ç¼ç "> |
| | | <a-input placeholder="请è¾å
¥åæ°ç¼ç " v-model="model.parameterCode" /> |
| | | </a-form-model-item> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="parameterName" label="åæ°åç§°"> |
| | | <a-input placeholder="请è¾å
¥åæ°åç§°" v-model="model.parameterName" /> |
| | | </a-form-model-item> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="parameterCategory" label="åæ°åç±»"> |
| | | <a-input placeholder="请è¾å
¥åæ°åç±»" v-model="model.parameterCategory" /> |
| | | </a-form-model-item> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="parameterUnit" label="计éåä½"> |
| | | <a-input placeholder="请è¾å
¥è®¡éåä½" v-model="model.parameterUnit" /> |
| | | </a-form-model-item> |
| | | |
| | | </a-form-model> |
| | | </a-spin> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import { httpAction } from '@/api/manage' |
| | | import moment from "moment" |
| | | |
| | | export default { |
| | | name: "EamProcessParametersModal", |
| | | data () { |
| | | return { |
| | | title:"æä½", |
| | | visible: false, |
| | | model: {}, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 }, |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 }, |
| | | }, |
| | | |
| | | confirmLoading: false, |
| | | validatorRules:{ |
| | | }, |
| | | url: { |
| | | add: "/eam/eamProcessParameters/add", |
| | | edit: "/eam/eamProcessParameters/edit", |
| | | }, |
| | | } |
| | | }, |
| | | created () { |
| | | }, |
| | | methods: { |
| | | add () { |
| | | //åå§åé»è®¤å¼ |
| | | this.edit({}); |
| | | }, |
| | | edit (record) { |
| | | this.model = Object.assign({}, record); |
| | | this.visible = true; |
| | | }, |
| | | close () { |
| | | this.$emit('close'); |
| | | this.visible = false; |
| | | this.$refs.form.clearValidate(); |
| | | }, |
| | | handleOk () { |
| | | 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; |
| | | that.close(); |
| | | }) |
| | | }else{ |
| | | return false; |
| | | } |
| | | }) |
| | | }, |
| | | handleCancel () { |
| | | this.close() |
| | | }, |
| | | |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <j-modal |
| | | :title="title" |
| | | :width="800" |
| | | :visible="visible" |
| | | :confirmLoading="confirmLoading" |
| | | switchFullscreen |
| | | @ok="handleOk" |
| | | @cancel="handleCancel" |
| | | cancelText="å
³é"> |
| | | |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form-model ref="form" :model="model" :rules="validatorRules"> |
| | | <a-form-model-item |
| | | label="ä¸ä¼ " |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | v-if="!editable" |
| | | prop="fileList"> |
| | | <lx-upload :returnUrl="false" |
| | | :isMultiple="false" |
| | | v-model="model.fileList" |
| | | biz="test"> |
| | | </lx-upload> |
| | | </a-form-model-item> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fileName" label="æä»¶åç§°" v-if="editable"> |
| | | <a-input placeholder="请è¾å
¥æä»¶åç§°" v-model="model.fileName" /> |
| | | </a-form-model-item> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="description" label="æè¿°"> |
| | | <a-textarea placeholder="请è¾å
¥æè¿°" v-model="model.description" /> |
| | | </a-form-model-item> |
| | | </a-form-model> |
| | | </a-spin> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import { httpAction } from '@/api/manage' |
| | | |
| | | export default { |
| | | name: 'EamSysFilesModal', |
| | | data() { |
| | | return { |
| | | title: 'æä½', |
| | | visible: false, |
| | | model: {}, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 } |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 } |
| | | }, |
| | | |
| | | confirmLoading: false, |
| | | validatorRules: { |
| | | fileName: [ |
| | | { required: true, message: '请è¾å
¥æä»¶åç§°!' } |
| | | ] |
| | | }, |
| | | url: { |
| | | add: '/eam/sysFiles/add', |
| | | edit: '/eam/sysFiles/edit', |
| | | }, |
| | | editable: false, |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | methods: { |
| | | add() { |
| | | this.editable = false; |
| | | //åå§åé»è®¤å¼ |
| | | this.model = {}; |
| | | this.visible = true |
| | | }, |
| | | edit(record) { |
| | | this.editable = true; |
| | | this.model = Object.assign({}, record) |
| | | this.visible = true |
| | | }, |
| | | close() { |
| | | this.$emit('close') |
| | | this.visible = false |
| | | this.$refs.form.clearValidate() |
| | | }, |
| | | handleOk() { |
| | | 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') |
| | | that.close() |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | | }) |
| | | } else { |
| | | return false |
| | | } |
| | | }) |
| | | }, |
| | | handleCancel() { |
| | | this.close() |
| | | }, |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | |
| | | </style> |