| | |
| | | > |
| | | <div class="elForm" style="justify-content: flex-start"> |
| | | <el-form-item style="margin-right: 30px"> |
| | | <el-checkbox v-model="form.checked">å¤é项</el-checkbox> |
| | | <el-checkbox v-model="checked" @change="checkedChange">ææ°çæ¬</el-checkbox> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <!-- prefix-icon="el-icon-search"--> |
| | | <el-input v-model="form.search" placeholder="请è¾å
¥å
³é®å" style="width: 260px" /> |
| | | </el-form-item> |
| | | </div> |
| | | </el-form> |
| | | <el-button type="primary" style="margin-left: 30px" icon="el-icon-search" @click="search">æ¥è¯¢</el-button> |
| | | <el-button type="info" icon="el-icon-refresh" @click="reset">éç½®</el-button> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | label="åºå·" |
| | | /> |
| | | <el-table-column |
| | | prop="file_name" |
| | | prop="define_name" |
| | | label="æä»¶åç§°" |
| | | min-width="160" |
| | | show-tooltip-when-overflow |
| | |
| | | <el-table-column |
| | | prop="lm_date" |
| | | label="ä¸ä¼ æ¶é´" |
| | | width="160" |
| | | min-width="160" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div class="operationClass"> |
| | | <el-tooltip class="item" effect="dark" content="é¢è§" placement="top"> |
| | | <i class="el-icon-files" style="cursor: pointer;color:#42b983;margin-right: 15px" @click="check" /> |
| | | <el-tooltip v-del-tab-index class="item" effect="dark" content="é¢è§" placement="top"> |
| | | <i class="el-icon-files" style="cursor: pointer;color:#42b983;margin-right: 15px" @click="check(row)" /> |
| | | </el-tooltip> |
| | | <el-tooltip v-del-tab-index class="item" effect="dark" content="å é¤" placement="top"> |
| | | <i class="el-icon-delete" @click="del(row)" /> |
| | |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="æä»¶åç§°" prop="defilename"> |
| | | <el-input v-model="dialogForm.defilename" style="width: 200px" /> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="æä»¶åç§°" prop="defilename">--> |
| | | <!-- <el-form-item label="æä»¶åç§°">--> |
| | | <!-- <el-input v-model="dialogForm.defilename" disabled style="width: 200px" />--> |
| | | <!-- </el-form-item>--> |
| | | <el-form-item label="æä»¶ç±»å" prop="filetypecode"> |
| | | <el-select |
| | | v-model="dialogForm.filetypecode" |
| | |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="çæ¬å·"> |
| | | <el-input v-model="dialogForm.fileversion" disabled style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="æä»¶ä¸ä¼ " prop="Files"> |
| | | <!-- <el-input v-model="dialogForm.Files" style="width: 200px" />--> |
| | | |
| | | <div style="width: 200px;"> |
| | | <el-upload |
| | | ref="uploadFileRef" |
| | |
| | | :multiple="false" |
| | | accept=".mp4,.pdf" |
| | | > |
| | | <!-- :http-request="upload"--> |
| | | <!-- :before-upload="beforeUpload"--> |
| | | <el-button |
| | | type="primary" |
| | | style="width: 200px;display: flex;justify-content: center" |
| | |
| | | </el-upload> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item label="çæ¬å·"> |
| | | <el-input v-model="dialogForm.fileversion" disabled style="width: 200px" /> |
| | | </el-form-item> |
| | | |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <div class="footerButton"> |
| | | <el-button @click="dialogVisibleCancel">å æ¶</el-button> |
| | | <el-button type="primary" @click="dialogVisibleConfirm">ç¡® å®</el-button> |
| | | <el-button |
| | | type="primary" |
| | | :loading="$store.state.app.buttonIsDisabled" |
| | | :disabled="$store.state.app.buttonIsDisabled" |
| | | @click="dialogVisibleConfirm" |
| | | >ç¡® å®</el-button> |
| | | </div> |
| | | </span> |
| | | </el-dialog> |
| | |
| | | |
| | | <script> |
| | | import Pagination from '@/components/Pagination' |
| | | import { AddUpdateOrganization, DeleteOrganization, PrentOrganization } from '@/api/jcsz' |
| | | import { getCookie } from '@/utils/auth' |
| | | import { SystemSopDelete, SystemSopDeviceSearch, SystemSopMaxVersion, SystemSopSava, SystemSopSearch } from '@/api/xtsz' |
| | | import { |
| | | SystemSopDelete, |
| | | SystemSopDeviceSearch, |
| | | SystemSopMaxVersion, |
| | | SystemSopSava, |
| | | SystemSopSearch, |
| | | SystemSopView |
| | | } from '@/api/xtsz' |
| | | import { PartSelect } from '@/api/zzmx' |
| | | |
| | | export default { |
| | |
| | | mainHeight: 0, |
| | | tableHeight: 0, |
| | | form: { |
| | | checked: '', // æ¯å¦é䏿é«çæ¬ |
| | | check: 'N', // æ¯å¦é䏿é«çæ¬ |
| | | search: '', // æç´¢å
³é®å |
| | | prop: 'lm_date', // æåºå段 |
| | | order: 'desc', // æåºå段 |
| | | page: 1, // 第å 页 |
| | | rows: 20 // æ¯é¡µå¤å°æ¡ |
| | | }, |
| | | checked: false, |
| | | |
| | | total: 10, |
| | | tableData: [], |
| | | dialogVisible: false, |
| | |
| | | filetypecode: [ |
| | | { required: true, message: 'è¯·éæ©æä»¶ç±»å', trigger: ['blur', 'change'] } |
| | | ] |
| | | // Files: [ |
| | | // { required: true, message: '请è¾å
¥æä»¶åç§°', trigger: ['blur', 'change'] } |
| | | // ] |
| | | |
| | | }, |
| | | devicetvpeArr: [], // 设å¤ç±»å䏿å表 |
| | | partArr: [], // ç©æä¸æå表 |
| | |
| | | { code: 'P002', name: 'æ£éªæå¯¼ä¹¦' }, |
| | | { code: 'P003', name: 'å¾çº¸' } |
| | | ] |
| | | |
| | | } |
| | | }, |
| | | |
| | |
| | | search() { |
| | | this.getSystemSopSearch() |
| | | }, |
| | | // 导å
¥æé® |
| | | // upload(param) { |
| | | // console.log('111') |
| | | // this.dialogForm.Files = param.file |
| | | // }, |
| | | // æä»¶ä¸ä¼ ä¹åæ¹æ³ |
| | | // beforeUpload(file) { |
| | | // console.log(file, 1) |
| | | // const isLt100M = file.size / 1024 / 1024 < 100 |
| | | // // if (['video/mp4', 'video/ogg', 'video/flv', 'video/avi', 'video/wmv', 'video/rmvb'].indexOf(file.type) == -1) { |
| | | // if (['video/mp4', '.pdf'].indexOf(file.type) === -1) { |
| | | // this.$message.error('ä¸ä¼ æä»¶åªè½æ¯ pdfãmp4 æ ¼å¼!') |
| | | // // this.$message.error('ä¸ä¼ è§é¢åªè½æ¯ mp4ãoggãflvãaviãwmvãrmvb æ ¼å¼!') |
| | | // return false |
| | | // } |
| | | // if (!isLt100M) { |
| | | // this.$message.error('ä¸ä¼ æä»¶å¤§å°ä¸è½è¶
è¿ 100MB!') |
| | | // return false |
| | | // } |
| | | // return true |
| | | // }, |
| | | // ææ°çæ¬æ¹åæ¶è§¦å |
| | | checkedChange(val) { |
| | | this.form.check = val ? 'Y' : 'N' |
| | | this.getSystemSopSearch() |
| | | }, |
| | | // æä»¶æ°éè¶
è¿éå®è§¦å |
| | | handleExceed() { |
| | | this.$message.info('æä¸æ¯æå¤æä»¶ä¸ä¼ ï¼') |
| | | }, |
| | | |
| | | // éç½® |
| | | reset() { |
| | | this.form.checked = '' |
| | | this.form.search = '' |
| | | this.getSystemSopSearch() |
| | | }, |
| | | |
| | | // æ°å¢æé® |
| | | add() { |
| | | this.dialogVisible = true |
| | | |
| | | this.getSystemSopDeviceSearch() |
| | | this.getPartSelect() |
| | | }, |
| | |
| | | const { data: res } = await PartSelect() |
| | | this.partArr = res |
| | | }, |
| | | |
| | | // æä»¶ç±»å弿¹åæ¶ |
| | | async fileversionChange(val, type) { |
| | | const data = { |
| | |
| | | |
| | | this.dialogForm.fileversion = res |
| | | }, |
| | | |
| | | // é¢è§ |
| | | check() { |
| | | const url = this.$router.resolve({ |
| | | path: '/xtsz/yl', |
| | | query: { |
| | | // clue_id: row.clue_id, |
| | | // operation: 'check', |
| | | name: 'æä»¶é¢è§' |
| | | } |
| | | }) |
| | | |
| | | window.open(url.href) |
| | | |
| | | // SystemSopView |
| | | async check(row) { |
| | | const { data: res } = await SystemSopView({ id: row.id, filepath: row.file_path }) |
| | | window.open(res) |
| | | }, |
| | | |
| | | // å é¤æé® |
| | |
| | | type: 'warning' |
| | | }).then(() => { |
| | | const data = { |
| | | id: '', |
| | | filepath: '' |
| | | id: row.id, |
| | | filepath: row.file_path |
| | | } |
| | | SystemSopDelete(data).then(res => { |
| | | if (res.code === '200') { |
| | |
| | | this.dialogForm.filetypecode = '' |
| | | this.dialogForm.fileversion = '' |
| | | this.dialogForm.Files = '' |
| | | this.$refs.uploadFileRef.clearFiles() |
| | | this.$refs.dialogForm.clearValidate() |
| | | }, |
| | | // å¯¹è¯æ¡åæ¶ |
| | | dialogVisibleCancel() { |
| | | this.dialogVisible = false |
| | | this.$store.state.app.buttonIsDisabled = false |
| | | }, |
| | | // å¯¹è¯æ¡ç¡®è®¤ |
| | | dialogVisibleConfirm() { |
| | | console.log(this.$refs.uploadFileRef.uploadFiles[0]) |
| | | |
| | | if (!this.$refs.uploadFileRef.uploadFiles[0]) { |
| | | this.$message.info('è¯·éæ©æä»¶ä¸ä¼ ï¼') |
| | | } |
| | |
| | | this.$refs.dialogForm.validate(valid => { |
| | | if (valid) { |
| | | const formData = new FormData() |
| | | formData.append('devicetvpecode', this.dialogForm.devicetvpecode) |
| | | formData.append('devicetypecode', this.dialogForm.devicetvpecode) |
| | | formData.append('partcode', this.dialogForm.partcode) |
| | | formData.append('defilename', this.dialogForm.defilename) |
| | | formData.append('defilename', this.$refs.uploadFileRef.uploadFiles[0].name) |
| | | formData.append('filetypecode', this.dialogForm.filetypecode) |
| | | formData.append('fileversion', this.dialogForm.fileversion) |
| | | formData.append('Files', this.$refs.uploadFileRef.uploadFiles[0].raw) |
| | | // formData.append('Files', JSON.stringify(this.$refs.uploadFileRef.uploadFiles[0].raw)) |
| | | // formData.append('Files', JSON.stringify(this.$refs.uploadFileRef.uploadFiles[0])) |
| | | for (var [key, value] of formData) { |
| | | console.log(key, value) |
| | | } |
| | | // åèæä»¶ä¸ä¼ å°æ¹ï¼æå¤©ç |
| | | // for (var [key, value] of formData) { |
| | | // console.log(key, value) |
| | | // } |
| | | this.$store.state.app.buttonIsDisabled = true |
| | | SystemSopSava(formData).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success('æä»¶ä¸ä¼ æåï¼') |
| | | this.dialogVisible = false |
| | | this.$store.state.app.buttonIsDisabled = false |
| | | this.getSystemSopSearch() |
| | | } else { |
| | | this.$message.error('æä»¶ä¸ä¼ 失败ï¼') |
| | | this.$store.state.app.buttonIsDisabled = false |
| | | } |
| | | }) |
| | | } |