|
|
|
|
@ -93,7 +93,7 @@
|
|
|
|
|
<u-input type="password" :custom-style="{ fontSize: item.fontSize || ' 16px' }" :clearable="false" :password-icon="false" :placeholder="item.placeholder" input-align="right" class="g_text_r g_w_all" placeholder-style="color:#999;font-size:16px;line-height:1" v-model="item.value" @input="(e) => handleConfirmPwd(e, item, index)" />
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 姓名输入框 -->
|
|
|
|
|
<div class="form-new-name g_flex_rowRight_columnCenter g_w_all" v-if="item.tip == 'slot-name' || item.tip == 'slot-upID' || item.tip == 'slot-weChat'">
|
|
|
|
|
<div class="form-new-name g_flex_rowRight_columnCenter g_w_all" v-if="item.tip == 'slot-name' || item.tip == 'slot-upID' || item.tip == 'slot-weChat' || item.tip == 'slot-title'">
|
|
|
|
|
<u-input type="text" :hover-stop-propagation="true" :maxlength="30" :custom-style="{ fontSize: item.fontSize || ' 16px' }" :clearable="false" :password-icon="false" :placeholder="item.placeholder" input-align="right" class="g_text_r g_w_all" placeholder-style="color:#999;font-size:16px;line-height:1" v-model="item.value" @input="(e) => handleName(e, item, index)" @blur="(e) => handleName(e, item, index)" />
|
|
|
|
|
<div class="form-new-why g_flex_column_center" style="" @click="chooseImgType('IDCard')" v-if="item.tip == 'slot-upID'">
|
|
|
|
|
<image class="g_ml_4 g_w_24 g_h_22" :src="item.img || cdnBaseImg + 'mock_photo1.svg'"></image>
|
|
|
|
|
@ -169,10 +169,20 @@
|
|
|
|
|
<div class="g_flex_1 g_c_3 g_text_l g_fs_16 g_pl_6" :class="[caiwuToggle ? '' : '', item.value.length > 1 ? 'g_text_l' : 'g_text_r']" style="white-space: pre-line">{{ item.value || "-" }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 选择政策 -->
|
|
|
|
|
<div class="g_flex_rowRight_columnCenter g_w_all" @click="uploadZhengce" v-if="item.tip == 'slot-zhengce'">
|
|
|
|
|
<div class="g_flex_1 g_c_3 g_text_r g_fs_16">{{ item.value }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="g_flex_rowRight_columnCenter g_w_all" @click="uploadZhengce" v-if="item.tip == 'slot-zhengce'">
|
|
|
|
|
<div class="g_flex_1 g_c_3 g_text_r g_fs_16">{{ item.value }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 部门选择框 -->
|
|
|
|
|
<div class="form-new-choose g_flex_rowRight_columnCenter g_w_all" v-if="item.tip == 'slot-agencyTeam'">
|
|
|
|
|
<div class="g_flex_1 g_ell_1 g_text_r g_fs_16" :class="item.value ? 'g_c_3' : 'g_c_9'" @click="openDeptPicker(item)">{{ item.value || item.placeholder }}</div>
|
|
|
|
|
<i class="iconfont icon-gengduo11 g_c_c g_ml_4" @click="openDeptPicker(item)"></i>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 角色选择框 -->
|
|
|
|
|
<div class="form-new-choose g_flex_rowRight_columnCenter g_w_all" v-if="item.tip == 'slot-agencyRole'">
|
|
|
|
|
<div class="g_flex_1 g_ell_1 g_text_r g_fs_16" :class="item.value ? 'g_c_3' : 'g_c_9'" @click="openRolePicker(item)">{{ item.value || item.placeholder }}</div>
|
|
|
|
|
<i class="iconfont icon-gengduo11 g_c_c g_ml_4" @click="openRolePicker(item)"></i>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 右箭头 -->
|
|
|
|
|
<div class="form-new-right g_flex_column_center" v-if="item.type != 'slot'" @click.capture="item.path ? handleResult(item) : ''">
|
|
|
|
|
<i class="iconfont icon-gengduo11 g_c_c" style="margin-right: -4px"></i>
|
|
|
|
|
@ -245,6 +255,75 @@
|
|
|
|
|
</slot>
|
|
|
|
|
</g-panel-fixed>
|
|
|
|
|
</u-popup>
|
|
|
|
|
<u-popup v-model="deptModal.isShow" mode="bottom" border-radius="16" height="980" :mask-close-able="true" @close="deptModal.isShow = false">
|
|
|
|
|
<div class="dept-picker-wrap">
|
|
|
|
|
<div class="g_fs_18 g_c_3 g_flex_row_center g_pt_16 g_pb_16">选择部门</div>
|
|
|
|
|
<div class="dept-columns-scroll">
|
|
|
|
|
<div class="dept-columns g_flex_row_start">
|
|
|
|
|
<div class="dept-column" v-for="(column, colIndex) in deptColumns" :key="colIndex">
|
|
|
|
|
<div class="">
|
|
|
|
|
<div class="g_flex_row_between g_pt_16 g_pb_16" style="border-bottom: 1px solid #ddd;" v-for="(dept, deptIndex) in column" :key="dept.id" @click="handleDeptClick(dept, colIndex)">
|
|
|
|
|
<div class="g_ell_1 g_flex_1" :style="{ color: '#333', fontSize: '14px', flex: 1, marginRight: '8px',padding:'0 4px' }">
|
|
|
|
|
{{ dept.teamName }}
|
|
|
|
|
</div>
|
|
|
|
|
<div class="g_flex_column_center g_flex_none">
|
|
|
|
|
<i
|
|
|
|
|
class="iconfont icon-a-duigoubeifen2"
|
|
|
|
|
style="font-size: 24px"
|
|
|
|
|
:style="{
|
|
|
|
|
color: isDeptSelected(dept.id) ? '#6A81FF' : '#fff',
|
|
|
|
|
}"
|
|
|
|
|
></i>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<g-panel-fixed>
|
|
|
|
|
<slot>
|
|
|
|
|
<div class="g_flex_row_center">
|
|
|
|
|
<rh-button btnText="确定" type="primary" @clickBtn="submitDept" />
|
|
|
|
|
</div>
|
|
|
|
|
</slot>
|
|
|
|
|
</g-panel-fixed>
|
|
|
|
|
</div>
|
|
|
|
|
</u-popup>
|
|
|
|
|
<!-- 角色选择弹窗 -->
|
|
|
|
|
<u-popup v-model="roleModal.isShow" mode="bottom" border-radius="16" height="980" :mask-close-able="true" @close="roleModal.isShow = false">
|
|
|
|
|
<div class="dept-picker-wrap">
|
|
|
|
|
<div class="g_fs_18 g_c_3 g_flex_row_center g_pt_16 g_pb_16">选择角色</div>
|
|
|
|
|
<div class="dept-columns-scroll">
|
|
|
|
|
<div class="dept-columns g_flex_row_start">
|
|
|
|
|
<div class="dept-column" style="width: 100%; min-width: 100%; max-width: 100%; border-right: none;">
|
|
|
|
|
<div class="">
|
|
|
|
|
<div class="g_flex_row_between g_pt_16 g_pb_16" style="border-bottom: 1px solid #ddd;" v-for="(role, roleIndex) in roleList" :key="role.id" @click="handleRoleClick(role)">
|
|
|
|
|
<div class="g_ell_1 g_flex_1" :style="{ color: '#333', fontSize: '17px', flex: 1, marginRight: '8px', padding: '0 0 0 10px' }">
|
|
|
|
|
{{ role.roleName }}
|
|
|
|
|
</div>
|
|
|
|
|
<div class="g_flex_column_center g_flex_none" style="margin-right: 10px;">
|
|
|
|
|
<i
|
|
|
|
|
class="iconfont icon-a-duigoubeifen2"
|
|
|
|
|
style="font-size: 24px"
|
|
|
|
|
:style="{
|
|
|
|
|
color: isRoleSelected(role.id) ? '#6A81FF' : '#fff',
|
|
|
|
|
}"
|
|
|
|
|
></i>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<g-panel-fixed>
|
|
|
|
|
<slot>
|
|
|
|
|
<div class="g_flex_row_center">
|
|
|
|
|
<rh-button btnText="确定" type="primary" @clickBtn="submitRole" />
|
|
|
|
|
</div>
|
|
|
|
|
</slot>
|
|
|
|
|
</g-panel-fixed>
|
|
|
|
|
</div>
|
|
|
|
|
</u-popup>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
@ -288,6 +367,20 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
zhengceList: [],
|
|
|
|
|
chooseImg: { chooseImgShow: false, type: "" }, // 选择上传图片类型的弹窗显示
|
|
|
|
|
deptModal: {
|
|
|
|
|
isShow: false,
|
|
|
|
|
},
|
|
|
|
|
deptColumns: [], // 级联列:[[{id,teamName,childs}], [...]]
|
|
|
|
|
selectedDeptIds: [], // 选中的部门id集合
|
|
|
|
|
selectedDeptNames: [], // 选中的部门名称集合
|
|
|
|
|
currentDeptItem: null, // 当前编辑的表单项
|
|
|
|
|
roleModal: {
|
|
|
|
|
isShow: false,
|
|
|
|
|
},
|
|
|
|
|
roleList: [], // 角色列表
|
|
|
|
|
selectedRoleIds: [], // 选中的角色id集合
|
|
|
|
|
selectedRoleNames: [], // 选中的角色名称集合
|
|
|
|
|
currentRoleItem: null, // 当前编辑的角色表单项
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
props: {
|
|
|
|
|
@ -307,6 +400,18 @@ export default {
|
|
|
|
|
type: Number,
|
|
|
|
|
default: 0,
|
|
|
|
|
},
|
|
|
|
|
deptList: {
|
|
|
|
|
type: Array,
|
|
|
|
|
default: () => {
|
|
|
|
|
return [];
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
roleList: {
|
|
|
|
|
type: Array,
|
|
|
|
|
default: () => {
|
|
|
|
|
return [];
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.localBaseImg = this.G.store().localBaseImg;
|
|
|
|
|
@ -353,6 +458,8 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
if ($item.tip == "slot-weChat") {
|
|
|
|
|
this.$emit("changeWeChat", e, $item);
|
|
|
|
|
} else if ($item.tip == "slot-title") {
|
|
|
|
|
this.$emit("changeTitle", e, $item);
|
|
|
|
|
} else {
|
|
|
|
|
this.$emit("changeName", e, $item);
|
|
|
|
|
}
|
|
|
|
|
@ -697,12 +804,108 @@ export default {
|
|
|
|
|
handleResult(e) {
|
|
|
|
|
this.$emit("clickResult", e);
|
|
|
|
|
},
|
|
|
|
|
// 判断部门是否选中
|
|
|
|
|
isDeptSelected(id) {
|
|
|
|
|
return this.selectedDeptIds.indexOf(id) > -1;
|
|
|
|
|
},
|
|
|
|
|
// 打开部门选择弹窗
|
|
|
|
|
openDeptPicker(item) {
|
|
|
|
|
this.currentDeptItem = item;
|
|
|
|
|
// 初始化列并递归展开所有层级
|
|
|
|
|
this.deptColumns = this.buildAllDeptColumns(this.deptList || []);
|
|
|
|
|
if (item.deptIds && item.deptIds.length) {
|
|
|
|
|
this.selectedDeptIds = [].concat(item.deptIds);
|
|
|
|
|
this.selectedDeptNames = [].concat(item.deptNames || []);
|
|
|
|
|
} else {
|
|
|
|
|
this.selectedDeptIds = [];
|
|
|
|
|
this.selectedDeptNames = [];
|
|
|
|
|
}
|
|
|
|
|
this.deptModal.isShow = true;
|
|
|
|
|
},
|
|
|
|
|
// 递归构建全部层级列
|
|
|
|
|
buildAllDeptColumns(list) {
|
|
|
|
|
if (!list || list.length === 0) return [];
|
|
|
|
|
let columns = [list];
|
|
|
|
|
// 找到所有有子级的节点,合并子级作为下一列
|
|
|
|
|
let nextColumn = [];
|
|
|
|
|
list.forEach(item => {
|
|
|
|
|
if (item.childs && item.childs.length > 0) {
|
|
|
|
|
nextColumn = nextColumn.concat(item.childs);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
if (nextColumn.length > 0) {
|
|
|
|
|
columns = columns.concat(this.buildAllDeptColumns(nextColumn));
|
|
|
|
|
}
|
|
|
|
|
return columns;
|
|
|
|
|
},
|
|
|
|
|
// 点击部门项:切换选中 + 展开下一级
|
|
|
|
|
handleDeptClick(dept, colIndex) {
|
|
|
|
|
let idx = this.selectedDeptIds.indexOf(dept.id);
|
|
|
|
|
if (idx > -1) {
|
|
|
|
|
this.selectedDeptIds.splice(idx, 1);
|
|
|
|
|
this.selectedDeptNames.splice(idx, 1);
|
|
|
|
|
} else {
|
|
|
|
|
this.selectedDeptIds.push(dept.id);
|
|
|
|
|
this.selectedDeptNames.push(dept.teamName);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 提交部门选择
|
|
|
|
|
submitDept() {
|
|
|
|
|
let ids = this.selectedDeptIds.join(",");
|
|
|
|
|
let names = this.selectedDeptNames.join(";");
|
|
|
|
|
this.deptModal.isShow = false;
|
|
|
|
|
this.$emit("changeAgencyTeam", {
|
|
|
|
|
ids: ids,
|
|
|
|
|
names: names,
|
|
|
|
|
idList: [].concat(this.selectedDeptIds),
|
|
|
|
|
nameList: [].concat(this.selectedDeptNames),
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
handleMobile(e, $item, $index) {
|
|
|
|
|
this.$emit("changeMobile", e, $item);
|
|
|
|
|
},
|
|
|
|
|
handleMianshi(e, $item, $index) {
|
|
|
|
|
this.$emit("changeTime", e);
|
|
|
|
|
},
|
|
|
|
|
// 判断角色是否选中
|
|
|
|
|
isRoleSelected(id) {
|
|
|
|
|
return this.selectedRoleIds.indexOf(id) > -1;
|
|
|
|
|
},
|
|
|
|
|
// 打开角色选择弹窗
|
|
|
|
|
openRolePicker(item) {
|
|
|
|
|
this.currentRoleItem = item;
|
|
|
|
|
if (item.roleIds && item.roleIds.length) {
|
|
|
|
|
this.selectedRoleIds = [].concat(item.roleIds);
|
|
|
|
|
this.selectedRoleNames = [].concat(item.roleNames || []);
|
|
|
|
|
} else {
|
|
|
|
|
this.selectedRoleIds = [];
|
|
|
|
|
this.selectedRoleNames = [];
|
|
|
|
|
}
|
|
|
|
|
this.roleModal.isShow = true;
|
|
|
|
|
},
|
|
|
|
|
// 点击角色项:切换选中
|
|
|
|
|
handleRoleClick(role) {
|
|
|
|
|
let idx = this.selectedRoleIds.indexOf(role.id);
|
|
|
|
|
if (idx > -1) {
|
|
|
|
|
this.selectedRoleIds.splice(idx, 1);
|
|
|
|
|
this.selectedRoleNames.splice(idx, 1);
|
|
|
|
|
} else {
|
|
|
|
|
this.selectedRoleIds.push(role.id);
|
|
|
|
|
this.selectedRoleNames.push(role.roleName);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 提交角色选择
|
|
|
|
|
submitRole() {
|
|
|
|
|
let ids = this.selectedRoleIds.join(",");
|
|
|
|
|
let names = this.selectedRoleNames.join(";");
|
|
|
|
|
this.roleModal.isShow = false;
|
|
|
|
|
this.$emit("changeAgencyRole", {
|
|
|
|
|
ids: ids,
|
|
|
|
|
names: names,
|
|
|
|
|
idList: [].concat(this.selectedRoleIds),
|
|
|
|
|
nameList: [].concat(this.selectedRoleNames),
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
@ -778,4 +981,39 @@ export default {
|
|
|
|
|
padding-bottom: constant(safe-area-inset-bottom);
|
|
|
|
|
padding-bottom: env(safe-area-inset-bottom);
|
|
|
|
|
}
|
|
|
|
|
.dept-picker-wrap {
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
height: 980rpx;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
}
|
|
|
|
|
.dept-columns-scroll {
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
overflow-x: auto;
|
|
|
|
|
-webkit-overflow-scrolling: touch;
|
|
|
|
|
flex: 1;
|
|
|
|
|
width: 100%;
|
|
|
|
|
padding-bottom: calc(constant(safe-area-inset-bottom) + 80rpx);
|
|
|
|
|
padding-bottom: calc(env(safe-area-inset-bottom) + 80rpx);
|
|
|
|
|
}
|
|
|
|
|
.dept-columns {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: row;
|
|
|
|
|
flex-wrap: nowrap;
|
|
|
|
|
height: 100%;
|
|
|
|
|
width: max-content;
|
|
|
|
|
min-width: 100%;
|
|
|
|
|
}
|
|
|
|
|
.dept-column {
|
|
|
|
|
width: 30vw;
|
|
|
|
|
min-width: 30vw;
|
|
|
|
|
max-width: 30vw;
|
|
|
|
|
height: 100%;
|
|
|
|
|
border-right: 1px solid #ddd;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
flex-grow: 0;
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
-webkit-overflow-scrolling: touch;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
|