| | |
| | | `${$t('userManage.resManage')}`, |
| | | ]"></My-bread> |
| | | <el-divider /> |
| | | <div class="power_quire"> |
| | | <div |
| | | class="power_quire subpage_Div" |
| | | ref="container" |
| | | > |
| | | <el-form |
| | | ref="form" |
| | | :model="ruleForm" |
| | | :inline="true" |
| | | > |
| | | <el-form-item :label="$t('userManage.resManageObj.name')"> |
| | | <el-input v-model="ruleForm.name"></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button |
| | | @click="submitForm('ruleForm')" |
| | | icon="el-icon-search" |
| | | size="small" |
| | | type="primary" |
| | | style="background: #1890ff" |
| | | >{{ $t('common.iquery') }}</el-button> |
| | | <el-button |
| | | @click="resetForm('ruleForm')" |
| | | icon="el-icon-refresh" |
| | | type="info" |
| | | size="small" |
| | | >{{ $t('common.empty') }}</el-button> |
| | | <el-button |
| | | v-if="menuStatus.insert" |
| | | @click="InsertFormdialog = true" |
| | | icon="el-icon-edit" |
| | | type="success" |
| | | size="small" |
| | | >{{ $t('common.append') }}</el-button> |
| | | <el-button |
| | | v-if="menuStatus.delete" |
| | | @click="DelFromData" |
| | | icon="el-icon-delete" |
| | | type="danger" |
| | | size="small" |
| | | >{{ $t('common.delete') }}</el-button> |
| | | </el-form-item> |
| | | <div class="flex_box"> |
| | | <el-form-item |
| | | :label="$t('userManage.resManageObj.name')" |
| | | style="margin-right: auto" |
| | | > |
| | | <el-input |
| | | v-model="ruleForm.name" |
| | | size="small" |
| | | style="width:200px" |
| | | :placeholder="$t('userManage.resManageObj.nameHolder')" |
| | | > |
| | | <i |
| | | slot="suffix" |
| | | class="el-icon-search" |
| | | @click="submitForm" |
| | | ></i> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button |
| | | v-if="menuStatus.insert" |
| | | @click="setInsertFormdialog" |
| | | icon="el-icon-edit" |
| | | type="success" |
| | | size="small" |
| | | >{{ $t('common.append') }}</el-button> |
| | | <el-button |
| | | v-if="menuStatus.delete" |
| | | @click="DelFromData" |
| | | icon="el-icon-delete" |
| | | type="danger" |
| | | size="small" |
| | | >{{ $t('common.delete') }}</el-button> |
| | | <!-- <el-button--> |
| | | <!-- @click="submitForm('ruleForm')"--> |
| | | <!-- icon="el-icon-search"--> |
| | | <!-- size="small"--> |
| | | <!-- type="primary"--> |
| | | <!-- style="background: #1890ff"--> |
| | | <!-- >{{ $t('common.iquery') }}</el-button>--> |
| | | <el-button |
| | | @click="resetForm('ruleForm')" |
| | | icon="el-icon-refresh" |
| | | type="info" |
| | | size="small" |
| | | >{{ $t('common.empty') }}</el-button> |
| | | </el-form-item> |
| | | </div> |
| | | |
| | | </el-form> |
| | | </div> |
| | | <div class="table_box"> |
| | | <div class="dividing-line"></div> |
| | | <div |
| | | class="table_box" |
| | | :style="styleVar" |
| | | > |
| | | <el-table |
| | | :data="tableData" |
| | | style="width: 100%" |
| | | fit |
| | | border |
| | | @selection-change="handleSelectionChange" |
| | | height="calc(100% - 45px)" |
| | | > |
| | | <el-table-column |
| | | type="selection" |
| | |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | fixed="right" |
| | | :label="$t('common.operate')" |
| | | width="170px" |
| | | > |
| | |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <div class="pagination_box"> |
| | | <el-pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | :current-page="listData.pageIndex" |
| | | :page-sizes="[10, 20, 30, 40]" |
| | | :page-size="listData.pageSize" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="count" |
| | | <div |
| | | class="pagination_box" |
| | | style="margin-top: 10px" |
| | | > |
| | | </el-pagination> |
| | | <el-pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | :current-page="listData.pageIndex" |
| | | :page-sizes="[10, 20, 50, 100]" |
| | | :page-size="listData.pageSize" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="count" |
| | | > |
| | | </el-pagination> |
| | | </div> |
| | | </div> |
| | | <div |
| | | class="infoBox" |
| | | class="infoBox_box" |
| | | v-show="showinfoBox" |
| | | > |
| | | <el-card class="box-card"> |
| | | <div class="infoBox box_div "> |
| | | <div |
| | | slot="header" |
| | | class="clearfix" |
| | |
| | | <i class="el-icon-close"></i> |
| | | </div> |
| | | </div> |
| | | <el-divider></el-divider> |
| | | <div class="contentBox"> |
| | | <p> |
| | | <label> {{ $t('userManage.resManageObj.name') }}:</label> |
| | |
| | | </p> |
| | | <el-divider></el-divider> |
| | | </div> |
| | | </el-card> |
| | | |
| | | </div> |
| | | </div> |
| | | <el-dialog |
| | | :title="dialogTitle" |
| | | :visible.sync="isTransfer" |
| | | width="800px" |
| | | append-to-body |
| | | > |
| | | <el-tree |
| | |
| | | :title="$t('userManage.resManageObj.addResource')" |
| | | style="overflow: hidden" |
| | | :visible.sync="InsertFormdialog" |
| | | top="3%" |
| | | > |
| | | <el-form :model="insertform"> |
| | | <el-form-item |
| | | :label="$t('userManage.resManageObj.name')" |
| | | :label-width="formLabelWidth" |
| | | <div style="height: 500px; overflow: auto"> |
| | | <el-form |
| | | :model="insertform" |
| | | label-position="top" |
| | | > |
| | | <el-input |
| | | v-model="insertform.name" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('userManage.resManageObj.server')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="insertform.server" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('userManage.resManageObj.source')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="insertform.source" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('userManage.resManageObj.depid')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | <el-form-item |
| | | :label="$t('userManage.resManageObj.name')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="insertform.name" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('userManage.resManageObj.server')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="insertform.server" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('userManage.resManageObj.source')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="insertform.source" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('userManage.resManageObj.depid')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-select |
| | | :popper-append-to-body="false" |
| | | v-model="insertform.depValue" |
| | | placeholder="请选择" |
| | | style="width:85%" |
| | | > |
| | | <el-option |
| | | :value="insertform.depid" |
| | | :label="insertform.depValue" |
| | | style=" height:auto" |
| | | > |
| | | <el-tree |
| | | ref="tree" |
| | | :data="depList" |
| | | node-key="id" |
| | | :props="props" |
| | | @node-click="handleDepList" |
| | | /> |
| | | </el-option> |
| | | </el-select> |
| | | <!-- <el-input |
| | | v-model="insertform.depValue" |
| | | disabled |
| | | autocomplete="off" |
| | |
| | | :underline="false" |
| | | @click="showDepTree(0)" |
| | | style="margin-left: 10px" |
| | | ><i class="el-icon-plus"></i></el-link> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('userManage.resManageObj.dirid')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="insertform.dirValue" |
| | | disabled |
| | | autocomplete="off" |
| | | ></el-input> |
| | | <el-link |
| | | :underline="false" |
| | | @click="showDirTree(0)" |
| | | style="margin-left: 10px" |
| | | ><i class="el-icon-plus"></i></el-link> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('userManage.resManageObj.descr')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="insertform.descr" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('userManage.resManageObj.img')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="insertform.img" |
| | | disabled |
| | | autocomplete="off" |
| | | ></el-input> |
| | | <input |
| | | name="file1" |
| | | :accept="'.jpg,.png'" |
| | | type="file" |
| | | id="imageFile" |
| | | multiple="multiple" |
| | | style="display: none" |
| | | @change="insertFile" |
| | | /> |
| | | <el-link |
| | | :title="$t('common.append')" |
| | | :underline="false" |
| | | @click="getIsertFile" |
| | | style="margin-left: 10px" |
| | | ><i class="el-icon-plus"></i></el-link> |
| | | <el-link |
| | | :title="$t('common.upload')" |
| | | :underline="false" |
| | | @click="setUploadFile(0)" |
| | | style="margin-left: 10px" |
| | | ><i class="el-icon-upload2"></i></el-link> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('userManage.resManageObj.bak')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="insertform.bak" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | ><i class="el-icon-plus"></i></el-link> --> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('userManage.resManageObj.dirid')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-select |
| | | :popper-append-to-body="false" |
| | | v-model="insertform.dirValue" |
| | | placeholder="请选择" |
| | | style="width:85%" |
| | | > |
| | | <el-option |
| | | :value="insertform.dirid" |
| | | :label="insertform.dirValue" |
| | | style=" height:auto" |
| | | > |
| | | <el-tree |
| | | ref="tree" |
| | | :data="dirList" |
| | | node-key="id" |
| | | :props="props" |
| | | @node-click="handleDirList" |
| | | /> |
| | | </el-option> |
| | | </el-select> |
| | | |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('userManage.resManageObj.descr')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="insertform.descr" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('userManage.resManageObj.img')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <div class="BoxFlex"> |
| | | <div class="BoxFlexinput"> |
| | | <el-input |
| | | v-model="insertform.img" |
| | | disabled |
| | | autocomplete="off" |
| | | style="width:100%" |
| | | ></el-input> |
| | | |
| | | </div> |
| | | |
| | | <div class="BoxFlexbutton"> |
| | | <input |
| | | name="file1" |
| | | :accept="'.jpg,.png'" |
| | | type="file" |
| | | id="imageFile" |
| | | multiple="multiple" |
| | | style="display: none" |
| | | @change="insertFile" |
| | | /> |
| | | <el-link |
| | | :title="$t('common.append')" |
| | | :underline="false" |
| | | @click="getIsertFile" |
| | | style="margin-left: 6px" |
| | | ><i class="el-icon-plus"></i></el-link> |
| | | <el-link |
| | | :title="$t('common.upload')" |
| | | :underline="false" |
| | | @click="setUploadFile(0)" |
| | | ><i class="el-icon-upload2"></i></el-link> |
| | | </div> |
| | | </div> |
| | | |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('userManage.resManageObj.bak')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="insertform.bak" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | ></el-input> |
| | | |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div |
| | | slot="footer" |
| | | class="dialog-footer" |
| | |
| | | </el-dialog> |
| | | <el-dialog |
| | | :title="$t('userManage.userInfoObj.editPermission')" |
| | | style="overflow: hidden" |
| | | :visible.sync="EditFormdialog" |
| | | :before-close="EditFromDataClose" |
| | | > |
| | | <el-form :model="upform"> |
| | | <el-form-item |
| | | :label="$t('userManage.resManageObj.name')" |
| | | :label-width="formLabelWidth" |
| | | <div style="height: 500px; overflow: auto"> |
| | | <el-form |
| | | :model="upform" |
| | | label-position="top" |
| | | > |
| | | <el-input |
| | | v-model="upform.name" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('userManage.resManageObj.server')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="upform.server" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('userManage.resManageObj.source')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="upform.source" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('userManage.resManageObj.depid')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | <el-form-item |
| | | :label="$t('userManage.resManageObj.name')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="upform.name" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('userManage.resManageObj.server')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="upform.server" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('userManage.resManageObj.source')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="upform.source" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('userManage.resManageObj.depid')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-select |
| | | :popper-append-to-body="false" |
| | | v-model="upform.depValue" |
| | | placeholder="请选择" |
| | | style="width:85%" |
| | | > |
| | | <el-option |
| | | :value="upform.depid" |
| | | :label="upform.depValue" |
| | | style=" height:auto" |
| | | > |
| | | <el-tree |
| | | ref="tree1" |
| | | :data="dirList" |
| | | node-key="id" |
| | | :props="props" |
| | | @node-click="handleEditDepList" |
| | | /> |
| | | </el-option> |
| | | </el-select> |
| | | <!-- <el-input |
| | | v-model="upform.depValue" |
| | | disabled |
| | | autocomplete="off" |
| | |
| | | :underline="false" |
| | | @click="showDepTree(1)" |
| | | style="margin-left: 10px" |
| | | ><i class="el-icon-plus"></i></el-link> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('userManage.resManageObj.dirid')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | ><i class="el-icon-plus"></i></el-link> --> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('userManage.resManageObj.dirid')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-select |
| | | :popper-append-to-body="false" |
| | | v-model="upform.dirValue" |
| | | placeholder="请选择" |
| | | style="width:85%" |
| | | > |
| | | <el-option |
| | | :value="upform.dirid" |
| | | :label="upform.dirValue" |
| | | style=" height:auto" |
| | | > |
| | | <el-tree |
| | | ref="tree1" |
| | | :data="dirList" |
| | | node-key="id" |
| | | :props="props" |
| | | :default-expand-all="defaultExpand" |
| | | @node-click="handleEditDirList" |
| | | /> |
| | | </el-option> |
| | | </el-select> |
| | | <!-- <el-input |
| | | v-model="upform.dirValue" |
| | | disabled |
| | | autocomplete="off" |
| | |
| | | :underline="false" |
| | | @click="showDirTree(1)" |
| | | style="margin-left: 10px" |
| | | ><i class="el-icon-plus"></i></el-link> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('userManage.resManageObj.descr')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="upform.descr" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('userManage.resManageObj.img')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="upform.img" |
| | | disabled |
| | | autocomplete="off" |
| | | ></el-input> |
| | | <input |
| | | name="file1" |
| | | :accept="'.jpg,.png'" |
| | | type="file" |
| | | id="editimageFile" |
| | | multiple="multiple" |
| | | style="display: none" |
| | | @change="updateFile" |
| | | /> |
| | | <el-link |
| | | :underline="false" |
| | | @click="getupdateFile" |
| | | style="margin-left: 10px" |
| | | ><i class="el-icon-plus"></i></el-link> |
| | | <el-link |
| | | v-if="menuStatus.upload" |
| | | :title="$t('common.upload')" |
| | | :underline="false" |
| | | @click="setUploadFile(1)" |
| | | style="margin-left: 10px" |
| | | ><i class="el-icon-upload2"></i></el-link> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('userManage.resManageObj.bak')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="upform.bak" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | ><i class="el-icon-plus"></i></el-link> --> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('userManage.resManageObj.descr')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="upform.descr" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('userManage.resManageObj.img')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <div class="BoxFlex"> |
| | | <div class="BoxFlexinput"> |
| | | <el-input |
| | | v-model="upform.img" |
| | | disabled |
| | | autocomplete="off" |
| | | style="width:100%" |
| | | ></el-input> |
| | | </div> |
| | | <div class="BoxFlexbutton"> |
| | | <input |
| | | name="file1" |
| | | :accept="'.jpg,.png'" |
| | | type="file" |
| | | id="editimageFile" |
| | | multiple="multiple" |
| | | style="display: none" |
| | | @change="updateFile" |
| | | /> |
| | | <el-link |
| | | :underline="false" |
| | | @click="getupdateFile" |
| | | style="margin-left: 10px" |
| | | ><i class="el-icon-plus"></i></el-link> |
| | | <el-link |
| | | v-if="menuStatus.upload" |
| | | :title="$t('common.upload')" |
| | | :underline="false" |
| | | @click="setUploadFile(1)" |
| | | style="margin-left: 10px" |
| | | ><i class="el-icon-upload2"></i></el-link> |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('userManage.resManageObj.bak')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="upform.bak" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | ></el-input> |
| | | |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div |
| | | slot="footer" |
| | | class="dialog-footer" |
| | |
| | | </div> |
| | | </div> |
| | | <div |
| | | class="leftTree" |
| | | class="leftTree box_div" |
| | | v-if="showDepCata" |
| | | > |
| | | <div class="treeBox"> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import $ from 'jquery'; |
| | | import { getToken } from '../../utils/auth.js'; |
| | | import moment from 'moment'; |
| | | import MyBread from '../../components/MyBread.vue'; |
| | | import $ from "jquery"; |
| | | import { getToken } from "../../utils/auth.js"; |
| | | import moment from "moment"; |
| | | import MyBread from "../../components/MyBread.vue"; |
| | | import { |
| | | select_Res_ByPageAndCount, |
| | | insertRes, |
| | | updateRes, |
| | | deleteRess, |
| | | upload_res, |
| | | } from '../../api/api.js'; |
| | | import styleDirTree from '../datamanage/styleDirTree.vue'; |
| | | import styleDepTree from '../datamanage/styleDepTree.vue'; |
| | | selectdirTab, |
| | | selectdepTab, |
| | | } from "../../api/api.js"; |
| | | import styleDirTree from "../datamanage/styleDirTree.vue"; |
| | | import styleDepTree from "../datamanage/styleDepTree.vue"; |
| | | export default { |
| | | components: { MyBread, styleDirTree, styleDepTree }, |
| | | data() { |
| | | return { |
| | | props: { |
| | | label: "name", |
| | | value: "id", |
| | | children: "children", |
| | | checkStrictly: true, |
| | | emitPath: false, |
| | | }, |
| | | depList: [], |
| | | dirList: [], |
| | | menuStatus: { |
| | | delete: false, |
| | | insert: false, |
| | | update: false, |
| | | upload: false, |
| | | }, |
| | | formLabelWidth: '130px', |
| | | formLabelWidth: "130px", |
| | | ruleForm: {}, |
| | | isTransfer: false, |
| | | dialogTitle: '', |
| | | dialogTitle: "", |
| | | data: [], |
| | | InsertFormdialog: false, |
| | | showinfoBox: false, |
| | |
| | | ImageFile: null, |
| | | uploadFile: null, |
| | | insertform: { |
| | | img: '', |
| | | img: "", |
| | | depValue: "", |
| | | dirValue: "", |
| | | }, |
| | | tableData: [], |
| | | itemdetail: {}, |
| | | upform: { img: '' }, |
| | | upform: { img: "" }, |
| | | multipleSelection: [], |
| | | count: 0, |
| | | listData: { |
| | |
| | | pageSize: 10, |
| | | }, |
| | | defaultProps: { |
| | | children: 'children', |
| | | label: 'label', |
| | | children: "children", |
| | | label: "label", |
| | | }, |
| | | tableHeight: 0, |
| | | timer: 0, |
| | | styleVar: { |
| | | height: "calc(100% - 109px)", |
| | | }, |
| | | }; |
| | | }, |
| | |
| | | } |
| | | this.getRoleTabelData(); |
| | | }, |
| | | mounted() { |
| | | window.addEventListener("resize", this.onResize); |
| | | this.calHeight(); |
| | | }, |
| | | beforeDestroy() { |
| | | this.timer && clearTimeout(this.timer); |
| | | window.removeEventListener("resize", this.onResize); |
| | | }, |
| | | methods: { |
| | | onResize() { |
| | | this.timer && clearTimeout(this.timer); |
| | | this.timer = setTimeout(() => { |
| | | this.calHeight(); |
| | | }, 500); |
| | | }, |
| | | calHeight() { |
| | | this.$nextTick(() => { |
| | | const rect = this.$refs.container.getBoundingClientRect(); |
| | | this.tableHeight = `${rect.height + 97}px`; |
| | | // this.styleVar["height"] = `calc(100% - ${rect.height + 97}px)`; |
| | | this.styleVar["height"] = `calc(100% - ${rect.height + 30}px)`; |
| | | }); |
| | | }, |
| | | handleEditDepList(data, node, nodeData) { |
| | | this.upform.depid = data.id; |
| | | this.upform.depValue = data.name; |
| | | }, |
| | | handleEditDirList(data, node, nodeData) { |
| | | this.upform.dirid = data.id; |
| | | this.upform.dirValue = data.name; |
| | | }, |
| | | handleDepList(data, node, nodeData) { |
| | | this.insertform.depid = data.id; |
| | | this.insertform.depValue = data.name; |
| | | }, |
| | | handleDirList(data, node, nodeData) { |
| | | this.insertform.dirid = data.id; |
| | | this.insertform.dirValue = data.name; |
| | | }, |
| | | treeData(source) { |
| | | let cloneData = JSON.parse(JSON.stringify(source)); // 对源数据深度克隆 |
| | | return cloneData.filter((father) => { |
| | | // 循环所有项 |
| | | let branchArr = cloneData.filter((child) => father.id == child.pid); // 对比ID,分别上下级菜单,并返回数据 |
| | | branchArr.length > 0 ? (father.children = branchArr) : ""; // 给父级添加一个children属性,并赋值 |
| | | // 属于同一对象问题,例如:令 a=b、c=1 ,然后再令 b.c=c , 那么 a.c=b.c=c=1 ;同理,后续令 c.d=2 ,那么 a.c.d 也是=2; |
| | | // 由此循环多次后,就能形成相应的树形数据结构 |
| | | return father.pid == 0; // 返回一级菜单 |
| | | }); |
| | | }, |
| | | async getDepList() { |
| | | const data = await selectdepTab(); |
| | | if (data.code != 200) { |
| | | return this.$message.error("单位列表调用失败"); |
| | | } |
| | | this.depList = this.treeData(data.result); |
| | | }, |
| | | async getDirList() { |
| | | const data = await selectdirTab(); |
| | | if (data.code != 200) { |
| | | return this.$message.error("目录列表调用失败"); |
| | | } |
| | | this.dirList = this.treeData(data.result); |
| | | }, |
| | | setInsertFormdialog() { |
| | | this.getDepList(); |
| | | this.getDirList(); |
| | | this.InsertFormdialog = true; |
| | | }, |
| | | showPermsMenu(res) { |
| | | switch (res.tag) { |
| | | case '/delete': |
| | | case "/delete": |
| | | this.menuStatus.delete = true; |
| | | break; |
| | | case '/insert': |
| | | case "/insert": |
| | | this.menuStatus.insert = true; |
| | | break; |
| | | case '/update': |
| | | case "/update": |
| | | this.menuStatus.update = true; |
| | | break; |
| | | case '/upload': |
| | | case "/upload": |
| | | this.menuStatus.upload = true; |
| | | break; |
| | | } |
| | | }, |
| | | getIsertFile() { |
| | | $('#imageFile').click(); |
| | | $("#imageFile").click(); |
| | | }, |
| | | getupdateFile() { |
| | | $('#editimageFile').click(); |
| | | $("#editimageFile").click(); |
| | | }, |
| | | async setUploadFile(res) { |
| | | var fs; |
| | | if (res == 0) { |
| | | fs = document.getElementById('imageFile'); |
| | | fs = document.getElementById("imageFile"); |
| | | } else if (res == 1) { |
| | | fs = document.getElementById('editimageFile'); |
| | | fs = document.getElementById("editimageFile"); |
| | | if (fs.files.length == 0) { |
| | | return; |
| | | } |
| | | } |
| | | var formData = new FormData(); |
| | | formData.append('file', fs.files[0]); |
| | | formData.append("file", fs.files[0]); |
| | | var val_data = await upload_res(formData); |
| | | if (val_data.code == 200) { |
| | | this.uploadFile = val_data.result; |
| | | this.$message({ |
| | | message: '上传成功!', |
| | | type: 'success', |
| | | message: "上传成功!", |
| | | type: "success", |
| | | }); |
| | | } else { |
| | | this.$message({ |
| | | message: '上传失败!', |
| | | type: 'warning', |
| | | message: "上传失败!", |
| | | type: "warning", |
| | | }); |
| | | } |
| | | }, |
| | | insertFile() { |
| | | var val = document.getElementById('imageFile').files; |
| | | var val = document.getElementById("imageFile").files; |
| | | if (!val || !val.length) return; |
| | | this.insertform.img = val[0].name; |
| | | }, |
| | | updateFile() { |
| | | var val = document.getElementById('editimageFile').files; |
| | | var val = document.getElementById("editimageFile").files; |
| | | if (!val || !val.length) return; |
| | | this.upform.img = val[0].name; |
| | | }, |
| | |
| | | for (var i in this.multipleSelection) { |
| | | std.push(this.multipleSelection[i].id); |
| | | } |
| | | const data = await deleteRess({ ids: std.toString() }); |
| | | if (data.code == 200) { |
| | | this.$message({ |
| | | message: '删除成功!', |
| | | type: 'success', |
| | | |
| | | this.$confirm("此操作将永久删除所选内容, 是否继续?", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(async () => { |
| | | const data = await deleteRess({ ids: std.toString() }); |
| | | if (data.code == 200) { |
| | | this.$message({ |
| | | message: "删除成功!", |
| | | type: "success", |
| | | }); |
| | | this.getRoleTabelData(); |
| | | } else { |
| | | this.$message({ |
| | | message: "删除失败!", |
| | | type: "warning", |
| | | }); |
| | | } |
| | | }) |
| | | .catch(() => { |
| | | this.$message({ |
| | | type: "info", |
| | | message: "已取消删除", |
| | | }); |
| | | }); |
| | | this.getRoleTabelData(); |
| | | } else { |
| | | this.$message({ |
| | | message: '删除失败!', |
| | | type: 'warning', |
| | | }); |
| | | } |
| | | // const data = await deleteRess({ ids: std.toString() }); |
| | | // if (data.code == 200) { |
| | | // this.$message({ |
| | | // message: '删除成功!', |
| | | // type: 'success', |
| | | // }); |
| | | // this.getRoleTabelData(); |
| | | // } else { |
| | | // this.$message({ |
| | | // message: '删除失败!', |
| | | // type: 'warning', |
| | | // }); |
| | | // } |
| | | }, |
| | | handleSelectionChange(val) { |
| | | this.multipleSelection = val; |
| | |
| | | this.upform = {}; |
| | | this.uploadFile = null; |
| | | this.$message({ |
| | | message: '修改成功!', |
| | | type: 'success', |
| | | message: "修改成功!", |
| | | type: "success", |
| | | }); |
| | | this.getRoleTabelData(); |
| | | } else { |
| | | this.$message({ |
| | | message: '修改失败!', |
| | | type: 'warning', |
| | | message: "修改失败!", |
| | | type: "warning", |
| | | }); |
| | | } |
| | | }, |
| | |
| | | this.itemdetail.updateTime |
| | | ); |
| | | |
| | | this.itemdetail.imageFile = BASE_URL + '/res/download?guid=' + row.img + '&token=' + token; |
| | | console.log(this.itemdetail.imageFile) |
| | | this.itemdetail.imageFile = |
| | | BASE_URL + "/comprehensive/downloadForView?guid=" + row.img + "&token=" + token; |
| | | |
| | | }, |
| | | handleEdit(index, row) { |
| | | this.getDepList(); |
| | | this.getDirList(); |
| | | this.EditFormdialog = true; |
| | | this.upform = row; |
| | | this.upform.depValue = row.depName; |
| | |
| | | async insertFromData() { |
| | | if (this.insertform.dirid == null || this.insertform.depid == null) { |
| | | this.$message({ |
| | | message: '请选择资源所属的目录或单位', |
| | | type: 'warning', |
| | | message: "请选择资源所属的目录或单位", |
| | | type: "warning", |
| | | }); |
| | | return; |
| | | } |
| | |
| | | if (data.code == 200) { |
| | | this.InsertFormdialog = false; |
| | | this.insertform = { |
| | | img: '', |
| | | img: "", |
| | | }; |
| | | this.uploadFile = null; |
| | | this.$message({ |
| | | message: '添加成功!', |
| | | type: 'success', |
| | | message: "添加成功!", |
| | | type: "success", |
| | | }); |
| | | this.getRoleTabelData(); |
| | | } else { |
| | | this.$message({ |
| | | message: '添加失败!', |
| | | type: 'warning', |
| | | message: "添加失败!", |
| | | type: "warning", |
| | | }); |
| | | } |
| | | }, |
| | | async getRoleTabelData() { |
| | | if (this.listData.tab == '') { |
| | | if (this.listData.tab == "") { |
| | | delete this.listData.tab; |
| | | } |
| | | this.listData.name = this.ruleForm.name; |
| | | const data = await select_Res_ByPageAndCount(this.listData); |
| | | if (data.code != 200) { |
| | | this.$message.error('列表调用失败'); |
| | | this.$message.error("列表调用失败"); |
| | | } |
| | | this.tableData = data.result; |
| | | this.count = data.count; |
| | |
| | | if (date === undefined || date === null) { |
| | | return; |
| | | } |
| | | return moment(parseInt(date)).format('YYYY-MM-DD HH:mm:ss'); |
| | | return moment(parseInt(date)).format("YYYY-MM-DD HH:mm:ss"); |
| | | }, |
| | | handleClick(row) { |
| | | this.dialogTitle = row.name; |
| | |
| | | .power_box { |
| | | height: 98%; |
| | | width: 98%; |
| | | padding: 1%; |
| | | position: absolute; |
| | | padding: 0.5%; |
| | | |
| | | .el-input { |
| | | width: 730px; |
| | | } |
| | | /deep/.el-input__inner { |
| | | background-color: transparent !important; |
| | | border: 1px solid; |
| | | color: white; |
| | | } |
| | | /deep/.el-form-item__label { |
| | | color: white; |
| | | } |
| | | |
| | | .power_quire { |
| | | padding: 10px; |
| | | //padding: 10px; |
| | | |
| | | //margin-top: 20px; |
| | | |
| | | border-radius: 5px; |
| | | border: 1px solid rgb(202, 201, 204); |
| | | margin-bottom: 10px; |
| | | |
| | | //margin-bottom: 20px; |
| | | .el-form-item { |
| | | margin: 5px; |
| | | } |
| | |
| | | width: 467px; |
| | | } |
| | | } |
| | | .table_box { |
| | | padding: 10px; |
| | | border-radius: 5px; |
| | | border: 1px solid rgb(202, 201, 204); |
| | | |
| | | /*修改table 表体的背景颜色和文字颜色*/ |
| | | /deep/ .el-table { |
| | | background-color: transparent; |
| | | |
| | | th, |
| | | td { |
| | | background-color: transparent; |
| | | } |
| | | .el-table__expanded-cell { |
| | | background-color: transparent !important; |
| | | } |
| | | |
| | | // 表头背景色 |
| | | th.el-table__cell { |
| | | background-color: #303030; |
| | | color: #fff; |
| | | } |
| | | tr > td { |
| | | background-color: #303030; |
| | | color: #fff; |
| | | } |
| | | |
| | | // hover效果 |
| | | tr:hover > td { |
| | | background-color: rgba(255, 255, 255, 0.3) !important; |
| | | } |
| | | |
| | | tbody tr:hover { |
| | | background-color: rgba(255, 255, 255, 0.3) !important; |
| | | // text-align: center; |
| | | } |
| | | |
| | | // 滚动条宽高 |
| | | .el-table__body-wrapper::-webkit-scrollbar { |
| | | width: 5px; |
| | | height: 5px; |
| | | } |
| | | |
| | | .el-table__body-wrapper::-webkit-scrollbar { |
| | | width: 5px; |
| | | /*滚动条宽度*/ |
| | | height: 10px; |
| | | /*滚动条高度*/ |
| | | } |
| | | /*定义滚动条轨道 内阴影+圆角*/ |
| | | .el-table__body-wrapper::-webkit-scrollbar-track { |
| | | box-shadow: 0px 1px 3px #216fe6 inset; |
| | | /*滚动条的背景区域的内阴影*/ |
| | | border-radius: 10px; |
| | | } |
| | | |
| | | /*定义滑块 内阴影+圆角*/ |
| | | .el-table__body-wrapper::-webkit-scrollbar-thumb { |
| | | box-shadow: 0px 1px 3px #216fe6 inset; |
| | | border-radius: 6px; |
| | | background-color: #216fe6; |
| | | } |
| | | } |
| | | } |
| | | .pagination_box { |
| | | margin-top: 20px; |
| | | /deep/.el-input__inner { |
| | | background-color: transparent !important; |
| | | border: 1px solid; |
| | | color: white; |
| | | } |
| | | /deep/.el-pagination__total { |
| | | color: white; |
| | | } |
| | | /deep/.el-pagination__jump { |
| | | color: white; |
| | | } |
| | | /deep/.el-pager li.active { |
| | | color: #1890ff; |
| | | } |
| | | /deep/.el-pager li { |
| | | color: white; |
| | | background: transparent; |
| | | } |
| | | /deep/.el-pager li { |
| | | color: white; |
| | | } |
| | | /deep/.btn-prev { |
| | | background: transparent; |
| | | } |
| | | /deep/.btn-next { |
| | | background: transparent; |
| | | } |
| | | } |
| | | .leftTree { |
| | | position: absolute; |
| | | z-index: 10; |
| | |
| | | left: 800px; |
| | | width: 400px; |
| | | height: 600px; |
| | | background: #303030; |
| | | border: 1px solid #000; |
| | | |
| | | .treeBox { |
| | | height: 550px; |
| | | overflow: auto; |
| | | /deep/ .el-tree-node__content:hover { |
| | | background-color: rgb(153, 153, 153); |
| | | } |
| | | } |
| | | .btnBox { |
| | | width: 160px; |
| | |
| | | // background-color: red; |
| | | } |
| | | } |
| | | .infoBox { |
| | | width: 500px; |
| | | |
| | | position: absolute; |
| | | z-index: 100; |
| | | top: 25%; |
| | | right: 12%; |
| | | .el-icon-close { |
| | | color: white; |
| | | } |
| | | background-color: #303030; |
| | | .el-card { |
| | | background-color: transparent; |
| | | span { |
| | | font-size: 16px; |
| | | font-weight: 600; |
| | | color: white; |
| | | } |
| | | } |
| | | .contentBox { |
| | | margin: 0 aotu 10px; |
| | | height: 485px; |
| | | overflow: auto; |
| | | p { |
| | | // background-color: #bfa; |
| | | // margin-bottom: 10px; |
| | | color: white; |
| | | font-size: 14px; |
| | | } |
| | | .boxlabel { |
| | | margin-left: 10px; |
| | | } |
| | | } |
| | | /* 整体样式 */ |
| | | .contentBox::-webkit-scrollbar { |
| | | width: 6px; |
| | | height: 6px; |
| | | } |
| | | |
| | | /* 滚动条 */ |
| | | .contentBox::-webkit-scrollbar-thumb { |
| | | background-color: #b3d8ff; |
| | | border-radius: 6px; |
| | | } |
| | | |
| | | /* 滚动条鼠标经过样式 */ |
| | | .contentBox::-webkit-scrollbar-thumb:hover { |
| | | background-color: #b3d8ff; |
| | | border-radius: 6px; |
| | | } |
| | | |
| | | /* 滚动条轨道 */ |
| | | .contentBox::-webkit-scrollbar-track-piece { |
| | | -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2); |
| | | border-radius: 10px; |
| | | background: #ededed; |
| | | } |
| | | } |
| | | /deep/.el-form-item__label { |
| | | color: white; |
| | | } |
| | | /deep/.el-input__inner { |
| | | background-color: transparent !important; |
| | | border: 1px solid; |
| | | color: white; |
| | | } |
| | | /deep/ .el-dialog { |
| | | background: #303030; |
| | | } |
| | | /deep/.el-range-editor.is-active, |
| | | .el-range-editor.is-active:hover, |
| | | .el-select .el-input.is-focus .el-input__inner { |
| | | border: 1px solid; |
| | | } |
| | | /deep/.el-dialog__title { |
| | | color: white; |
| | | } |
| | | /deep/ .el-dialog__body { |
| | | padding: 10px 0 0 0; |
| | | } |
| | | } |
| | | </style> |
| | | <style > |
| | | .el-select-dropdown { |
| | | background: #303030; |
| | | border-color: 1px solid; |
| | | } |
| | | |
| | | .el-scrollbar__wrap { |
| | | margin-bottom: -20px !important; |
| | | margin-right: -20px !important; |
| | | } |
| | | .el-select-dropdown__item.hover, |
| | | .el-select-dropdown__item:hover { |
| | | background: rgba(255, 255, 255, 0.3); |
| | | } |
| | | .el-select-dropdown__item { |
| | | color: white !important; |
| | | } |
| | | </style> |