| | |
| | | * @Author: sakuya |
| | | * @Date: 2021å¹´9æ22æ¥09:26:25 |
| | | * @LastEditors: Sneed |
| | | * @LastEditTime: 2024-06-13 22:50:27 |
| | | * @LastEditTime: 2024-06-16 15:18:05 |
| | | --> |
| | | |
| | | <template> |
| | |
| | | <!-- input --> |
| | | <template v-if="item.component == 'input'"> |
| | | <el-input v-model="form[item.name]" :placeholder="item.options.placeholder" clearable |
| | | :maxlength="item.options.maxlength" show-word-limit |
| | | :disabled="item.disabled"></el-input> |
| | | :maxlength="item.options.maxlength" show-word-limit :disabled="item.disabled" |
| | | :type="item.type"></el-input> |
| | | </template> |
| | | <!-- checkbox --> |
| | | <template v-else-if="item.component == 'checkbox'"> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- |
| | | * @Date: 2024-06-16 15:38:05 |
| | | * @LastEditors: Sneed |
| | | * @LastEditTime: 2024-06-16 15:39:11 |
| | | * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/components/scMyFilePreview.vue |
| | | --> |
| | | <template> |
| | | <div> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped></style> |
| | |
| | | /* |
| | | * @Date: 2024-03-23 09:49:06 |
| | | * @LastEditors: Sneed |
| | | * @LastEditTime: 2024-06-16 15:38:54 |
| | | * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/scui.js |
| | | */ |
| | | import config from "./config" |
| | | import api from './api' |
| | | import tool from './utils/tool' |
| | |
| | | import scForm from './components/scForm' |
| | | import scTitle from './components/scTitle' |
| | | import scWaterMark from './components/scWaterMark' |
| | | import scMyFilePreview from './components/scMyFilePreview' |
| | | import scQrCode from './components/scQrCode' |
| | | |
| | | import scStatusIndicator from './components/scMini/scStatusIndicator' |
| | |
| | | //注åå
¨å±ç»ä»¶ |
| | | app.component('scTable', scTable); |
| | | app.component('scTableColumn', scTableColumn); |
| | | app.component('scMyFilePreview', scMyFilePreview); |
| | | app.component('scFilterBar', scFilterBar); |
| | | app.component('scUpload', scUpload); |
| | | app.component('scUploadMultiple', scUploadMultiple); |
| | |
| | | app.directive('copy', copy) |
| | | |
| | | //ç»ä¸æ³¨åel-icon徿 |
| | | for(let icon in elIcons){ |
| | | for (let icon in elIcons) { |
| | | app.component(`ElIcon${icon}`, elIcons[icon]) |
| | | } |
| | | //ç»ä¸æ³¨åsc-icon徿 |
| | | for(let icon in scIcons){ |
| | | for (let icon in scIcons) { |
| | | app.component(`ScIcon${icon}`, scIcons[icon]) |
| | | } |
| | | |
| | |
| | | <!-- |
| | | * @Date: 2024-05-16 22:40:01 |
| | | * @LastEditors: Sneed |
| | | * @LastEditTime: 2024-06-11 19:19:41 |
| | | * @LastEditTime: 2024-06-16 15:35:03 |
| | | * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/dnc/document/index.vue |
| | | --> |
| | | <template> |
| | |
| | | <el-aside width="200px"> |
| | | <el-container> |
| | | <el-main> |
| | | <el-tree default-expand-all ref="tree" node-key="id" :data="treeData" :props="{ |
| | | label: 'name', |
| | | }" @node-click="nodeClick" highlight-current :current-node-key="selectNode.id"> |
| | | <el-tree expand-on-click-node default-expand-all ref="tree" node-key="id" :data="treeData" |
| | | :props="{ |
| | | label: 'name', |
| | | }" @node-click="nodeClick" highlight-current :current-node-key="selectNode.id"> |
| | | <template #default="{ node, data }"> |
| | | <span :class="data.isGroup ? 'active' : ''" class="custom-tree-node"> |
| | | <span>{{ |
| | |
| | | <template #dropdown> |
| | | <el-dropdown-menu> |
| | | <el-dropdown-item @click="addFolder">æä»¶å¤¹</el-dropdown-item> |
| | | <el-dropdown-item>æä»¶</el-dropdown-item> |
| | | <el-dropdown-item @click="addFile">æä»¶</el-dropdown-item> |
| | | </el-dropdown-menu> |
| | | </template> |
| | | </el-dropdown> |
| | |
| | | <el-button-group> |
| | | <el-button text type="primary" size="small" |
| | | @click="table_edit(scope.row, scope.$index)">ç¼è¾</el-button> |
| | | <el-button text type="primary" size="small" |
| | | @click="del([scope.row])">å é¤</el-button> |
| | | <el-popconfirm width="220" title="ç¡®å®å°éæ©çæ°æ®å é¤" @confirm="del([scope.row], '0')"> |
| | | <template #reference> |
| | | <el-button text type="primary" size="small">å é¤</el-button> |
| | | </template> |
| | | </el-popconfirm> |
| | | <!-- <el-button text type="primary" size="small" |
| | | @click="del([scope.row])">å é¤</el-button> --> |
| | | </el-button-group> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | <scDialog v-model="visible"> |
| | | <scForm ref="form" :config="config" :rules="rules1" v-model="form1" @submit="submit1"> |
| | | </scForm> |
| | | </scDialog> |
| | | </el-main> |
| | | </template> |
| | | |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | visible: false, |
| | | rules1: { |
| | | name: [{ |
| | | required: true, message: 'å¿
å¡«' |
| | | }], |
| | | content: [{ |
| | | required: true, message: 'å¿
å¡«' |
| | | }] |
| | | }, |
| | | form1: {}, |
| | | config: { |
| | | labelWidth: 120, |
| | | formItems: [ |
| | | { |
| | | component: 'input', |
| | | label: 'æä»¶åç§°', |
| | | name: 'name', |
| | | options: { |
| | | placeholder: '', |
| | | maxlength: 100, |
| | | } |
| | | }, |
| | | { |
| | | component: 'input', |
| | | label: 'æä»¶å
容', |
| | | type: 'textarea', |
| | | name: 'content', |
| | | options: { |
| | | multiple: false, |
| | | data: [] |
| | | }, |
| | | disabled: false |
| | | } |
| | | ] |
| | | }, |
| | | treeData: [], |
| | | selectNode: {}, |
| | | visible: false, |
| | |
| | | this.init() |
| | | }, |
| | | methods: { |
| | | addFile() { |
| | | this.form1 = {} |
| | | this.$refs?.form?.resetFields() |
| | | this.visible = true |
| | | }, |
| | | submit1() { |
| | | // åå»ºææ¬å
容 |
| | | const textContent = "è¿éæ¯ææ¬å
容"; |
| | | |
| | | // å建Blob对象 |
| | | const blob = new Blob([this.form1.content], { type: 'text/plain' }); |
| | | // å建File对象 |
| | | const file = new File([blob], this.form1.name, { type: 'text/plain', lastModified: new Date().getTime() }); |
| | | const data = new FormData() |
| | | data.append("file", file); |
| | | this.$HTTP.post(`/api/blade-resource/oss/endpoint/put-file`, data).then(res => { |
| | | if (res.success) { |
| | | this.$HTTP.post(`/api/blade-dnc/file/batch-save`, [{ |
| | | name: `${this.form1.name}.txt`, |
| | | targetId: this.selectNode.id, |
| | | ossFile: { |
| | | attachId: res.data.attachId, |
| | | domain: res.data.domain, |
| | | link: res.data.link, |
| | | name: res.data.name, |
| | | originalName: res.data.originalName |
| | | } |
| | | }]).then(res => { |
| | | if (res.success) { |
| | | this.visible = false |
| | | this.search() |
| | | } else { |
| | | this.$message.error(res.msg) |
| | | } |
| | | }) |
| | | } else { |
| | | this.$message.error(res.msg) |
| | | } |
| | | }) |
| | | }, |
| | | init() { |
| | | this.selectNode = { |
| | | id: '' |
| | |
| | | <!-- |
| | | * @Date: 2024-05-20 21:43:10 |
| | | * @LastEditors: Sneed |
| | | * @LastEditTime: 2024-06-06 23:11:22 |
| | | * @LastEditTime: 2024-06-16 15:52:44 |
| | | * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/dnc/factory-file/index.vue |
| | | --> |
| | | <template> |
| | |
| | | :params="params" :apiObj="apiObj" @selection-change="selectionChange" stripe> |
| | | <el-table-column type="selection" width="50"></el-table-column> |
| | | <el-table-column label="æä»¶åç§°" prop="filename"> |
| | | <!-- <template #default="scope"> |
| | | <el-icon style="margin-right: 4px;"> |
| | | <el-icon-folder v-if="scope.row.fileType === 1" /> |
| | | <el-icon-document v-else /> |
| | | </el-icon> |
| | | <a v-if="scope.row.fileType === 1" @click="goCurrent(scope.row)" |
| | | style="color: var(--el-color-primary);cursor: pointer;">{{ scope.row.name }}</a> |
| | | <a v-else @click="viewHis(scope.row)" |
| | | style="color: var(--el-color-primary);cursor: pointer;">{{ scope.row.name }}</a> |
| | | </template> --> |
| | | <template #default="scope"> |
| | | <a @click="goCurrent(scope.row)" |
| | | style="color: var(--el-color-primary);cursor: pointer;">{{ scope.row.filename }}</a> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="çæ¬" prop="versionDesc"></el-table-column> |
| | | <el-table-column label="æä»¶å¤§å°" prop="contentLength"></el-table-column> |
| | |
| | | <el-table-column label="æä½" fixed="right" align="right" width="160"> |
| | | <template #default="scope"> |
| | | <el-button-group> |
| | | <el-button text type="primary" size="small" @click="del([scope.row])">å é¤</el-button> |
| | | <el-popconfirm width="220" title="ç¡®å®å°éæ©çæ°æ®å é¤" @confirm="del([scope.row], '0')"> |
| | | <template #reference> |
| | | <el-button text type="primary" size="small">å é¤</el-button> |
| | | </template> |
| | | </el-popconfirm> |
| | | </el-button-group> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | goCurrent(row) { |
| | | console.log(row) |
| | | window.open(row.link) |
| | | // this.$HTTP.get(row.link) |
| | | }, |
| | | selectionChange(selection) { |
| | | this.selection = selection |
| | | }, |
| | |
| | | <!-- |
| | | * @Date: 2024-05-20 21:43:10 |
| | | * @LastEditors: Sneed |
| | | * @LastEditTime: 2024-06-06 23:06:11 |
| | | * @LastEditTime: 2024-06-16 15:35:21 |
| | | * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/dnc/file/admin/index.vue |
| | | --> |
| | | <template> |
| | |
| | | <el-table-column label="æä½" fixed="right" align="right" width="160"> |
| | | <template #default="scope"> |
| | | <el-button-group> |
| | | <el-button text type="primary" size="small" |
| | | @click="del([scope.row])">å é¤</el-button> |
| | | <el-popconfirm width="220" title="ç¡®å®å°éæ©çæ°æ®å é¤" @confirm="del([scope.row], '0')"> |
| | | <template #reference> |
| | | <el-button text type="primary" size="small">å é¤</el-button> |
| | | </template> |
| | | </el-popconfirm> |
| | | </el-button-group> |
| | | </template> |
| | | </el-table-column> |