|
@@ -43,6 +43,51 @@
|
|
|
@current-change="currentChange"
|
|
|
@size-change="sizeChange"
|
|
|
@refresh-change="refreshChange">
|
|
|
+ <template slot="downloadUrl" slot-scope="{ row }">
|
|
|
+ <el-input
|
|
|
+ v-if="row.$cellEdit"
|
|
|
+ v-model="row.downloadUrl"
|
|
|
+ style="width: 80%"
|
|
|
+ size="small"
|
|
|
+ >
|
|
|
+ </el-input>
|
|
|
+ <el-button
|
|
|
+ style="width: 20%"
|
|
|
+ size="small"
|
|
|
+ v-if="row.$cellEdit"
|
|
|
+ @click="uploadFiles(row)"
|
|
|
+ >
|
|
|
+ 附件
|
|
|
+ </el-button>
|
|
|
+ <span v-else>{{ row.downloadUrl }}</span>
|
|
|
+ </template>
|
|
|
+ <template slot="versionDesc" slot-scope="{ row }">
|
|
|
+ <el-input type="textarea"
|
|
|
+ v-if="row.$cellEdit"
|
|
|
+ v-model="row.versionDesc"
|
|
|
+ size="small"
|
|
|
+ autocomplete="off"
|
|
|
+ placeholder="">
|
|
|
+ </el-input>
|
|
|
+ <span v-else>{{ row.versionDesc }}</span>
|
|
|
+ </template>
|
|
|
+ <template slot="isRelease" slot-scope="{ row, index }">
|
|
|
+ <el-select
|
|
|
+ v-if="row.$cellEdit"
|
|
|
+ v-model="row.isRelease"
|
|
|
+ size="small"
|
|
|
+ @change="isReleaseChange(row,index)"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(item,index) in isReleaseList"
|
|
|
+ :key="index"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ <span v-else>{{ row.isRelease ===1?"是":"否" }}</span>
|
|
|
+ </template>
|
|
|
<template slot="menuLeft">
|
|
|
<el-button type="primary"
|
|
|
size="small"
|
|
@@ -69,6 +114,22 @@
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
</basic-container>
|
|
|
+ <el-dialog
|
|
|
+ title="上传附件"
|
|
|
+ append-to-body
|
|
|
+ :visible.sync="excelBox"
|
|
|
+ width="555px"
|
|
|
+ v-dialog-drag
|
|
|
+ >
|
|
|
+ <avue-form
|
|
|
+ :option="excelOption"
|
|
|
+ v-model="excelForm"
|
|
|
+ table-loading="excelLoading"
|
|
|
+ :upload-before="uploadBefore"
|
|
|
+ :upload-after="uploadAfter"
|
|
|
+ >
|
|
|
+ </avue-form>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -146,6 +207,40 @@
|
|
|
},
|
|
|
],
|
|
|
},
|
|
|
+ selectRow:{},
|
|
|
+ isReleaseList:[
|
|
|
+ {
|
|
|
+ label: "是",
|
|
|
+ value: 1
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "否",
|
|
|
+ value: 0
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ excelBox: false,
|
|
|
+ excelLoading: false,
|
|
|
+ excelForm: {},
|
|
|
+ excelOption: {
|
|
|
+ submitBtn: false,
|
|
|
+ emptyBtn: false,
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ label: "附件上传",
|
|
|
+ prop: "excelFile",
|
|
|
+ type: "upload",
|
|
|
+ drag: true,
|
|
|
+ dataType: "string",
|
|
|
+ loadText: "模板上传中,请稍等",
|
|
|
+ span: 24,
|
|
|
+ propsHttp: {
|
|
|
+ res: "data",
|
|
|
+ url: "link"
|
|
|
+ },
|
|
|
+ action: "/api/blade-resource/oss/endpoint/put-file"
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
oldForm:{},
|
|
|
oldDataList:[],
|
|
|
}
|
|
@@ -160,10 +255,45 @@
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
+ watch:{
|
|
|
+ 'excelForm.excelFile'(val) {
|
|
|
+ this.selectRow.downloadUrl = val
|
|
|
+ },
|
|
|
+ },
|
|
|
mounted() {
|
|
|
|
|
|
},
|
|
|
methods: {
|
|
|
+ isReleaseChange(row,indexs){
|
|
|
+ if(row.isRelease === 1){
|
|
|
+ //如果其他版本有发布的
|
|
|
+ let yes ;
|
|
|
+ this.dataList.map((item,index)=>{
|
|
|
+ if(indexs != index && item.isRelease === 1){
|
|
|
+ yes = true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if(yes){
|
|
|
+ this.$message.warning("已有其他版本发布!")
|
|
|
+ row.isRelease = 0
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ uploadFiles(row){
|
|
|
+ this.selectRow = row
|
|
|
+ this.excelBox = true
|
|
|
+ },
|
|
|
+ uploadBefore(file, done, loading) {
|
|
|
+ done();
|
|
|
+ loading = true;
|
|
|
+ },
|
|
|
+ uploadAfter(res, done, loading, column) {
|
|
|
+ this.excelBox = false;
|
|
|
+ this.$message.success("上传成功!");
|
|
|
+ loading = false;
|
|
|
+ done();
|
|
|
+ },
|
|
|
rowUpdate(row, index, done) {
|
|
|
done(row);
|
|
|
},
|