修改页面

This commit is contained in:
Captain.B 2020-04-23 10:13:41 +08:00
parent 5ec45caf4d
commit 3484e9361f
8 changed files with 31 additions and 36 deletions

View File

@ -6,7 +6,7 @@
select w.id, w.name, w.organization_id as organizationId, w.description, o.name as organizationName
from workspace w join organization o on w.organization_id = o.id
<where>
<if test="request.name != ''">
<if test="request.name != null and request.name != ''">
AND w.name LIKE #{request.name,jdbcType=VARCHAR}
</if>
</where>

View File

@ -120,7 +120,7 @@
updateVisible: false,
form: {},
queryPath: "/user/org/member/list",
condition: "",
condition: {},
tableData: [],
rules: {
userIds: [
@ -143,7 +143,7 @@
},
initTableData() {
let param = {
name: this.condition,
name: this.condition.name,
organizationId: this.currentUser().lastOrganizationId
};
this.result = this.$post(this.buildPagePath(this.queryPath), param, response => {

View File

@ -54,7 +54,7 @@
<el-input type="text" size="small"
:placeholder="$t('organization.search_by_name')"
prefix-icon="el-icon-search"
maxlength="60" v-model="condition" clearable/>
maxlength="60" v-model="condition.name" clearable/>
</span>
</el-row>
<!-- organization member table -->
@ -235,7 +235,7 @@
let userRole = this.currentUser.userRoles.filter(r => r.sourceId === lastOrganizationId);
if (userRole.length > 0) {
if (userRole[0].roleId === "org_admin") {
this.result = this.$post(url, {name: this.condition}, response => {
this.result = this.$post(url, this.condition, response => {
let data = response.data;
this.items = data.listObject;
for (let i = 0; i < this.items.length; i++) {
@ -396,7 +396,7 @@
createVisible: false,
btnTips: this.$t('workspace.add'),
addTips: this.$t('member.create'),
condition: "",
condition: {},
items: [],
currentPage: 1,
pageSize: 5,

View File

@ -39,7 +39,7 @@
<el-input type="text" size="small"
:placeholder="$t('organization.search_by_name')"
prefix-icon="el-icon-search"
maxlength="60" v-model="condition" clearable/>
maxlength="60" v-model="condition.name" clearable/>
</span>
</el-row>
<!-- organization member table -->
@ -193,7 +193,7 @@
export default {
name: "MsOrganization",
components: {MsCreateBox, MsTablePagination,MsTableHeader},
components: {MsCreateBox, MsTablePagination, MsTableHeader},
data() {
return {
queryPath: '/organization/list',
@ -215,7 +215,7 @@
memberTotal: 0,
currentRow: {},
btnTips: this.$t('member.create'),
condition: "",
condition: {},
tableData: [],
memberLineData: [],
form: {},
@ -395,10 +395,7 @@
this.initTableData();
},
initTableData() {
let param = {
name: this.condition
};
this.result = this.$post(this.queryPath + "/" + this.currentPage + "/" + this.pageSize, param, response => {
this.result = this.$post(this.queryPath + "/" + this.currentPage + "/" + this.pageSize, this.condition, response => {
let data = response.data;
this.tableData = data.listObject;
for (let i = 0; i < this.tableData.length; i++) {

View File

@ -95,7 +95,7 @@
<el-input type="text" size="small"
:placeholder="$t('organization.search_by_name')"
prefix-icon="el-icon-search"
maxlength="60" v-model="condition" clearable/>
maxlength="60" v-model="condition.name" clearable/>
</span>
</el-row>
<!-- organization member table -->
@ -119,7 +119,8 @@
</template>
</el-table-column>
</el-table>
<ms-table-pagination :change="wsMemberList" :current-page.sync="currentMemberPage" :page-size.sync="pageMemberSize"
<ms-table-pagination :change="wsMemberList" :current-page.sync="currentMemberPage"
:page-size.sync="pageMemberSize"
:total="memberTotal"/>
</el-dialog>
@ -342,7 +343,7 @@
},
list() {
let url = '/workspace/list/all/' + this.currentPage + '/' + this.pageSize;
this.result = this.$post(url, {name: this.condition}, response => {
this.result = this.$post(url, this.condition, response => {
let data = response.data;
this.items = data.listObject;
for (let i = 0; i < this.items.length; i++) {
@ -438,7 +439,7 @@
updateMemberVisible: false,
btnTips: this.$t('workspace.add'),
addTips: this.$t('member.create'),
condition: "",
condition: {},
items: [],
currentPage: 1,
pageSize: 5,

View File

@ -230,7 +230,7 @@
btnTipsAdd: this.$t("commons.add"),
btnTipsDel: this.$t("commons.delete"),
queryPath: "testresourcepool/list",
condition: "",
condition: {},
items: [],
currentPage: 1,
pageSize: 5,
@ -261,11 +261,8 @@
},
methods: {
initTableData() {
let param = {
name: this.condition
};
this.result = this.$post(this.buildPagePath(this.queryPath), param, response => {
this.result = this.$post(this.buildPagePath(this.queryPath), this.condition, response => {
let data = response.data;
this.items = data.listObject;
this.total = data.itemCount;

View File

@ -114,7 +114,7 @@
pageSize: 5,
total: 0,
btnTips: this.$t('user.create'),
condition: "",
condition: {},
tableData: [],
form: {},
rule: {
@ -216,10 +216,7 @@
})
},
search() {
let param = {
name: this.condition
};
this.result = this.$post(this.buildPagePath(this.queryPath), param, response => {
this.result = this.$post(this.buildPagePath(this.queryPath), this.condition, response => {
let data = response.data;
this.total = data.itemCount;
this.tableData = data.listObject;

View File

@ -18,8 +18,10 @@
</el-table-column>
<el-table-column>
<template v-slot:default="scope">
<el-button @click="edit(scope.row)" onkeydown="return false;" type="primary" icon="el-icon-edit" size="mini" circle v-permission="['test_manager']"/>
<el-button @click="del(scope.row)" onkeydown="return false;" type="danger" icon="el-icon-delete" size="mini" circle v-permission="['test_manager']"/>
<el-button @click="edit(scope.row)" onkeydown="return false;" type="primary" icon="el-icon-edit" size="mini"
circle v-permission="['test_manager']"/>
<el-button @click="del(scope.row)" onkeydown="return false;" type="danger" icon="el-icon-delete" size="mini"
circle v-permission="['test_manager']"/>
</template>
</el-table-column>
</el-table>
@ -30,7 +32,8 @@
<el-dialog title="添加成员" :visible.sync="createVisible" width="30%" :destroy-on-close="true" @close="closeFunc">
<el-form :model="form" ref="form" :rules="rules" label-position="right" label-width="100px" size="small">
<el-form-item label="成员" prop="userIds">
<el-select v-model="form.userIds" multiple :placeholder="$t('member.please_choose_member')" class="select-width">
<el-select v-model="form.userIds" multiple :placeholder="$t('member.please_choose_member')"
class="select-width">
<el-option
v-for="item in form.userList"
:key="item.id"
@ -113,7 +116,7 @@
createVisible: false,
updateVisible: false,
queryPath: "/user/ws/member/list",
condition: "",
condition: {},
tableData: [],
rules: {
userIds: [
@ -143,7 +146,7 @@
}
this.loading = true;
let param = {
name: this.condition,
name: this.condition.name,
workspaceId: this.currentUser().lastWorkspaceId
};
@ -213,7 +216,7 @@
roleIds: this.form.roleIds,
workspaceId: this.currentUser().lastWorkspaceId
}
this.result = this.$post("/workspace/member/update", param,() => {
this.result = this.$post("/workspace/member/update", param, () => {
this.$message({
type: 'success',
message: this.$t('commons.modify_success')
@ -225,18 +228,18 @@
create() {
this.form = {};
let param = {
name: this.condition,
name: this.condition.name,
organizationId: this.currentUser().lastOrganizationId
};
let wsId = this.currentUser().lastWorkspaceId;
if (typeof wsId == "undefined" || wsId == null || wsId == "") {
this.$message({
message:'请先选择工作空间!',
message: '请先选择工作空间!',
type: 'warning'
});
return false;
}
this.$post('/user/org/member/list/all', param,response => {
this.$post('/user/org/member/list/all', param, response => {
this.createVisible = true;
this.$set(this.form, "userList", response.data);
})