|
@@ -382,6 +382,14 @@
|
|
|
{{ scope.row.size >1024 ? scope.row.size>1024*1024?(scope.row.size / 1024/1024).toFixed(2) + ' MB' :(scope.row.size / 1024).toFixed(2) + ' KB' : scope.row.size + ' B' }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column prop="sortindex" label="排序" width="120">
|
|
|
+ <template #default="scope">
|
|
|
+ <div>
|
|
|
+ <el-input-number style="width: 100px" v-model="scope.row.sortindex" :min="0" :max="100" label="排序" @change="updatefileindex(scope.row)"></el-input-number>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ </el-table-column>
|
|
|
<el-table-column prop="createTime" label="上传时间" width="180">
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="date" label="操作" fixed="right" width="200">
|
|
@@ -432,7 +440,7 @@ import mp4icon from '@/assets/icons/svg/mp4.svg'
|
|
|
import cadicon from '@/assets/icons/svg/cad.svg'
|
|
|
import unknownicon from '@/assets/icons/svg/unknown.svg'
|
|
|
import { ref, onMounted } from "vue";
|
|
|
-import { listByIds,delOss } from "@/api/system/oss";
|
|
|
+import { listByIds,delOss,updateById } from "@/api/system/oss";
|
|
|
import {
|
|
|
listArchives,
|
|
|
addArchives,
|
|
@@ -501,7 +509,11 @@ const totalnum = ref(0);
|
|
|
|
|
|
const status = ref("0");
|
|
|
|
|
|
-
|
|
|
+const updatefileindex = (row:any)=>{
|
|
|
+ updateById(row.ossId,row.sortindex).then(()=>{
|
|
|
+ getfilelist();
|
|
|
+ })
|
|
|
+}
|
|
|
|
|
|
const getnextdata = (page: number) => {
|
|
|
currentpage.value = page;
|
|
@@ -720,7 +732,7 @@ const getfilelist =()=>{
|
|
|
getArchive_files(currentitem.value.id).then((res1) => {
|
|
|
var resultArray = res1.data.sort(
|
|
|
function compareFunction(param1, param2) {
|
|
|
- return param1.originalName.localeCompare(param2.originalName,"zh");
|
|
|
+ return param1.sortindex-param2.sortindex;
|
|
|
}
|
|
|
);
|
|
|
res1.data = resultArray;
|