| | |
| | | export function select_Res_ByPageAndCount(params) { |
| | | return request.get('/res/selectByPageAndCount', { params: params }); |
| | | } |
| | | //资源列表添加 |
| | | export function insertRes(params) { |
| | | return request.post('/res/insertRes', params); |
| | | } |
| | | //资源列表修改 |
| | | export function updateRes(params) { |
| | | return request.post('/res/updateRes', params); |
| | | } |
| | | //资源列表删除 |
| | | export function deleteRess(params) { |
| | | return request.get('/res/deleteRess', { params: params }); |
| | | } |
| | | |
| | | //获取公钥用于加密 |
| | | export function getPublicKey(params) { |
| | | //请求地址 |
| | |
| | | } |
| | | |
| | | // 请求用户管理数据 |
| | | export function queryPageUser(params) { |
| | | return request.get('/user/selectByPageAndCount', { params: params }); |
| | | export function queryPageUser(pageIndex, pageSize) { |
| | | return request.get( |
| | | '/user/selectByPageAndCount?pageIndex=' + |
| | | pageIndex + |
| | | '&pageSize=' + |
| | | pageSize |
| | | ); |
| | | } |
| | |
| | | requestUser: 'requestUser', |
| | | tokenInfo: 'tokenInfo', |
| | | whiteListStatus: 'whiteListStatus', |
| | | PageView: 'PageView', |
| | | description: 'description', |
| | | creator: 'creator', |
| | | creationTime: 'creationTime', |
| | | update: 'update', |
| | | UpdateTime: 'UpdateTime', |
| | | }, |
| | | tokentool: 'Token Tool', |
| | | tokentoolObj: { |
| | | first: 'Service List', |
| | | second: 'Token management', |
| | | serviceid: 'Resource ID', |
| | | serviceName: 'Service name', |
| | | excelTemplate: 'Excel Template', |
| | | uploadExcel: 'Upload Excel', |
| | | serviceToken: 'Token generation place', |
| | | pleaseInput: 'After applying for a token, you can copy it here', |
| | | copy: 'Copy', |
| | | tokenName: 'Token Name', |
| | | tokenStatus: 'Token Status', |
| | | tokenAll: 'All', |
| | | tokeNormal: 'Normal', |
| | | tokenInvalid: 'Invalid', |
| | | tokenRenewal: 'Renewal', |
| | | serialnumber: 'Serial Number', |
| | | applysystem: 'Apply to use the system', |
| | | applicantIP: 'Applicant IP', |
| | | applicationtime: 'Application time', |
| | | applytime: 'Apply for use time (s)', |
| | | tokenstring: 'Token string', |
| | | serviceAddress: 'Service address', |
| | | porstServiceAddress: 'Post proxy service address', |
| | | sourcesystem: 'sourcesystem', |
| | | pubicnot: 'Public or not', |
| | | suffixID: 'Suffix ID', |
| | | goonlinenot: 'Go online or not', |
| | | primaryKey: 'Primary key', |
| | | applyToken: 'Apply for Token', |
| | | tokenId: 'Resource id', |
| | | tokenQuery: 'Token', |
| | | tokenStatus: 'Token Type', |
| | | whole: 'All', |
| | | normal: 'Normal', |
| | | invalid: 'Invalid', |
| | | index: 'Index', |
| | | token: 'Token', |
| | | duration: 'Usage time', |
| | | expire: 'Expiration time', |
| | | type: 'Type', |
| | | ip: 'IP address', |
| | | createUser: 'Creator ID', |
| | | createTime: 'Creation Time', |
| | | updateUser: 'Updater ID', |
| | | updateTime: 'Update Time', |
| | | operation: 'Operation', |
| | | resourcetoken: 'Resource ID of the token', |
| | | tokeninformation: 'Token information', |
| | | autorenew: 'Auto renew', |
| | | renewal: 'Renewal', |
| | | addToken: 'New Token Information', |
| | | editToken: 'Modify token information', |
| | | temporary: 'Temporary', |
| | | fixed: 'Fixed', |
| | | }, |
| | | operationLogObj: { |
| | | queryRegion: 'QueryRegion', |
| | | resourceName: 'resourceName', |
| | | operationType: 'operationType', |
| | | operatingTime: 'operatingTime', |
| | | startTime: 'start time', |
| | | endTime: 'end time', |
| | | operatingTime: 'Operating Time', |
| | | inquire: 'inquire', |
| | | empty: 'empty', |
| | | num: 'num', |
| | |
| | | optionDate: 'optionDate', |
| | | selectTime: 'selectTime', |
| | | operationModule: 'operation ndule', |
| | | operationModule1: 'Primary module', |
| | | operationModule2: 'Secondary module', |
| | | url: 'url', |
| | | className: 'class name', |
| | | category: 'category', |
| | | bak: 'bak', |
| | | check: 'check', |
| | | added: 'added', |
| | | modification: 'modification', |
| | | delete: 'delete', |
| | | uploading: 'uploading', |
| | | download: 'download', |
| | | otherOne: 'other one', |
| | | }, |
| | | }, |
| | | synthesis: { |
| | |
| | | username: 'Username', |
| | | applicationProgram: 'Application Program', |
| | | describe: 'Describe', |
| | | login: 'login', |
| | | checkout: 'checkout', |
| | | logout: 'log out', |
| | | }, |
| | | themaic: { |
| | | name: 'Themaic Map', |
| | |
| | | requestUser: '申请人', |
| | | tokenInfo: 'token信息', |
| | | whiteListStatus: '白名单状态', |
| | | PageView: '访问次数', |
| | | description: '描述', |
| | | creator: '创建人', |
| | | creationTime: '创建时间', |
| | | update: '更新人', |
| | | UpdateTime: '更新时间', |
| | | }, |
| | | tokentool: 'Token工具', |
| | | tokentoolObj: { |
| | | first: '服务列表', |
| | | second: 'Token管理', |
| | | serviceid: '资源ID', |
| | | serviceName: '服务名称', |
| | | excelTemplate: 'Excel模板', |
| | | uploadExcel: '上传Excel', |
| | | serviceToken: 'Token 生成处', |
| | | pleaseInput: '申请Token后此处可复制', |
| | | copy: '复制', |
| | | tokenName: 'Token查询', |
| | | tokenStatus: 'Token状态', |
| | | tokenAll: '全部', |
| | | tokeNormal: '正常', |
| | | tokenInvalid: '失效', |
| | | tokenRenewal: '续期', |
| | | serialnumber: '序号', |
| | | applysystem: '申请使用系统', |
| | | applicantIP: '申请者IP', |
| | | applicationtime: '申请时间', |
| | | applytime: '申请使用时间(s)', |
| | | tokenstring: 'Token串', |
| | | serviceAddress: '服务地址', |
| | | porstServiceAddress: '代理后服务地址', |
| | | sourcesystem: '来源系统', |
| | | pubicnot: '是否公开', |
| | | suffixID: '后缀ID', |
| | | goonlinenot: '是否上线', |
| | | primaryKey: '主键', |
| | | applyToken: '申请Token', |
| | | tokenId: '资源ID', |
| | | tokenQuery: 'Token ', |
| | | tokenStatus: 'Token 类型', |
| | | whole: '全部', |
| | | normal: '正常', |
| | | invalid: '失效', |
| | | index: '序号', |
| | | token: '令牌', |
| | | duration: '使用时间', |
| | | expire: '失效时间', |
| | | type: '类型', |
| | | ip: 'IP地址', |
| | | createUser: '创建人ID', |
| | | createTime: '创建时间', |
| | | updateUser: '更新人ID', |
| | | updateTime: '更新时间', |
| | | operation: '操作', |
| | | resourcetoken: 'Token所属资源ID', |
| | | tokeninformation: 'Token信息', |
| | | autorenew: '自动续约', |
| | | renewal: '续期', |
| | | addToken: '新增 Token 信息', |
| | | editToken: '修改 Token 信息', |
| | | temporary: '临时', |
| | | fixed: '固定', |
| | | }, |
| | | operationLogObj: { |
| | | queryRegion: '查询区', |
| | | resourceName: '资源名称', |
| | | operationType: '操作类型', |
| | | operatingTime: '操作时间', |
| | | startTime: '开始时间', |
| | | endTime: '结束时间', |
| | | inquire: '查询', |
| | | empty: '清空', |
| | | num: '序号', |
| | |
| | | IP: ' IP', |
| | | pleaseInput: '请输入', |
| | | pleaseSelect: '请选择', |
| | | optionDate: '选择日期', |
| | | optionDate: '选择日期和时间', |
| | | selectTime: '选择时间', |
| | | operationModule: '操作模块', |
| | | operationModule1: '一级模块', |
| | | operationModule2: '二级模块', |
| | | url: '操作网址', |
| | | className: '类名', |
| | | category: '类别', |
| | | bak: '备注', |
| | | check: '查看', |
| | | added: '新增', |
| | | modification: '修改', |
| | | delete: '删除', |
| | | uploading: '上传', |
| | | download: '下载', |
| | | otherOne: '其它', |
| | | }, |
| | | }, |
| | | synthesis: { |
| | |
| | | username: '用户名', |
| | | applicationProgram: '应用程序', |
| | | describe: '描述', |
| | | login: '登录', |
| | | checkout: '校验', |
| | | logout: '登出', |
| | | }, |
| | | themaic: { |
| | | name: '专题地图', |
| | |
| | | </el-form> |
| | | </div> |
| | | <div class="table_box"> |
| | | <el-table :data="tableData" stripe style="width: 100%" height="99%"> |
| | | <el-table :data="BTableData" stripe style="width: 100%" height="85%"> |
| | | <el-table-column |
| | | align="center" |
| | | type="index" |
| | |
| | | width="70px" |
| | | /> |
| | | <el-table-column |
| | | align="center" |
| | | prop="serviceName" |
| | | :label="$t('operatManage.BWL.serviceName')" |
| | | prop="ip" |
| | | :label="$t('operatManage.BWL.whiteListIP')" |
| | | /> |
| | | <el-table-column |
| | | align="center" |
| | | prop="accessSourceSystem" |
| | | :label="$t('operatManage.BWL.accessSourceSystem')" |
| | | prop="visit" |
| | | :label="$t('operatManage.BWL.PageView')" |
| | | /> |
| | | <el-table-column |
| | | align="center" |
| | | prop="IPRequest" |
| | | :label="$t('operatManage.BWL.IPRequest')" |
| | | prop="descr" |
| | | :label="$t('operatManage.BWL.description')" |
| | | /> |
| | | <el-table-column |
| | | align="center" |
| | | prop="servicesRequestUrl" |
| | | :label="$t('operatManage.BWL.servicesRequestUrl')" |
| | | /> |
| | | |
| | | <el-table-column |
| | | align="center" |
| | | prop="resourceIDRequest" |
| | | :label="$t('operatManage.BWL.resourceIDRequest')" |
| | | prop="createUser" |
| | | :label="$t('operatManage.BWL.creator')" |
| | | /> |
| | | <el-table-column |
| | | align="center" |
| | | prop="serviceSystemRequest" |
| | | :label="$t('operatManage.BWL.serviceSystemRequest')" |
| | | :formatter="formatData" |
| | | prop="createTime" |
| | | :label="$t('operatManage.BWL.creationTime')" |
| | | /> |
| | | <el-table-column |
| | | align="center" |
| | | prop="blackListStatus" |
| | | :label="$t('operatManage.BWL.blackListStatus')" |
| | | prop="updateUser" |
| | | :label="$t('operatManage.BWL.update')" |
| | | /> |
| | | <el-table-column |
| | | align="center" |
| | | prop="operate" |
| | | :label="$t('operatManage.BWL.operate')" |
| | | :formatter="formatData" |
| | | prop="updateTime" |
| | | :label="$t('operatManage.BWL.UpdateTime')" |
| | | /> |
| | | </el-table> |
| | | <div style="margin-top: 40px" class="pagination_box"> |
| | | <el-pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | :current-page="currentPage" |
| | | @size-change="BhandleSizeChange" |
| | | @current-change="BhandleCurrentChange" |
| | | :current-page="BListData.pageIndex" |
| | | :page-sizes="[10, 20, 30, 40]" |
| | | :page-size="10" |
| | | :page-size="BListData.pageSize" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="0" |
| | | :total="Bcount" |
| | | > |
| | | </el-pagination> |
| | | </div> |
| | |
| | | </el-form> |
| | | </div> |
| | | <div class="table_box"> |
| | | <el-table :data="tableData" stripe style="width: 100%" height="99%"> |
| | | <el-table :data="WTableData" stripe style="width: 100%" height="85%"> |
| | | <el-table-column |
| | | align="center" |
| | | type="index" |
| | |
| | | width="70px" |
| | | /> |
| | | <el-table-column |
| | | align="center" |
| | | prop="whiteListIP" |
| | | prop="ip" |
| | | :label="$t('operatManage.BWL.whiteListIP')" |
| | | /> |
| | | <el-table-column |
| | | align="center" |
| | | prop="effectiveDate" |
| | | :label="$t('operatManage.BWL.effectiveDate')" |
| | | prop="visit" |
| | | :label="$t('operatManage.BWL.PageView')" |
| | | /> |
| | | <el-table-column |
| | | align="center" |
| | | prop="requestUser" |
| | | :label="$t('operatManage.BWL.requestUser')" |
| | | prop="descr" |
| | | :label="$t('operatManage.BWL.description')" |
| | | /> |
| | | <el-table-column |
| | | align="center" |
| | | prop="tokenInfo" |
| | | :label="$t('operatManage.BWL.tokenInfo')" |
| | | prop="createUser" |
| | | :label="$t('operatManage.BWL.creator')" |
| | | /> |
| | | <el-table-column |
| | | align="center" |
| | | prop="whiteListStatus" |
| | | :label="$t('operatManage.BWL.whiteListStatus')" |
| | | :formatter="formatData" |
| | | prop="createTime" |
| | | :label="$t('operatManage.BWL.creationTime')" |
| | | /> |
| | | <el-table-column |
| | | align="center" |
| | | prop="operate" |
| | | :label="$t('operatManage.BWL.operate')" |
| | | prop="updateUser" |
| | | :label="$t('operatManage.BWL.update')" |
| | | /> |
| | | <el-table-column |
| | | :formatter="formatData" |
| | | prop="updateTime" |
| | | :label="$t('operatManage.BWL.UpdateTime')" |
| | | /> |
| | | </el-table> |
| | | <div style="margin-top: 40px" class="pagination_box"> |
| | | <el-pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | :current-page="currentPage" |
| | | @size-change="WhandleSizeChange" |
| | | @current-change="WhandleCurrentChange" |
| | | :current-page="WListData.pageIndex" |
| | | :page-sizes="[10, 20, 30, 40]" |
| | | :page-size="10" |
| | | :page-size="WListData.pageSize" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="0" |
| | | :total="Wcount" |
| | | > |
| | | </el-pagination> |
| | | </div></div |
| | |
| | | |
| | | <script> |
| | | import MyBread from "../../components/MyBread.vue"; |
| | | |
| | | import { blacklistSelectByPageAndCount } from "../../api/api"; |
| | | export default { |
| | | //import引入的组件需要注入到对象中才能使用 |
| | | components: { |
| | |
| | | unit: "", |
| | | interceptionNumber: "", |
| | | }, |
| | | tableData: [], |
| | | BTableData: [], |
| | | WTableData: [], |
| | | BListData: { |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | | type: 1, |
| | | }, |
| | | WListData: { |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | | type: 2, |
| | | }, |
| | | Wcount: 0, |
| | | Bcount: 0, |
| | | }; |
| | | }, |
| | | methods: { |
| | | //格式化时间 |
| | | add0(m) { |
| | | return m < 10 ? "0" + m : m; |
| | | }, |
| | | //格式化时间 |
| | | format(shijianchuo) { |
| | | //shijianchuo是整数,否则要parseInt转换 |
| | | var time = new Date(shijianchuo); |
| | | var y = time.getFullYear(); |
| | | var m = time.getMonth() + 1; |
| | | var d = time.getDate(); |
| | | var h = time.getHours(); |
| | | var mm = time.getMinutes(); |
| | | var s = time.getSeconds(); |
| | | return ( |
| | | y + "-" + this.add0(m) + "-" + this.add0(d) |
| | | // " " + |
| | | // this.add0(h) + |
| | | // ":" + |
| | | // this.add0(mm) + |
| | | // ":" + |
| | | // this.add0(s) |
| | | ); |
| | | }, |
| | | //格式化列表 |
| | | formatData(row, column) { |
| | | let data = row[column.property]; |
| | | if (data == null) { |
| | | return data; |
| | | } |
| | | return this.format(data); |
| | | }, |
| | | handleClick(tab, event) { |
| | | console.log(tab, event); |
| | | }, |
| | | handleSizeChange(val) { |
| | | console.log(`每页 ${val} 条`); |
| | | WhandleSizeChange(val) { |
| | | this.WListData.pageSize = val; |
| | | this.getList(); |
| | | }, |
| | | handleCurrentChange(val) { |
| | | console.log(`当前页: ${val}`); |
| | | WhandleCurrentChange(val) { |
| | | this.WListData.pageIndex = val; |
| | | this.getList(); |
| | | }, |
| | | BhandleSizeChange(val) { |
| | | this.BListData.pageSize = val; |
| | | this.getList(); |
| | | }, |
| | | BhandleCurrentChange(val) { |
| | | this.BListData.pageIndex = val; |
| | | this.getList(); |
| | | }, |
| | | onSubmit() { |
| | | console.log("submit!"); |
| | |
| | | resetForm(formName) { |
| | | this.$refs[formName].resetFields(); |
| | | }, |
| | | async WGetList() { |
| | | const data = await blacklistSelectByPageAndCount(this.WListData); |
| | | |
| | | if (data.code != 200) { |
| | | return this.$message.error("列表调用失败"); |
| | | } |
| | | this.WTableData = data.result; |
| | | this.Wcount = data.count; |
| | | }, |
| | | created() {}, |
| | | async BGetList() { |
| | | const data = await blacklistSelectByPageAndCount(this.BListData); |
| | | console.log(data); |
| | | if (data.code != 200) { |
| | | return this.$message.error("列表调用失败"); |
| | | } |
| | | this.BTableData = data.result; |
| | | this.Bcount = data.count; |
| | | }, |
| | | }, |
| | | created() { |
| | | this.BGetList(); |
| | | this.WGetList(); |
| | | }, |
| | | }; |
| | | </script> |
| | | <style lang="less" scoped> |
| | |
| | | background: #fff; |
| | | border-radius: 5px; |
| | | border: 1px solid rgb(202, 201, 204); |
| | | overflow: auto; |
| | | height: 70%; |
| | | } |
| | | .text-center { |
| | | text-align: center; |
| | | } |
| | | .el-tab-pane { |
| | | height: 82vh; |
| | | } |
| | | } |
| | | </style> |
| | | |
| | |
| | | ></My-bread> |
| | | <el-divider /> |
| | | <div class="inquire"> |
| | | <el-form ref="ruleForm" :model="form" :inline="true"> |
| | | <el-form-item :label="$t('operatManage.ELM.username')" prop="username"> |
| | | <el-form ref="formData2" :model="form" :inline="true"> |
| | | <el-form-item |
| | | :label="$t('operatManage.operationLogObj.username')" |
| | | prop="uname" |
| | | > |
| | | <el-input |
| | | v-model="form.username" |
| | | :placeholder="$t('operatManage.ELM.usernameInfo')" |
| | | v-model="form.uname" |
| | | :placeholder="$t('operatManage.operationLogObj.pleaseInput')" |
| | | /> |
| | | </el-form-item> |
| | | |
| | | <el-form-item |
| | | :label="$t('operatManage.ELM.ownedSystem')" |
| | | prop="ownedSystem" |
| | | :label="$t('operatManage.operationLogObj.operationType')" |
| | | prop="type" |
| | | > |
| | | <el-select |
| | | v-model="form.ownedSystem" |
| | | :placeholder="$t('operatManage.ELM.please')" |
| | | clearable |
| | | v-model="form.type" |
| | | :placeholder="$t('operatManage.operationLogObj.pleaseSelect')" |
| | | > |
| | | <el-option :label="$t('operatManage.ELM.all')" value="all" /> |
| | | <el-option :label="$t('operatManage.ELM.one')" value="one" /> |
| | | <el-option |
| | | :label="$t('operatManage.operationLogObj.check')" |
| | | value="1" |
| | | /> |
| | | <el-option |
| | | :label="$t('operatManage.operationLogObj.added')" |
| | | value="2" |
| | | /> |
| | | <el-option |
| | | :label="$t('operatManage.operationLogObj.modification')" |
| | | value="3" |
| | | /> |
| | | <el-option |
| | | :label="$t('operatManage.operationLogObj.delete')" |
| | | value="4" |
| | | /> |
| | | <el-option |
| | | :label="$t('operatManage.operationLogObj.uploading')" |
| | | value="5" |
| | | /> |
| | | <el-option |
| | | :label="$t('operatManage.operationLogObj.download')" |
| | | value="6" |
| | | /> |
| | | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('operatManage.ELM.operationType')" |
| | | prop="operationType" |
| | | prop="start" |
| | | :label="$t('operatManage.operationLogObj.startTime')" |
| | | > |
| | | <el-select |
| | | v-model="form.operationType" |
| | | :placeholder="$t('operatManage.ELM.please')" |
| | | > |
| | | <el-option :label="$t('operatManage.ELM.all')" value="all" /> |
| | | <el-option :label="$t('operatManage.ELM.add')" value="add" /> |
| | | <el-option :label="$t('operatManage.ELM.delete')" value="delete" /> |
| | | <el-option :label="$t('operatManage.ELM.edit')" value="edit" /> |
| | | <el-option :label="$t('operatManage.ELM.query')" value="query" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item :label="$t('operatManage.ELM.date')" prop="date"> |
| | | <el-date-picker |
| | | v-model="form.date" |
| | | type="daterange" |
| | | align="right" |
| | | unlink-panels |
| | | :range-separator="$t('operatManage.ELM.to')" |
| | | :start-placeholder="$t('operatManage.ELM.startDate')" |
| | | :end-placeholder="$t('operatManage.ELM.endDate')" |
| | | format="yyyy-MM-dd HH:mm:ss" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | v-model="form.start" |
| | | style="width: 100%" |
| | | type="datetime" |
| | | :placeholder="$t('operatManage.operationLogObj.optionDate')" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item :label="$t('operatManage.ELM.ip')" prop="requestIp"> |
| | | <el-input v-model="form.requestIp" placeholder="请输入" /> |
| | | <el-form-item |
| | | prop="end" |
| | | :label="$t('operatManage.operationLogObj.endTime')" |
| | | > |
| | | <el-date-picker |
| | | format="yyyy-MM-dd HH:mm:ss" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | v-model="form.end" |
| | | style="width: 100%" |
| | | type="datetime" |
| | | :placeholder="$t('operatManage.operationLogObj.optionDate')" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button @click="onSubmit" |
| | | ><i class="el-icon-search"></i> {{ |
| | | $t("operatManage.ELM.search") |
| | | }}</el-button |
| | | > |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button @click="resetForm('ruleForm')" |
| | | ><i class="el-icon-delete"></i> {{ |
| | | $t("operatManage.ELM.reset") |
| | | }}</el-button |
| | | > |
| | | <el-button @click="onSubmit" icon="el-icon-search">{{ |
| | | $t("operatManage.operationLogObj.inquire") |
| | | }}</el-button> |
| | | <el-button @click="onEmpty('formData2')" icon="el-icon-delete">{{ |
| | | $t("operatManage.operationLogObj.empty") |
| | | }}</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div class="table_box"> |
| | | <el-table :data="tableData" stripe style="width: 100%" height="99%"> |
| | | <el-table :data="tableData" stripe style="width: 100%" height="85%"> |
| | | <el-table-column |
| | | align="center" |
| | | type="index" |
| | |
| | | /> |
| | | <el-table-column |
| | | align="center" |
| | | prop="userid" |
| | | prop="uname" |
| | | :label="$t('operatManage.ELM.username')" |
| | | /> |
| | | <el-table-column |
| | |
| | | data() { |
| | | return { |
| | | currentPage: 1, |
| | | form: { |
| | | username: "", |
| | | ownedSystem: "", |
| | | requestIp: "", |
| | | operationType: "", |
| | | date: "", |
| | | }, |
| | | form: {}, |
| | | tableData: [], |
| | | listData: { |
| | | pageIndex: 1, |
| | |
| | | this.getList(); |
| | | }, |
| | | onSubmit() { |
| | | console.log("submit!"); |
| | | this.listData = { ...this.listData, ...this.form }; |
| | | // console.log(this.listData) |
| | | this.getList(); |
| | | }, |
| | | onEmpty(formData1) { |
| | | this.$refs[formData1].resetFields(); //重置表单数据 |
| | | // this.form = {} |
| | | this.form.start = null; |
| | | this.form.end = null; |
| | | }, |
| | | resetForm(formName) { |
| | | this.$refs[formName].resetFields(); |
| | |
| | | } |
| | | } |
| | | .table_box { |
| | | height: 65%; |
| | | overflow: auto; |
| | | height: 70%; |
| | | padding: 10px; |
| | | background: #fff; |
| | | border-radius: 5px; |
| | |
| | | {{ $t("operatManage.operationLogObj.queryRegion") }} |
| | | </div> |
| | | <el-form ref="formData1" :model="form" :inline="true"> |
| | | <!-- 用户名 --> |
| | | <el-form-item :label="$t('common.username')" prop="name"> |
| | | <el-form-item |
| | | :label="$t('operatManage.operationLogObj.username')" |
| | | prop="uname" |
| | | > |
| | | <el-input |
| | | style="width: 300px" |
| | | v-model="form.name" |
| | | :placeholder="$t('common.pleaseInput')" |
| | | v-model="form.uname" |
| | | :placeholder="$t('operatManage.operationLogObj.pleaseInput')" |
| | | /> |
| | | </el-form-item> |
| | | <!-- 所属系统 --> |
| | | <el-form-item :label="$t('loglog.systematic')" prop="region"> |
| | | <el-select v-model="form.region" :placeholder="$t('common.choose')"> |
| | | <el-option label="Zone one" value="shanghai" /> |
| | | <el-option label="Zone two" value="beijing" /> |
| | | |
| | | <el-form-item |
| | | :label="$t('operatManage.operationLogObj.operationType')" |
| | | prop="type" |
| | | > |
| | | <el-select |
| | | clearable |
| | | v-model="form.type" |
| | | :placeholder="$t('operatManage.operationLogObj.pleaseSelect')" |
| | | > |
| | | <el-option |
| | | :label="$t('loglog.login')" |
| | | value="1" |
| | | /> |
| | | <el-option |
| | | :label="$t('loglog.checkout')" |
| | | value="2" |
| | | /> |
| | | <el-option |
| | | :label="$t('loglog.logout')" |
| | | value="3" |
| | | /> |
| | | |
| | | </el-select> |
| | | </el-form-item> |
| | | <!-- 操作时间 --> |
| | | <el-form-item :label="$t('loglog.operationtime')"> |
| | | <el-col :span="11"> |
| | | <el-form-item |
| | | prop="start" |
| | | :label="$t('operatManage.operationLogObj.startTime')" |
| | | > |
| | | <el-date-picker |
| | | type="date" |
| | | :placeholder="$t('common.selectdate')" |
| | | v-model="form.date1" |
| | | format="yyyy-MM-dd HH:mm:ss" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | v-model="form.start" |
| | | style="width: 100%" |
| | | ></el-date-picker> |
| | | </el-col> |
| | | <el-col class="line text-center" :span="2">-</el-col> |
| | | <el-col :span="11"> |
| | | <el-date-picker |
| | | type="date" |
| | | :placeholder="$t('common.selectdate')" |
| | | v-model="form.date2" |
| | | style="width: 100%" |
| | | ></el-date-picker> |
| | | </el-col> |
| | | type="datetime" |
| | | :placeholder="$t('operatManage.operationLogObj.optionDate')" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <!-- 查询 清空 --> |
| | | <el-form-item |
| | | prop="end" |
| | | :label="$t('operatManage.operationLogObj.endTime')" |
| | | > |
| | | <el-date-picker |
| | | format="yyyy-MM-dd HH:mm:ss" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | v-model="form.end" |
| | | style="width: 100%" |
| | | type="datetime" |
| | | :placeholder="$t('operatManage.operationLogObj.optionDate')" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button @click="onSubmit">{{ $t("common.iquery") }}</el-button> |
| | | <el-button @click="onEmpty('formData1')">{{ |
| | | $t("common.empty") |
| | | <el-button @click="onSubmit" icon="el-icon-search">{{ |
| | | $t("operatManage.operationLogObj.inquire") |
| | | }}</el-button> |
| | | <el-button @click="onEmpty('formData1')" icon="el-icon-delete">{{ |
| | | $t("operatManage.operationLogObj.empty") |
| | | }}</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <!-- 表格显示 --> |
| | | <div class="table_box"> |
| | | <el-table :data="tableData" stripe style="width: 100%"> |
| | | <el-table :data="tableData" stripe style="width: 100%" height="85%"> |
| | | <el-table-column |
| | | width="150" |
| | | type="index" |
| | | :label="$t('loglog.serialnumber')" |
| | | /> |
| | | <el-table-column prop="userid" :label="$t('loglog.username')" /> |
| | | <el-table-column prop="uname" :label="$t('loglog.username')" /> |
| | | <el-table-column |
| | | prop="appid" |
| | | :label="$t('loglog.applicationProgram')" |
| | |
| | | return { |
| | | currentPage4: 1, |
| | | form: { |
| | | name: "", |
| | | region: "", |
| | | jurisdiction: "", |
| | | |
| | | }, |
| | | tableData: [], |
| | | listData: { |
| | |
| | | this.getList(); |
| | | }, |
| | | onSubmit() { |
| | | console.log("submit!"); |
| | | this.listData = { ...this.listData, ...this.form }; |
| | | // console.log(this.listData) |
| | | this.getList(); |
| | | }, |
| | | onEmpty(formData1) { |
| | | this.$refs[formData1].resetFields(); //重置表单数据 |
| | | // this.form = {}; |
| | | this.form.start =null |
| | | this.form.end =null |
| | | }, |
| | | async getList() { |
| | | const data = await loginSelectByPageAndCount(this.listData); |
| | |
| | | background: #fff; |
| | | border-radius: 5px; |
| | | border: 1px solid rgb(202, 201, 204); |
| | | overflow: auto; |
| | | height: 70%; |
| | | } |
| | | .text-center { |
| | | text-align: center; |
| | |
| | | <div class="herder_box"> |
| | | {{ $t("operatManage.operationLogObj.queryRegion") }} |
| | | </div> |
| | | <el-form ref="formData1" :model="form" :inline="true"> |
| | | <el-form ref="formData3" :model="form" :inline="true"> |
| | | <el-form-item |
| | | :label="$t('operatManage.operationLogObj.resourceName')" |
| | | prop="name" |
| | | :label="$t('operatManage.operationLogObj.username')" |
| | | prop="uname" |
| | | > |
| | | <el-input |
| | | v-model="form.name" |
| | | v-model="form.uname" |
| | | :placeholder="$t('operatManage.operationLogObj.pleaseInput')" |
| | | /> |
| | | </el-form-item> |
| | | |
| | | <el-form-item |
| | | :label="$t('operatManage.operationLogObj.operationType')" |
| | | prop="region" |
| | | prop="type" |
| | | > |
| | | <el-select |
| | | v-model="form.region" |
| | | clearable |
| | | v-model="form.type" |
| | | :placeholder="$t('operatManage.operationLogObj.pleaseSelect')" |
| | | > |
| | | <el-option label="全部" value="shanghai" /> |
| | | <el-option label="浏览" value="beijing" /> |
| | | <el-option label="下载" value="shanghai" /> |
| | | <el-option label="调用" value="beijing" /> |
| | | <el-option label="收藏" value="shanghai" /> |
| | | <el-option |
| | | :label="$t('operatManage.operationLogObj.check')" |
| | | value="1" |
| | | /> |
| | | <el-option |
| | | :label="$t('operatManage.operationLogObj.added')" |
| | | value="2" |
| | | /> |
| | | <el-option |
| | | :label="$t('operatManage.operationLogObj.modification')" |
| | | value="3" |
| | | /> |
| | | <el-option |
| | | :label="$t('operatManage.operationLogObj.delete')" |
| | | value="4" |
| | | /> |
| | | <el-option |
| | | :label="$t('operatManage.operationLogObj.uploading')" |
| | | value="5" |
| | | /> |
| | | <el-option |
| | | :label="$t('operatManage.operationLogObj.download')" |
| | | value="6" |
| | | /> |
| | | <el-option |
| | | :label="$t('operatManage.operationLogObj.otherOne')" |
| | | value="0" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item :label="$t('operatManage.operationLogObj.operatingTime')"> |
| | | <el-col :span="11"> |
| | | <el-form-item |
| | | prop="start" |
| | | :label="$t('operatManage.operationLogObj.startTime')" |
| | | > |
| | | <el-date-picker |
| | | type="date" |
| | | format="yyyy-MM-dd HH:mm:ss" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | v-model="form.start" |
| | | style="width: 100%" |
| | | type="datetime" |
| | | :placeholder="$t('operatManage.operationLogObj.optionDate')" |
| | | v-model="form.date1" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item |
| | | prop="end" |
| | | :label="$t('operatManage.operationLogObj.endTime')" |
| | | > |
| | | <el-date-picker |
| | | format="yyyy-MM-dd HH:mm:ss" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | v-model="form.end" |
| | | style="width: 100%" |
| | | ></el-date-picker> |
| | | </el-col> |
| | | <el-col class="line text-center" :span="2">-</el-col> |
| | | <el-col :span="11"> |
| | | <el-time-picker |
| | | :placeholder="$t('operatManage.operationLogObj.selectTime')" |
| | | v-model="form.date2" |
| | | style="width: 100%" |
| | | ></el-time-picker> |
| | | </el-col> |
| | | type="datetime" |
| | | :placeholder="$t('operatManage.operationLogObj.optionDate')" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button @click="onSubmit" icon="el-icon-search">{{ |
| | | $t("operatManage.operationLogObj.inquire") |
| | | }}</el-button> |
| | | <el-button icon="el-icon-delete">{{ |
| | | <el-button @click="onEmpty('formData3')" icon="el-icon-delete">{{ |
| | | $t("operatManage.operationLogObj.empty") |
| | | }}</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div class="table_box"> |
| | | <el-table :data="tableData" stripe style="width: 100%"> |
| | | <el-table :data="tableData" stripe style="width: 100%" height="85%"> |
| | | <!-- <el-table-column type="selection" width="55" /> --> |
| | | <el-table-column |
| | | :label="$t('operatManage.operationLogObj.num')" |
| | |
| | | </el-table-column> |
| | | <!-- <el-table-column prop="Accessnumber" label="访问编号" /> --> |
| | | <el-table-column |
| | | align="center" |
| | | prop="modular" |
| | | :label="$t('operatManage.operationLogObj.operationModule')" |
| | | prop="modular1" |
| | | :label="$t('operatManage.operationLogObj.operationModule1')" |
| | | /> |
| | | <el-table-column |
| | | align="center" |
| | | prop="modular2" |
| | | :label="$t('operatManage.operationLogObj.operationModule2')" |
| | | /> |
| | | <el-table-column |
| | | prop="url" |
| | | :label="$t('operatManage.operationLogObj.url')" |
| | | /> |
| | | |
| | | <!-- <el-table-column prop="loginaddress" label="登录地点" /> --> |
| | | <el-table-column |
| | | align="center" |
| | | prop="clazz" |
| | | :label="$t('operatManage.operationLogObj.className')" |
| | | /> |
| | | <el-table-column |
| | | align="center" |
| | | :formatter="formatType" |
| | | prop="type" |
| | | :label="$t('operatManage.operationLogObj.operationType')" |
| | | /> |
| | | <el-table-column |
| | | align="center" |
| | | prop="userid" |
| | | prop="uname" |
| | | :label="$t('operatManage.operationLogObj.username')" |
| | | /> |
| | | <el-table-column |
| | |
| | | /> |
| | | |
| | | <el-table-column |
| | | align="center" |
| | | prop="optime" |
| | | :formatter="formatData" |
| | | :label="$t('operatManage.operationLogObj.operatingTime')" |
| | | /> |
| | | <el-table-column |
| | | align="center" |
| | | prop="bak" |
| | | :label="$t('operatManage.operationLogObj.bak')" |
| | | /> |
| | |
| | | data() { |
| | | return { |
| | | currentPage4: 1, |
| | | form: { |
| | | name: "", |
| | | region: "", |
| | | jurisdiction: "", |
| | | }, |
| | | form: {}, |
| | | tableData: [], |
| | | listData: { |
| | | pageIndex: 1, |
| | |
| | | this.listData.pageIndex = val; |
| | | this.getList(); |
| | | }, |
| | | onEmpty(formData1) { |
| | | this.$refs[formData1].resetFields(); //重置表单数据 |
| | | // this.form = {} |
| | | this.form.start =null |
| | | this.form.end =null |
| | | }, |
| | | onSubmit() { |
| | | console.log("submit!"); |
| | | this.listData = { ...this.listData, ...this.form }; |
| | | // console.log(this.listData) |
| | | this.getList(); |
| | | }, |
| | | async getList() { |
| | | const data = await operateSelectByPageAndCount(this.listData); |
| | | console.log(data); |
| | | |
| | | if (data.code != 200) { |
| | | return this.$message.error("列表调用失败"); |
| | | } |
| | |
| | | height: 100%; |
| | | padding: 10px; |
| | | box-sizing: border-box; |
| | | |
| | | .inquire { |
| | | padding: 10px; |
| | | margin-top: 20px; |
| | |
| | | background: #fff; |
| | | border-radius: 5px; |
| | | border: 1px solid rgb(202, 201, 204); |
| | | overflow: auto; |
| | | height: 70%; |
| | | } |
| | | .text-center { |
| | | text-align: center; |
| | |
| | | ></My-bread> |
| | | <el-divider /> |
| | | <div class="inquire"> |
| | | <el-tabs v-model="activeName" @tab-click="handleClick"> |
| | | <el-tab-pane |
| | | :label="$t('operatManage.tokentoolObj.first')" |
| | | name="first" |
| | | > |
| | | <div class="herder_box"> |
| | | {{ $t("operatManage.operationLogObj.queryRegion") }} |
| | | {{ $t('operatManage.operationLogObj.queryRegion') }} |
| | | </div> |
| | | <el-form ref="formData1" :model="serviceform" :inline="true"> |
| | | <el-form ref="formData" :model="ruleForm" :inline="true"> |
| | | <el-form-item |
| | | :label="$t('operatManage.tokentoolObj.serviceid')" |
| | | prop="name" |
| | | > |
| | | <el-input |
| | | style="width: 200px" |
| | | v-model="serviceform.serviceId" |
| | | :placeholder="$t('common.pleaseInput')" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('operatManage.tokentoolObj.serviceName')" |
| | | :label="$t('operatManage.tokentoolObj.tokenQuery')" |
| | | prop="region" |
| | | > |
| | | <el-input |
| | | style="width: 200px" |
| | | v-model="serviceform.serviceId" |
| | | :placeholder="$t('common.pleaseInput')" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button size="small" @click="onSubmit">{{ |
| | | $t("operatManage.tokentoolObj.excelTemplate") |
| | | }}</el-button> |
| | | <el-button size="small" @click="onSubmit">{{ |
| | | $t("operatManage.tokentoolObj.uploadExcel") |
| | | }}</el-button> |
| | | </el-form-item> |
| | | <br /> |
| | | <el-form-item |
| | | :label="$t('operatManage.tokentoolObj.serviceToken')" |
| | | prop="region" |
| | | > |
| | | <el-input |
| | | style="width: 200px" |
| | | v-model="serviceform.serviceToken" |
| | | :disabled="true" |
| | | :title="$t('operatManage.tokentoolObj.pleaseInput')" |
| | | :placeholder="$t('operatManage.tokentoolObj.pleaseInput')" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button |
| | | icon="el-icon-document-copy" |
| | | size="small" |
| | | @click="oncopy" |
| | | >{{ $t("operatManage.tokentoolObj.copy") }}</el-button |
| | | > |
| | | </el-form-item> |
| | | <!-- 查询 清空 --> |
| | | <el-form-item> |
| | | <el-button icon="el-icon-search" @click="onSubmit">{{ |
| | | $t("common.iquery") |
| | | }}</el-button> |
| | | <el-button icon="el-icon-delete" @click="onEmpty('formData1')">{{ |
| | | $t("common.empty") |
| | | }}</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-table :data="tableData" stripe style="width: 100%"> |
| | | <el-table-column |
| | | width="120" |
| | | type="index" |
| | | :label="$t('operatManage.tokentoolObj.serialnumber')" |
| | | /> |
| | | <el-table-column |
| | | prop="creationtime" |
| | | :label="$t('operatManage.tokentoolObj.serviceName')" |
| | | /> |
| | | <el-table-column |
| | | prop="creationtime" |
| | | :label="$t('operatManage.tokentoolObj.serviceAddress')" |
| | | /> |
| | | <el-table-column |
| | | prop="creationtime" |
| | | :label="$t('operatManage.tokentoolObj.porstServiceAddress')" |
| | | /> |
| | | <el-table-column |
| | | prop="creationtime" |
| | | :label="$t('operatManage.tokentoolObj.serviceid')" |
| | | /> |
| | | <el-table-column |
| | | prop="creationtime" |
| | | :label="$t('operatManage.tokentoolObj.sourcesystem')" |
| | | /> |
| | | <el-table-column |
| | | prop="creationtime" |
| | | :label="$t('operatManage.tokentoolObj.pubicnot')" |
| | | /> |
| | | <el-table-column |
| | | prop="creationtime" |
| | | :label="$t('operatManage.tokentoolObj.suffixID')" |
| | | /> |
| | | <el-table-column |
| | | prop="creationtime" |
| | | :label="$t('operatManage.tokentoolObj.goonlinenot')" |
| | | /> |
| | | <el-table-column |
| | | prop="creationtime" |
| | | :label="$t('operatManage.tokentoolObj.primaryKey')" |
| | | /> |
| | | <el-table-column |
| | | fixed="right" |
| | | :label="$t('operatManage.tokentoolObj.operation')" |
| | | width="300" |
| | | > |
| | | <template #default> |
| | | <!-- <el-button type="primary" size="small">修改</el-button> --> |
| | | |
| | | <el-button type="danger" size="small">{{ |
| | | $t("common.delete") |
| | | }}</el-button> |
| | | <el-button type="warning" size="small">{{ |
| | | $t("common.update") |
| | | }}</el-button> |
| | | <el-button type="primary" size="small">{{ |
| | | $t("operatManage.tokentoolObj.applyToken") |
| | | }}</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-tab-pane> |
| | | <el-tab-pane |
| | | :label="$t('operatManage.tokentoolObj.second')" |
| | | name="second" |
| | | > |
| | | <div class="herder_box"> |
| | | {{ $t("operatManage.operationLogObj.queryRegion") }} |
| | | </div> |
| | | |
| | | <el-form ref="formData1" :model="tokenform" :inline="true"> |
| | | <el-form-item |
| | | :label="$t('operatManage.tokentoolObj.serviceid')" |
| | | prop="name" |
| | | > |
| | | <el-input |
| | | style="width: 200px" |
| | | v-model="tokenform.tokenId" |
| | | :placeholder="$t('common.pleaseInput')" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('operatManage.tokentoolObj.tokenName')" |
| | | prop="region" |
| | | > |
| | | <el-input |
| | | style="width: 200px" |
| | | v-model="tokenform.tokenName" |
| | | v-model="ruleForm.name" |
| | | :placeholder="$t('common.pleaseInput')" |
| | | /> |
| | | </el-form-item> |
| | | |
| | | <el-form-item |
| | | :label="$t('operatManage.tokentoolObj.tokenStatus')" |
| | | prop="region" |
| | | > |
| | | <el-form-item :label="$t('operatManage.tokentoolObj.tokenStatus')"> |
| | | <el-select |
| | | v-model="tokenform.region" |
| | | v-model="ruleForm.value" |
| | | :placeholder="$t('common.choose')" |
| | | > |
| | | <el-option |
| | | :label="$t('operatManage.tokentoolObj.tokenAll')" |
| | | value="0" |
| | | :label="$t('operatManage.tokentoolObj.temporary')" |
| | | ></el-option> |
| | | <el-option |
| | | value="1" |
| | | /> |
| | | <el-option |
| | | :label="$t('operatManage.tokentoolObj.tokeNormal')" |
| | | value="2" |
| | | /> |
| | | <el-option |
| | | :label="$t('operatManage.tokentoolObj.tokenInvalid')" |
| | | value="3" |
| | | /> |
| | | :label="$t('operatManage.tokentoolObj.fixed')" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <!-- 查询 清空 --> |
| | | <el-form-item> |
| | | <el-button icon="el-icon-search" @click="onSubmit">{{ |
| | | $t("common.iquery") |
| | | $t('common.iquery') |
| | | }}</el-button> |
| | | <el-button icon="el-icon-delete" @click="onEmpty('formData1')">{{ |
| | | $t("common.empty") |
| | | $t('common.empty') |
| | | }}</el-button> |
| | | <el-button @click="InsertFormdialog = true" icon="el-icon-edit">{{ |
| | | $t('common.append') |
| | | }}</el-button> |
| | | <el-button @click="delTokenData" icon="el-icon-delete">{{ |
| | | $t('common.delete') |
| | | }}</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-table :data="tableData1" stripe style="width: 100%"> |
| | | <el-table-column |
| | | width="120" |
| | | type="index" |
| | | :label="$t('operatManage.tokentoolObj.serialnumber')" |
| | | /> |
| | | <el-table-column |
| | | prop="creationtime" |
| | | :label="$t('operatManage.tokentoolObj.serviceName')" |
| | | /> |
| | | <el-table-column |
| | | prop="creationtime" |
| | | :label="$t('operatManage.tokentoolObj.applysystem')" |
| | | /> |
| | | <el-table-column |
| | | prop="creationtime" |
| | | :label="$t('operatManage.tokentoolObj.applicantIP')" |
| | | /> |
| | | <el-table-column |
| | | prop="creationtime" |
| | | :label="$t('operatManage.tokentoolObj.applicationtime')" |
| | | /> |
| | | <el-table-column |
| | | prop="creationtime" |
| | | :label="$t('operatManage.tokentoolObj.applytime')" |
| | | /> |
| | | <el-table-column |
| | | prop="creationtime" |
| | | :label="$t('operatManage.tokentoolObj.tokenstring')" |
| | | /> |
| | | <el-table-column |
| | | prop="creationtime" |
| | | :label="$t('operatManage.tokentoolObj.resourcetoken')" |
| | | /> |
| | | <el-table-column |
| | | prop="creationtime" |
| | | :label="$t('operatManage.tokentoolObj.tokeninformation')" |
| | | /> |
| | | <el-table-column |
| | | prop="creationtime" |
| | | :label="$t('operatManage.tokentoolObj.tokenStatus')" |
| | | /> |
| | | <el-table-column |
| | | fixed="right" |
| | | :label="$t('operatManage.tokentoolObj.autorenew')" |
| | | </div> |
| | | <div class="table_box"> |
| | | <el-table |
| | | :data="tableData" |
| | | height="99%" |
| | | style="width: 100%" |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column type="selection" width="55" /> |
| | | <el-table-column |
| | | width="70" |
| | | align="center" |
| | | type="index" |
| | | :label="$t('operatManage.tokentoolObj.index')" |
| | | /> |
| | | <el-table-column |
| | | prop="token" |
| | | align="center" |
| | | :label="$t('operatManage.tokentoolObj.token')" |
| | | /> |
| | | <el-table-column |
| | | prop="duration" |
| | | align="center" |
| | | :label="$t('operatManage.tokentoolObj.duration')" |
| | | /> |
| | | <el-table-column |
| | | prop="expire" |
| | | align="center" |
| | | :label="$t('operatManage.tokentoolObj.expire')" |
| | | :formatter="formatTime" |
| | | /> |
| | | <el-table-column |
| | | prop="type" |
| | | align="center" |
| | | :label="$t('operatManage.tokentoolObj.type')" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <span v-if="scope.row.type === 0">临时</span> |
| | | <span v-if="scope.row.type === 1">固定</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="ip" |
| | | align="center" |
| | | :label="$t('operatManage.tokentoolObj.ip')" |
| | | /> |
| | | <el-table-column |
| | | prop="createUser" |
| | | align="center" |
| | | :label="$t('operatManage.tokentoolObj.createUser')" |
| | | /> |
| | | <el-table-column |
| | | prop="createTime" |
| | | align="center" |
| | | :label="$t('operatManage.tokentoolObj.createTime')" |
| | | :formatter="formatTime" |
| | | /> |
| | | <el-table-column |
| | | prop="updateUser" |
| | | align="center" |
| | | :label="$t('operatManage.tokentoolObj.updateUser')" |
| | | /> |
| | | <el-table-column |
| | | prop="updateTime" |
| | | align="center" |
| | | :label="$t('operatManage.tokentoolObj.updateTime')" |
| | | :formatter="formatTime" |
| | | /> |
| | | <el-table-column |
| | | fixed="right" |
| | | :label="$t('operatManage.tokentoolObj.operation')" |
| | | width="200" |
| | | width="320" |
| | | align="center" |
| | | > |
| | | <template #default> |
| | | <template slot-scope="scope"> |
| | | <el-button type="danger" size="small">{{ |
| | | $t("operatManage.tokentoolObj.tokenInvalid") |
| | | $t('operatManage.tokentoolObj.invalid') |
| | | }}</el-button> |
| | | <el-button type="warning" size="small">{{ |
| | | $t("operatManage.tokentoolObj.tokenRenewal") |
| | | $t('operatManage.tokentoolObj.renewal') |
| | | }}</el-button> |
| | | <el-button |
| | | @click="handleEdit(scope.$index, scope.row)" |
| | | type="warning" |
| | | plain |
| | | size="small" |
| | | >{{ $t('common.update') }}</el-button |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | <div style="margin-top: 40px" class="pagination_box"> |
| | | </div> |
| | | <div class="pagination_box"> |
| | | <el-pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | :current-page="currentPage4" |
| | | :current-page="listData.pageIndex" |
| | | :page-sizes="[10, 20, 30, 40]" |
| | | :page-size="10" |
| | | :page-size="listData.pageSize" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="9" |
| | | :total="count" |
| | | > |
| | | </el-pagination> |
| | | </div> |
| | | <!-- 新增弹窗 --> |
| | | <el-dialog |
| | | :title="$t('operatManage.tokentoolObj.addToken')" |
| | | style="overflow: hidden" |
| | | :visible.sync="InsertFormdialog" |
| | | > |
| | | <el-form ref="formData1" :model="insertform"> |
| | | <el-form-item |
| | | :label="$t('operatManage.tokentoolObj.token')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="insertform.token" |
| | | :placeholder="$t('common.pleaseInput')" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('operatManage.tokentoolObj.duration')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="insertform.duration" |
| | | :placeholder="$t('common.pleaseInput')" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('operatManage.tokentoolObj.type')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-select |
| | | v-model="insertform.type" |
| | | :placeholder="$t('common.choose')" |
| | | > |
| | | <el-option |
| | | value="0" |
| | | :label="$t('operatManage.tokentoolObj.temporary')" |
| | | ></el-option> |
| | | <el-option |
| | | value="1" |
| | | :label="$t('operatManage.tokentoolObj.fixed')" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('operatManage.tokentoolObj.ip')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="insertform.ip" |
| | | :placeholder="$t('common.pleaseInput')" |
| | | /> |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="insertFromDataClose">{{ |
| | | $t('common.close') |
| | | }}</el-button> |
| | | <el-button type="primary" @click="insertFromData">{{ |
| | | $t('common.confirm') |
| | | }}</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | <!-- 修改弹窗 --> |
| | | <el-dialog |
| | | :title="$t('operatManage.tokentoolObj.editToken')" |
| | | style="overflow: hidden" |
| | | :visible.sync="EditFormdialog" |
| | | > |
| | | <el-form ref="formData1" :model="insertform"> |
| | | <el-form-item |
| | | :label="$t('operatManage.tokentoolObj.token')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="upform.token" |
| | | :placeholder="$t('common.pleaseInput')" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('operatManage.tokentoolObj.duration')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="upform.duration" |
| | | :placeholder="$t('common.pleaseInput')" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('operatManage.tokentoolObj.type')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-select |
| | | v-model="upform.edit" |
| | | @change="changeGame" |
| | | :placeholder="$t('common.choose')" |
| | | > |
| | | <el-option |
| | | value="0" |
| | | :label="$t('operatManage.tokentoolObj.temporary')" |
| | | ></el-option> |
| | | <el-option |
| | | value="1" |
| | | :label="$t('operatManage.tokentoolObj.fixed')" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('operatManage.tokentoolObj.ip')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="upform.ip" |
| | | :placeholder="$t('common.pleaseInput')" |
| | | /> |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="editFromDataClose">{{ |
| | | $t('common.close') |
| | | }}</el-button> |
| | | <el-button type="primary" @click="editFromData">{{ |
| | | $t('common.confirm') |
| | | }}</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import MyBread from "../../components/MyBread.vue"; |
| | | |
| | | import moment from 'moment'; |
| | | import MyBread from '../../components/MyBread.vue'; |
| | | import { |
| | | select_Token_ByPageAndCount, |
| | | insertToken, |
| | | updateToken, |
| | | deleteTokens, |
| | | } from '../../api/api.js'; |
| | | export default { |
| | | //import引入的组件需要注入到对象中才能使用 |
| | | components: { |
| | |
| | | |
| | | data() { |
| | | return { |
| | | currentPage4: 1, |
| | | activeName: 'first', |
| | | serviceform: { |
| | | serviceId: "", |
| | | serviceName: "", |
| | | serviceToken: "", |
| | | formLabelWidth: '130px', |
| | | InsertFormdialog: false, |
| | | EditFormdialog: false, |
| | | upform: {}, |
| | | ruleForm: {}, |
| | | insertform: {}, |
| | | tableData: [], |
| | | multipleSelection: [], |
| | | count: 0, |
| | | listData: { |
| | | name: null, |
| | | type: null, |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | | }, |
| | | tokenform: { |
| | | tokenId: "", |
| | | tokenName: "", |
| | | tokenStatus: "" |
| | | }, |
| | | tableData: [{}], |
| | | tableData1: [{}] |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getRoleTabelData(); |
| | | }, |
| | | methods: { |
| | | handleSizeChange(val) { |
| | | console.log(`每页 ${val} 条`); |
| | | }, |
| | | handleCurrentChange(val) { |
| | | console.log(`当前页: ${val}`); |
| | | }, |
| | | onSubmit() { |
| | | console.log("submit!"); |
| | | }, |
| | | onEmpty(formData1) { |
| | | this.$refs[formData1].resetFields()//重置表单数据 |
| | | async delTokenData() { |
| | | var std = []; |
| | | for (var i in this.multipleSelection) { |
| | | std.push(this.multipleSelection[i].id); |
| | | } |
| | | const data = await deleteTokens({ ids: std.toString() }); |
| | | if (data.code == 200) { |
| | | this.$message({ |
| | | message: '删除成功!', |
| | | type: 'success', |
| | | }); |
| | | this.getRoleTabelData(); |
| | | } else { |
| | | this.$message({ |
| | | message: '删除失败!', |
| | | type: 'warning', |
| | | }); |
| | | } |
| | | }, |
| | | created() { }, |
| | | editFromDataClose() { |
| | | this.EditFormdialog = false; |
| | | this.upform = {}; |
| | | }, |
| | | async editFromData() { |
| | | this.upform.type = parseInt(this.upform.edit); |
| | | if (this.upform.duration != null && this.upform.duration != undefined) { |
| | | var date = this.formomentTime(this.upform.createTime); |
| | | this.upform.expire = this.getEditTime(this.upform.duration, date); |
| | | } |
| | | const data = await updateToken(this.upform); |
| | | if (data.code == 200) { |
| | | this.EditFormdialog = false; |
| | | this.upform = {}; |
| | | this.$message({ |
| | | message: '修改成功!', |
| | | type: 'success', |
| | | }); |
| | | this.getRoleTabelData(); |
| | | } else { |
| | | this.$message({ |
| | | message: '修改失败!', |
| | | type: 'warning', |
| | | }); |
| | | } |
| | | }, |
| | | changeGame(id) { |
| | | this.$forceUpdate(); //在下拉框上绑定change事件 更新视图 这样就不会有视图更新的问题 |
| | | }, |
| | | handleEdit(index, row) { |
| | | this.EditFormdialog = true; |
| | | this.upform = row; |
| | | this.upform.edit = JSON.stringify(row.type); |
| | | }, |
| | | handleSelectionChange(val) { |
| | | this.multipleSelection = val; |
| | | }, |
| | | insertFromDataClose() { |
| | | this.InsertFormdialog = false; |
| | | this.insertform = {}; |
| | | }, |
| | | async insertFromData() { |
| | | if ( |
| | | this.insertform.duration != null && |
| | | this.insertform.duration != undefined |
| | | ) { |
| | | this.insertform.expire = this.getNowDate(this.insertform.duration); |
| | | } |
| | | const data = await insertToken(this.insertform); |
| | | if (data.code == 200) { |
| | | this.InsertFormdialog = false; |
| | | this.insertform = {}; |
| | | this.$message({ |
| | | message: '添加成功!', |
| | | type: 'success', |
| | | }); |
| | | this.getRoleTabelData(); |
| | | } else { |
| | | this.$message({ |
| | | message: '添加失败!', |
| | | type: 'warning', |
| | | }); |
| | | } |
| | | }, |
| | | getEditTime(res, time) { |
| | | var date = new Date(time); |
| | | date.setMinutes(date.getMinutes() + parseInt(res), date.getSeconds(), 0); |
| | | var year = date.getFullYear(); |
| | | var month = |
| | | date.getMonth() + 1 > 9 |
| | | ? date.getMonth() + 1 |
| | | : '0' + (date.getMonth() + 1); |
| | | var day = date.getDate() > 9 ? date.getDate() : '0' + date.getDate(); |
| | | // var todayDate = year + '-' + month + '-' + day |
| | | var hour = date.getHours() > 9 ? date.getHours() : '0' + date.getHours(); |
| | | var min = |
| | | date.getMinutes() > 9 ? date.getMinutes() : '0' + date.getMinutes(); |
| | | var sec = |
| | | date.getSeconds() > 9 ? date.getSeconds() : '0' + date.getSeconds(); |
| | | var todayDate = |
| | | year + '-' + month + '-' + day + ' ' + hour + ':' + min + ':' + sec; |
| | | return todayDate; |
| | | }, |
| | | getNowDate(res) { |
| | | var date = new Date(); |
| | | var min = date.getMinutes(); //2. 获取当前分钟 |
| | | date.setMinutes(min + parseInt(res)); |
| | | var sign2 = ':'; |
| | | var year = date.getFullYear(); // 年 |
| | | var month = date.getMonth() + 1; // 月 |
| | | var day = date.getDate(); // 日 |
| | | var hour = date.getHours(); // 时 |
| | | var minutes = date.getMinutes(); // 分 |
| | | |
| | | var seconds = date.getSeconds(); //秒 |
| | | var weekArr = [ |
| | | '星期一', |
| | | '星期二', |
| | | '星期三', |
| | | '星期四', |
| | | '星期五', |
| | | '星期六', |
| | | '星期天', |
| | | ]; |
| | | var week = weekArr[date.getDay()]; |
| | | // 给一位数的数据前面加 “0” |
| | | if (month >= 1 && month <= 9) { |
| | | month = '0' + month; |
| | | } |
| | | if (day >= 0 && day <= 9) { |
| | | day = '0' + day; |
| | | } |
| | | if (hour >= 0 && hour <= 9) { |
| | | hour = '0' + hour; |
| | | } |
| | | if (minutes >= 0 && minutes <= 9) { |
| | | minutes = '0' + minutes; |
| | | } |
| | | if (seconds >= 0 && seconds <= 9) { |
| | | seconds = '0' + seconds; |
| | | } |
| | | return ( |
| | | year + |
| | | '-' + |
| | | month + |
| | | '-' + |
| | | day + |
| | | ' ' + |
| | | hour + |
| | | sign2 + |
| | | minutes + |
| | | sign2 + |
| | | seconds |
| | | ); |
| | | }, |
| | | async getRoleTabelData() { |
| | | if (this.listData.tab == '') { |
| | | delete this.listData.tab; |
| | | } |
| | | this.listData.name = this.ruleForm.name; |
| | | this.listData.type = this.ruleForm.value; |
| | | if (this.ruleForm.value != null) { |
| | | this.listData.type = parseInt(this.ruleForm.value); |
| | | } |
| | | debugger; |
| | | const data = await select_Token_ByPageAndCount(this.listData); |
| | | if (data.code != 200) { |
| | | this.$message.error('列表调用失败'); |
| | | } |
| | | this.tableData = data.result; |
| | | this.count = data.count; |
| | | }, |
| | | handleSizeChange(val) { |
| | | this.listData.pageSize = val; |
| | | this.getRoleTabelData(); |
| | | }, |
| | | handleCurrentChange(val) { |
| | | this.listData.pageIndex = val; |
| | | this.getRoleTabelData(); |
| | | }, |
| | | onSubmit() { |
| | | this.listData.pageIndex = 1; |
| | | this.listData.pageSize = 10; |
| | | this.getRoleTabelData(); |
| | | }, |
| | | onEmpty(formData1) { |
| | | this.ruleForm = {}; |
| | | this.listData.pageIndex = 1; |
| | | this.listData.pageSize = 10; |
| | | this.getRoleTabelData(); |
| | | }, |
| | | formatTime(row, column) { |
| | | let date = row[column.property]; |
| | | return this.formomentTime(date); |
| | | }, |
| | | formomentTime(date) { |
| | | if (date === undefined || date === null) { |
| | | return; |
| | | } |
| | | return moment(parseInt(date)).format('YYYY-MM-DD HH:mm:ss'); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | <style scoped> |
| | |
| | | height: 100%; |
| | | padding: 10px; |
| | | box-sizing: border-box; |
| | | .el-input { |
| | | width: 745px; |
| | | } |
| | | .el-select { |
| | | width: 745px; |
| | | } |
| | | .inquire { |
| | | padding: 10px; |
| | | margin-top: 20px; |
| | | background: #fff; |
| | | border-radius: 5px; |
| | | border: 1px solid rgb(202, 201, 204); |
| | | margin-bottom: 20px; |
| | | margin-bottom: 10px; |
| | | .herder_box { |
| | | padding: 10px; |
| | | border-bottom: 1px solid #ccc; |
| | | margin-bottom: 20px; |
| | | font-size: 14px; |
| | | } |
| | | .el-select { |
| | | width: 200px; |
| | | } |
| | | } |
| | | .table_box { |
| | | padding: 10px; |
| | | background: #fff; |
| | | height: 68%; |
| | | border-radius: 5px; |
| | | border: 1px solid rgb(202, 201, 204); |
| | | margin-bottom: 10px; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="depid" |
| | | prop="depName" |
| | | align="center" |
| | | :label="$t('userManage.resManageObj.depid')" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="dirid" |
| | | prop="dirName" |
| | | align="center" |
| | | :label="$t('userManage.resManageObj.dirid')" |
| | | > |
| | |
| | | </div> |
| | | <div class="contentBox"> |
| | | <p> |
| | | <label> {{ $t('userManage.userInfoObj.name') }}:</label> |
| | | <label> {{ $t('userManage.resManageObj.name') }}:</label> |
| | | <label class="boxlabel">{{ itemdetail.name }}</label> |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p> |
| | | <p> |
| | | <label> {{ $t('userManage.userInfoObj.tag') }}:</label> |
| | | <label class="boxlabel">{{ itemdetail.tag }}</label> |
| | | <label> {{ $t('userManage.resManageObj.server') }}:</label> |
| | | <label class="boxlabel">{{ itemdetail.server }}</label> |
| | | </p> |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p> |
| | | <label> {{ $t('userManage.userInfoObj.createUser') }}:</label> |
| | | <label> {{ $t('userManage.resManageObj.source') }}:</label> |
| | | <label class="boxlabel">{{ itemdetail.source }}</label> |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p> |
| | | <label> {{ $t('userManage.resManageObj.depid') }}:</label> |
| | | <label class="boxlabel">{{ itemdetail.depName }}</label> |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p> |
| | | <label> {{ $t('userManage.resManageObj.dirid') }}:</label> |
| | | <label class="boxlabel">{{ itemdetail.dirName }}</label> |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p> |
| | | <label> {{ $t('userManage.resManageObj.descr') }}:</label> |
| | | <label class="boxlabel">{{ itemdetail.descr }}</label> |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p> |
| | | <label> {{ $t('userManage.resManageObj.img') }}:</label> |
| | | <label class="boxlabel">{{ itemdetail.img }}</label> |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p> |
| | | <label> {{ $t('userManage.resManageObj.createUser') }}:</label> |
| | | <label class="boxlabel">{{ itemdetail.createUser }}</label> |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p> |
| | | <label> {{ $t('userManage.userInfoObj.createTime') }}:</label> |
| | | <label> {{ $t('userManage.resManageObj.createTime') }}:</label> |
| | | <label class="boxlabel">{{ itemdetail.createTime }}</label> |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p> |
| | | <label> {{ $t('userManage.userInfoObj.updateUser') }}:</label> |
| | | <label> {{ $t('userManage.resManageObj.updateUser') }}:</label> |
| | | <label class="boxlabel">{{ itemdetail.updateUser }}</label> |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p> |
| | | <label> {{ $t('userManage.userInfoObj.updateTime') }}:</label> |
| | | <label> {{ $t('userManage.resManageObj.updateTime') }}:</label> |
| | | <label class="boxlabel">{{ itemdetail.updateTime }}</label> |
| | | </p> |
| | | <el-divider></el-divider> |
| | | <p> |
| | | <label> {{ $t('userManage.userInfoObj.bak') }}:</label> |
| | | <label> {{ $t('userManage.resManageObj.bak') }}:</label> |
| | | <label class="boxlabel">{{ itemdetail.bak }}</label> |
| | | </p> |
| | | <el-divider></el-divider> |
| | |
| | | :label="$t('userManage.resManageObj.depid')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input v-model="insertform.depid" disabled autocomplete="off"></el-input> |
| | | <el-input v-model="insertform.depValue" disabled autocomplete="off"></el-input> |
| | | <el-link |
| | | :underline="false" |
| | | @click="showDepTree(0)" |
| | |
| | | :label="$t('userManage.resManageObj.dirid')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input v-model="insertform.dirid" disabled autocomplete="off"></el-input> |
| | | <el-input v-model="insertform.dirValue" disabled autocomplete="off"></el-input> |
| | | <el-link |
| | | :underline="false" |
| | | @click="showDepTree(0)" |
| | | @click="showDirTree(0)" |
| | | style="margin-left: 10px" |
| | | ><i class="el-icon-plus"></i |
| | | ></el-link> |
| | |
| | | <el-form-item |
| | | :label="$t('userManage.resManageObj.img')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input v-model="insertform.img" autocomplete="off"></el-input> |
| | | > <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 |
| | | :underline="false" |
| | | |
| | | @click="getIsertFile" |
| | | style="margin-left: 10px" |
| | | ><i class="el-icon-plus"></i |
| | | ></el-link> |
| | |
| | | style="overflow: hidden" |
| | | :visible.sync="EditFormdialog" |
| | | :before-close="EditFromDataClose" |
| | | width="30%" |
| | | > |
| | | <el-form :model="upform"> |
| | | <el-form-item |
| | | :label="$t('userManage.userInfoObj.name')" |
| | | :label="$t('userManage.resManageObj.name')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input v-model="upform.name" ></el-input> |
| | | <el-input v-model="upform.name" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('userManage.userInfoObj.tag')" |
| | | :label="$t('userManage.resManageObj.server')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input v-model="upform.tag" ></el-input> |
| | | <el-input v-model="upform.server" autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('userManage.userInfoObj.bak')" |
| | | :label="$t('userManage.resManageObj.source')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input v-model="upform.bak" ></el-input> |
| | | <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 v-model="upform.depValue" disabled autocomplete="off"></el-input> |
| | | <el-link |
| | | :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 v-model="upform.dirValue" disabled autocomplete="off"></el-input> |
| | | <el-link |
| | | :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-form-item> |
| | | <el-form-item |
| | | :label="$t('userManage.resManageObj.bak')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input v-model="upform.bak" autocomplete="off"></el-input> |
| | | |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | |
| | | }}</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | <div class="leftTree" v-if="showDirCata"> |
| | | <div class="treeBox"> |
| | | <style-dir-tree></style-dir-tree> |
| | | </div> |
| | | <div class="btnBox"> |
| | | <el-button type="primary" size="small" @click="selectDirCataName">{{ |
| | | $t('common.confirm') |
| | | }}</el-button> |
| | | <el-button type="primary" size="small" @click="showDirCata = false">{{ |
| | | $t('common.close') |
| | | }}</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="leftTree" v-if="showDepCata"> |
| | | <div class="treeBox"> |
| | | <style-dep-tree></style-dep-tree> |
| | | </div> |
| | | <div class="btnBox"> |
| | | <el-button type="primary" size="small" @click="selectDepCataName">{{ |
| | | $t('common.confirm') |
| | | }}</el-button> |
| | | <el-button type="primary" size="small" @click="showDepCata = false">{{ |
| | | $t('common.close') |
| | | }}</el-button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import $ from 'jquery'; |
| | | import moment from 'moment'; |
| | | import MyBread from '../../components/MyBread.vue'; |
| | | import { select_Res_ByPageAndCount, insertAuth, updateAuth, deleteAuths } from '../../api/api.js'; |
| | | import { select_Res_ByPageAndCount, insertRes, updateRes, deleteRess } |
| | | from '../../api/api.js'; |
| | | import styleDirTree from '../datamanage/styleDirTree.vue'; |
| | | import styleDepTree from '../datamanage/styleDepTree.vue'; |
| | | export default { |
| | | components: { MyBread }, |
| | | components: { MyBread, styleDirTree, styleDepTree }, |
| | | data() { |
| | | return { |
| | | formLabelWidth: '130px', |
| | |
| | | InsertFormdialog: false, |
| | | showinfoBox: false, |
| | | EditFormdialog: false, |
| | | insertform: {}, |
| | | showDirCata: false, |
| | | showDepCata: false, |
| | | dirFlag: null, |
| | | depFlag: null, |
| | | insertform: { |
| | | img:'' |
| | | }, |
| | | tableData: [], |
| | | itemdetail: {}, |
| | | upform: {}, |
| | | upform: { img:''}, |
| | | multipleSelection: [], |
| | | count: 0, |
| | | listData: { |
| | |
| | | this.getRoleTabelData(); |
| | | }, |
| | | methods: { |
| | | getIsertFile() { |
| | | $('#imageFile').click(); |
| | | }, |
| | | getupdateFile(){ |
| | | $('#editimageFile').click(); |
| | | }, |
| | | insertFile() { |
| | | var val = document.getElementById('imageFile').files; |
| | | if (!val || !val.length) return; |
| | | this.insertform.img = val[0].name; |
| | | }, |
| | | updateFile() { |
| | | var val = document.getElementById('editimageFile').files; |
| | | if (!val || !val.length) return; |
| | | this.upform.img = val[0].name; |
| | | }, |
| | | showDirTree(res) { |
| | | this.dirFlag = res; |
| | | this.showDirCata = true; |
| | | }, |
| | | showDepTree(res) { |
| | | this.depFlag = res; |
| | | this.showDepCata = true; |
| | | }, |
| | | selectDepCataName() { |
| | | this.showDepCata = false; |
| | | switch (this.depFlag) { |
| | | case 0: |
| | | this.insertform.depValue = this.$store.state.styleDepCateNodes.name; |
| | | this.insertform.depid = this.$store.state.styleDepCateNodes.id; |
| | | break; |
| | | case 1: |
| | | this.upform.depValue = this.$store.state.styleDepCateNodes.name; |
| | | this.upform.depid = this.$store.state.styleDepCateNodes.id; |
| | | break; |
| | | } |
| | | }, |
| | | selectDirCataName() { |
| | | this.showDirCata = false; |
| | | switch (this.dirFlag) { |
| | | case 0: |
| | | // var data = this.$store.state.styleDirCateNodes; |
| | | this.insertform.dirValue = this.$store.state.styleDirCateNodes.name; |
| | | this.insertform.dirid = this.$store.state.styleDirCateNodes.id; |
| | | break; |
| | | case 1: |
| | | this.upform.dirValue = this.$store.state.styleDirCateNodes.name; |
| | | this.upform.dirid = this.$store.state.styleDirCateNodes.id; |
| | | break; |
| | | } |
| | | }, |
| | | async DelFromData() { |
| | | var std = []; |
| | | for (var i in this.multipleSelection) { |
| | | std.push(this.multipleSelection[i].id); |
| | | } |
| | | const data = await deleteAuths({ ids: std.toString() }); |
| | | const data = await deleteRess({ ids: std.toString() }); |
| | | if (data.code == 200) { |
| | | this.$message({ |
| | | message: '删除成功!', |
| | |
| | | this.upform = {}; |
| | | }, |
| | | async EditFromData() { |
| | | const data = await updateAuth(this.upform); |
| | | const data = await updateRes(this.upform); |
| | | if (data.code == 200) { |
| | | this.EditFormdialog = false; |
| | | this.upform = {}; |
| | |
| | | showDetail(index, row) { |
| | | this.showinfoBox = true; |
| | | this.itemdetail = row; |
| | | this.itemdetail.createTime = this.formomentTime(this.itemdetail.createTime); |
| | | this.itemdetail.updateTime = this.formomentTime(this.itemdetail.updateTime); |
| | | |
| | | }, |
| | | handleEdit(index, row) { |
| | | this.EditFormdialog = true; |
| | | this.upform = row; |
| | | this.upform.depValue = row.depName; |
| | | this.upform.dirValue = row.dirName; |
| | | }, |
| | | closeDetial() { |
| | | this.showinfoBox = false; |
| | |
| | | this.insertform = {}; |
| | | }, |
| | | async insertFromData() { |
| | | const data = await insertAuth(this.insertform); |
| | | if (this.insertform.dirid == null || this.insertform.depid == null) { |
| | | this.$message({ |
| | | message: '请选择资源所属的目录或单位', |
| | | type: 'warning', |
| | | }); |
| | | return; |
| | | } |
| | | const data = await insertRes(this.insertform); |
| | | if (data.code == 200) { |
| | | this.InsertFormdialog = false; |
| | | this.insertform = {}; |
| | |
| | | } |
| | | this.listData.name = this.ruleForm.name; |
| | | const data = await select_Res_ByPageAndCount(this.listData); |
| | | console.log(data) |
| | | if (data.code != 200) { |
| | | this.$message.error('列表调用失败'); |
| | | } |
| | |
| | | .pagination_box { |
| | | margin-top: 20px; |
| | | } |
| | | .leftTree { |
| | | position: absolute; |
| | | z-index: 10; |
| | | z-index: 9999; |
| | | top: 100px; |
| | | left: 800px; |
| | | width: 400px; |
| | | height: 600px; |
| | | background: #f0f2f5; |
| | | border: 1px solid #000; |
| | | .treeBox { |
| | | height: 550px; |
| | | overflow: auto; |
| | | /deep/ .el-tree-node__content:hover { |
| | | background-color: rgb(153, 153, 153); |
| | | } |
| | | } |
| | | .btnBox { |
| | | width: 160px; |
| | | margin: 10px auto 0; |
| | | // background-color: red; |
| | | } |
| | | } |
| | | .infoBox { |
| | | width: 500px; |
| | | border: 1px solid #eee; |