Commit b55fe5e4 by liupeng

Merge branch 'dev_xzeq' of http://47.92.108.28/changchao/founder_vue into dev_xzeq

parents 6b98a491 23c2c65d
...@@ -17,3 +17,8 @@ export const getUserXxByxxzjbh = params => ...@@ -17,3 +17,8 @@ export const getUserXxByxxzjbh = params =>
export const updateUserXx = params => export const updateUserXx = params =>
postform(`${base.alyIP}/sysuser/updateUserXx`, params); postform(`${base.alyIP}/sysuser/updateUserXx`, params);
//用户是否启用
export const openUserXx = params =>
post(`${base.alyIP}/sysuser/openUserXx`, params);
...@@ -983,6 +983,7 @@ ...@@ -983,6 +983,7 @@
</span> </span>
</div> </div>
</div> </div>
</div>
<div class="addChildBtn"> <div class="addChildBtn">
<el-button type="primary" @click="handelFrom(item2)"> <el-button type="primary" @click="handelFrom(item2)">
<i class="el-icon-plus"></i><span>添加</span> <i class="el-icon-plus"></i><span>添加</span>
...@@ -990,7 +991,6 @@ ...@@ -990,7 +991,6 @@
</div> </div>
</div> </div>
</div> </div>
</div>
</el-form-item> </el-form-item>
</div> </div>
</div> </div>
...@@ -1081,7 +1081,6 @@ export default { ...@@ -1081,7 +1081,6 @@ export default {
this.$emit("ajtq", item); this.$emit("ajtq", item);
}, },
ajFocus(item) { ajFocus(item) {
debugger;
this.$emit("ajFocus", item); this.$emit("ajFocus", item);
}, },
initFields() { initFields() {
...@@ -1410,9 +1409,7 @@ export default { ...@@ -1410,9 +1409,7 @@ export default {
} }
//2.有childrenAsAdd表单数据处理 //2.有childrenAsAdd表单数据处理
if (item.childrenAsAdd) { if (item.childrenAsAdd) {
debugger;
item.childrenAsAdd.forEach((subItem) => { item.childrenAsAdd.forEach((subItem) => {
debugger;
//如果遍历到的编号和所选择的编号一致 //如果遍历到的编号和所选择的编号一致
self.formLabelAlign[subItem.id].forEach((val5, index) => { self.formLabelAlign[subItem.id].forEach((val5, index) => {
//遍历每一个数组的值 //遍历每一个数组的值
...@@ -1443,15 +1440,6 @@ export default { ...@@ -1443,15 +1440,6 @@ export default {
val5[ite] val5[ite]
); );
} }
console.log(
"5)政治人员身份" +
subItem.id +
"[" +
index +
"]." +
ite,
val5[ite]
);
} else if ( } else if (
currentc && currentc &&
currentc.type == "lazyCodeTree" currentc.type == "lazyCodeTree"
...@@ -1494,7 +1482,6 @@ export default { ...@@ -1494,7 +1482,6 @@ export default {
}); });
}); });
for (var fileItem in self.fileLists) { for (var fileItem in self.fileLists) {
debugger;
for (var i = 0; i < self.fileLists[fileItem].length; i++) { for (var i = 0; i < self.fileLists[fileItem].length; i++) {
if (self.fileLists[fileItem][i].raw) { if (self.fileLists[fileItem][i].raw) {
params.append(fileItem, self.fileLists[fileItem][i].raw); params.append(fileItem, self.fileLists[fileItem][i].raw);
...@@ -1551,8 +1538,8 @@ export default { ...@@ -1551,8 +1538,8 @@ export default {
handelFrom(obj) { handelFrom(obj) {
let self = this, let self = this,
addObj; addObj;
if (obj.flag2) { if (!obj.flag) {
obj.flag2 = false; self.$set(obj,'flag',true)
} else { } else {
self.propFormField.forEach((groupItem) => { self.propFormField.forEach((groupItem) => {
groupItem.data.forEach((val) => { groupItem.data.forEach((val) => {
......
...@@ -556,7 +556,7 @@ ...@@ -556,7 +556,7 @@
{{ scope.row[columnTitle.prop] }} {{ scope.row[columnTitle.prop] }}
</div> </div>
<div v-else-if="columnTitle.prop == 'openFlag'"> <div v-else-if="columnTitle.prop == 'openFlag'">
{{ scope.row[columnTitle.prop] == "1" ? "已开启" : "未开启" }} <el-switch v-model="scope.row[columnTitle.prop]" active-value='1' inactive-value='0' @change='handleSwitch($event,scope.row)'></el-switch>
</div> </div>
<div v-else v-html="scope.row[columnTitle.prop]"> <div v-else v-html="scope.row[columnTitle.prop]">
{{ columnTitle.prop }} {{ columnTitle.prop }}
...@@ -983,6 +983,9 @@ export default { ...@@ -983,6 +983,9 @@ export default {
self.$message.error("请选择"); self.$message.error("请选择");
} }
}, },
handleSwitch(value,item){
this.$emit("handleSwitch",{value,id:item.id});
},
audit(scope) { audit(scope) {
this.$emit("audit", scope.row); this.$emit("audit", scope.row);
}, },
......
...@@ -48,12 +48,12 @@ export default { ...@@ -48,12 +48,12 @@ export default {
{ {
name: "线索提供者:", name: "线索提供者:",
col: "1", col: "1",
noshowMoreBtn: false, //是否显示添加按钮
childrenAsAdd: [ childrenAsAdd: [
{ {
name: "提供人:", name: "提供人:",
id: "tgz", id: "tgz",
flag: true, flag: false,
list: [ list: [
{ {
name: xstgz, name: xstgz,
...@@ -74,12 +74,12 @@ export default { ...@@ -74,12 +74,12 @@ export default {
{ {
name: "可疑人员:", name: "可疑人员:",
col: "1", col: "1",
noshowMoreBtn: false, //是否显示添加按钮
childrenAsAdd: [ childrenAsAdd: [
{ {
name: "可疑人员:", name: "可疑人员:",
id: "ry", id: "ry",
flag: true, flag: false,
list: [ list: [
{ {
name: ryxsgl, name: ryxsgl,
...@@ -100,12 +100,12 @@ export default { ...@@ -100,12 +100,12 @@ export default {
{ {
name: "机动车线索管理:", name: "机动车线索管理:",
col: "1", col: "1",
noshowMoreBtn: false, //是否显示添加按钮
childrenAsAdd: [ childrenAsAdd: [
{ {
name: "可疑机动车:", name: "可疑机动车:",
id: "jdc", id: "jdc",
flag: true, flag: false,
list: [ list: [
{ {
name: jdcxsgl, name: jdcxsgl,
...@@ -126,12 +126,12 @@ export default { ...@@ -126,12 +126,12 @@ export default {
{ {
name: "非机动车线索管理:", name: "非机动车线索管理:",
col: "1", col: "1",
noshowMoreBtn: false, //是否显示添加按钮
childrenAsAdd: [ childrenAsAdd: [
{ {
name: "可疑非机动车:", name: "可疑非机动车:",
id: "fjdc", id: "fjdc",
flag: true, flag: false,
list: [ list: [
{ {
name: fjdcxsgl, name: fjdcxsgl,
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
@edit="edit" @edit="edit"
@editRole="editRole" @editRole="editRole"
@selectionChange="selectionChange" @selectionChange="selectionChange"
@handleSwitch="handleSwitch"
></right-content> ></right-content>
<el-dialog <el-dialog
title="角色管理" title="角色管理"
...@@ -41,7 +42,7 @@ ...@@ -41,7 +42,7 @@
<script> <script>
import rightContent from "@c/ptCxForm_components.vue"; import rightContent from "@c/ptCxForm_components.vue";
import { deleteUserNew } from "@/api/userAuth/addUser.js"; import { deleteUserNew, openUserXx } from "@/api/userAuth/addUser.js";
import { tree, insertUserRoles } from "@/api/userAuth/role.js"; import { tree, insertUserRoles } from "@/api/userAuth/role.js";
export default { export default {
name: "queryUser", name: "queryUser",
...@@ -80,7 +81,7 @@ export default { ...@@ -80,7 +81,7 @@ export default {
{ {
label: "登录名", label: "登录名",
prop: "username", prop: "username",
toInfor: true toInfor: true,
}, },
{ {
label: "用户姓名", label: "用户姓名",
...@@ -154,6 +155,27 @@ export default { ...@@ -154,6 +155,27 @@ export default {
this.getTree(); this.getTree();
}, },
methods: { methods: {
handleSwitch(obj) {
this.$confirm("是否修改用户状态", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
openUserXx({
id: obj.id,
openFlag: obj.value,
}).then((res) => {
this.$message.success("修改成功");
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除",
});
});
},
submitRole() { submitRole() {
if (this.selectedTree.length > 0) { if (this.selectedTree.length > 0) {
insertUserRoles({ insertUserRoles({
...@@ -194,7 +216,7 @@ export default { ...@@ -194,7 +216,7 @@ export default {
} }
}, },
handleClose() { handleClose() {
this.dialogVisible =false; this.dialogVisible = false;
}, },
add() { add() {
this.$router.pushToTab("addUser"); this.$router.pushToTab("addUser");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment