166 lines
6.9 KiB
Plaintext
166 lines
6.9 KiB
Plaintext
@{
|
|
ViewData["Title"] = "模型文件管理";
|
|
|
|
}
|
|
<style>
|
|
.tc {
|
|
background-color: rgba(0,0,0,.4);
|
|
align-items: center;
|
|
-webkit-tap-highlight-color: transparent;
|
|
-webkit-tap-highlight-color: transparent;
|
|
display: flex;
|
|
position: fixed;
|
|
z-index: 1060;
|
|
top: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
left: 0;
|
|
flex-direction: row;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 0.625em;
|
|
overflow-x: hidden;
|
|
transition: background-color .1s;
|
|
-webkit-overflow-scrolling: touch;
|
|
}
|
|
|
|
.tcc {
|
|
margin: auto;
|
|
-webkit-animation: swal2-show .3s;
|
|
animation: swal2-show .3s;
|
|
-webkit-tap-highlight-color: transparent;
|
|
display: none;
|
|
position: relative;
|
|
box-sizing: border-box;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
width: 32em;
|
|
max-width: 100%;
|
|
padding: 1.25em;
|
|
border: none;
|
|
border-radius: 0.3125em;
|
|
background: #fff;
|
|
font-family: inherit;
|
|
font-size: 1rem;
|
|
}
|
|
*::-webkit-scrollbar {
|
|
height: 0;
|
|
width: 0;
|
|
color: transparent;
|
|
}
|
|
</style>
|
|
<!-- 内容标题(页面标题) -->
|
|
<div class="content-header" style="padding: 5px 0;">
|
|
<div class="col-12">
|
|
<h5 style='padding: 7.5px;' class="m-0 text-white bg-info">@ViewData["Title"]</h5>
|
|
</div>
|
|
<div id="app" style="display:none;">
|
|
@*弹窗*@
|
|
<div id="filedata" v-if="files_data.length > 0 " class="tc" style="overflow-y: auto;">
|
|
<div id="file_data" class="tcc" style="display: flex;">
|
|
<table class="table table-bordered">
|
|
<thead>
|
|
<tr>
|
|
<th>文件名</th>
|
|
<th>大小/字节</th>
|
|
<th v-if="files_data[0].hasOwnProperty('isok')">状态</th>
|
|
<th>操作</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr v-for="(item,index) in files_data">
|
|
<td>{{item.name}}</td>
|
|
<td>{{item.size}}</td>
|
|
<td v-if="item.hasOwnProperty('isok')">{{item['isok']==-2?"上传失败":(item['isok']==-1?"文件重复":(item['isok']==1?"上传成功":"其他异常"))}}</td>
|
|
<td>
|
|
<button v-if="!item.hasOwnProperty('isok') || item.isok == -2 " v-on:click="rem_file(index)" class="btn btn-danger btn-xs">
|
|
移除
|
|
</button>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div>
|
|
<button v-on:click="click_file(-1)" class=" btn btn-success btn-xs">继续添加</button>
|
|
<button v-on:click="add_file" class="ml-1 btn btn-info btn-xs">确认上传</button>
|
|
<button v-on:click="click_file(-10)" class="ml-1 btn btn-danger btn-xs">关闭</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@* 按钮区域 添加文件表单区域 *@
|
|
<div class="row ml-0 mr-0 mt-1" >
|
|
<div class="col-6 col-md-3">
|
|
<!-- select -->
|
|
<div class="form-group mb-1">
|
|
@* 下拉筛选区域 *@
|
|
<select v-on:change="table_init" v-model="selected_page" class="form-control">
|
|
<option v-for="(sel,index) in selectpage" v-bind:value="sel.val">
|
|
{{sel.text}}
|
|
</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="col-6 col-md-3">
|
|
<!-- select -->
|
|
<div class="form-group mb-1">
|
|
@* 下拉筛选区域 *@
|
|
<select v-on:change="table_init" v-model="selected" class="form-control">
|
|
<option v-for="(sel,index) in select" v-bind:value="sel.val">
|
|
{{sel.text}}
|
|
</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="mb-1 ml-2">
|
|
@* 按钮区域 *@
|
|
<button type="button" v-on:click="click_file(0)" class="mr-1 btn btn-info btn-xs">上传485Model</button>
|
|
<button type="button" v-on:click="click_file(1)" class="mr-1 btn btn-info btn-xs">上传BaseModel</button>
|
|
<button type="button" v-on:click="click_file(2)" class=" btn btn-info btn-xs">上传RCUModel</button>
|
|
@* 添加文件表单区域 *@
|
|
<form ref="addfile">
|
|
<input type="hidden" name="type" v-model="add_type" />
|
|
<slot v-for="index of 1000">
|
|
<input v-if="files_ele_count >= index-1" name="files" type="file" v-on:change="filechange" class="filedata" :ref="'filedata'+(index-1)" style="display:none;" accept="application/xml" />
|
|
</slot>
|
|
</form>
|
|
</div>
|
|
@* 数据区域 *@
|
|
<div class="container-fluid table-responsive " :style="{'height':appheight}">
|
|
@* <div v-if="rcudata.length>0" v-for="(rcu,index) in rcudata" style="color: black;padding: 0.75rem;" class="row bg-white shadow">
|
|
<div class="col-12 col-md-6">
|
|
<span v-html="ellipsis(rcu.data.MFD_ID)"></span>
|
|
<button type="button" :class="[rcu.data.Available == 1?'btn btn-xs btn-success':'btn btn-xs btn-danger']">{{rcu.data.Available==1?'可 用':'不可用'}}</button>
|
|
{{rcu.data.UploadDateTime}}
|
|
</div>
|
|
<div class="col-md-6 col-12">
|
|
FilePath : {{rcu.data.Directory}}\{{rcu.data.XML_FileName}}
|
|
</div>
|
|
<div class="col-md-6 col-12">
|
|
XLM_MD5 : {{rcu.data.XLM_MD5}}
|
|
</div>
|
|
<div class="col-md-6 col-12">
|
|
{{rcu.size}}
|
|
<button type="button" v-on:click="del_file(index)" class="btn btn-danger btn-xs">删除文件</button>
|
|
</div>
|
|
</div>*@
|
|
<table style="line-height:normal" class="table table-borderless" id="dataTable">
|
|
<thead style="display:none;">
|
|
<tr>
|
|
<th>ID</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<!-- /.container-fluid -->
|
|
</div>
|
|
<script src="/js/vue.global.js"></script>
|
|
<script defer src="~/js/jquery.dataTables.min.js"></script>
|
|
<script defer src="~/js/dataTables.bootstrap4.min.js"></script>
|
|
<script defer src="~/js_custom/ModelFile.js"> </script>
|
|
|
|
|