...
|
...
|
@@ -12,19 +12,19 @@ const assets = (props, {attrs, slots, emit}) => { |
|
|
|
|
|
//查询资产类型列表
|
|
|
let getAssetType = () => {
|
|
|
if(Object.keys(icon.value).length > 0){
|
|
|
if (Object.keys(icon.value).length > 0) {
|
|
|
return;
|
|
|
}
|
|
|
proxy.$http.post(`/api-web/manage/ddic/findSucDdics/OPS_SECOND_PROPERTY`, {}, function (res) {
|
|
|
if (res && res.data.length > 0) {
|
|
|
icon.value = {};
|
|
|
res.data.forEach(function(item, index, arr){
|
|
|
res.data.forEach(function (item, index, arr) {
|
|
|
let code = item.ddicCode;
|
|
|
let obj = {};
|
|
|
// code = code.substring(code.lastIndexOf("_") + 1, code.length).toLowerCase();
|
|
|
obj.name=item.ddicName;
|
|
|
obj.icon=item.ddicDesc;
|
|
|
icon.value[code] =obj;
|
|
|
obj.name = item.ddicName;
|
|
|
obj.icon = item.ddicDesc;
|
|
|
icon.value[code] = obj;
|
|
|
});
|
|
|
}
|
|
|
});
|
...
|
...
|
@@ -42,15 +42,14 @@ const assets = (props, {attrs, slots, emit}) => { |
|
|
let assetsAdd = (type, msg) => {
|
|
|
proxy.$http.get(`/api-web/person/assets/typeList/${type}`, {}, function (res) {
|
|
|
if (res && res.data && res.data.length > 0) {
|
|
|
btnClick('add',res.data,msg);
|
|
|
btnClick('add', res.data, msg);
|
|
|
} else {
|
|
|
proxy.$global.showMsg("没有配置属性!","warning");
|
|
|
proxy.$global.showMsg("没有配置属性!", "warning");
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 新增资产
|
|
|
* <p>
|
...
|
...
|
@@ -72,13 +71,13 @@ const assets = (props, {attrs, slots, emit}) => { |
|
|
data = arr;
|
|
|
}
|
|
|
|
|
|
data.map(function (v){
|
|
|
data.map(function (v) {
|
|
|
let str = v.extend;
|
|
|
if(str){
|
|
|
if (str) {
|
|
|
try {
|
|
|
let json = JSON.parse(str);
|
|
|
v.extend = json;
|
|
|
}catch (e){
|
|
|
} catch (e) {
|
|
|
}
|
|
|
}
|
|
|
})
|
...
|
...
|
@@ -92,12 +91,12 @@ const assets = (props, {attrs, slots, emit}) => { |
|
|
}
|
|
|
|
|
|
|
|
|
let checkAssets = () =>{
|
|
|
let checkAssets = () => {
|
|
|
let data = btnType.value.data;
|
|
|
let size = 0;
|
|
|
data.forEach(function (v){
|
|
|
if( !v.value || v.value == '' || v.value == null){
|
|
|
size ++;
|
|
|
data.forEach(function (v) {
|
|
|
if (!v.value || v.value == '' || v.value == null) {
|
|
|
size++;
|
|
|
}
|
|
|
})
|
|
|
|
...
|
...
|
@@ -112,15 +111,15 @@ const assets = (props, {attrs, slots, emit}) => { |
|
|
*/
|
|
|
let addAssets = () => {
|
|
|
let data = btnType.value.data
|
|
|
data.map(function (v){
|
|
|
data.map(function (v) {
|
|
|
v.extend = JSON.stringify(v.extend);
|
|
|
})
|
|
|
|
|
|
if(checkAssets()){
|
|
|
proxy.$global.showMsg(`请填写资产信息,不能全部为空!`,'warning');
|
|
|
if (checkAssets()) {
|
|
|
proxy.$global.showMsg(`请填写资产信息,不能全部为空!`, 'warning');
|
|
|
return;
|
|
|
}
|
|
|
proxy.$http.post(`/api-web/person/assets/add/${props.parentNode.id}`,data , function (res) {
|
|
|
proxy.$http.post(`/api-web/person/assets/add/${props.parentNode.id}`, data, function (res) {
|
|
|
if (res && res.success) {
|
|
|
proxy.$global.showMsg("添加成功");
|
|
|
showDialog(false);
|
...
|
...
|
@@ -138,12 +137,12 @@ const assets = (props, {attrs, slots, emit}) => { |
|
|
*/
|
|
|
let saveAssets = () => {
|
|
|
let data = btnType.value.data
|
|
|
data.map(function (v){
|
|
|
data.map(function (v) {
|
|
|
v.extend = JSON.stringify(v.extend);
|
|
|
})
|
|
|
|
|
|
if(checkAssets()){
|
|
|
proxy.$global.showMsg(`请填写资产信息,不能全部为空!`,'warning');
|
|
|
if (checkAssets()) {
|
|
|
proxy.$global.showMsg(`请填写资产信息,不能全部为空!`, 'warning');
|
|
|
return;
|
|
|
}
|
|
|
proxy.$http.post(`/api-web/person/assets/edit/${props.parentNode.id}`, data, function (res) {
|
...
|
...
|
@@ -162,12 +161,12 @@ const assets = (props, {attrs, slots, emit}) => { |
|
|
* 时间:2021/11/3 20:14
|
|
|
*/
|
|
|
let deleteAssets = (arr) => {
|
|
|
proxy.$global.confirm(`您确认永久删除该资产信息吗?`,function (){
|
|
|
proxy.$global.confirm(`您确认永久删除该资产信息吗?`, function () {
|
|
|
proxy.$http.post(`/api-web/person/assets/delete/${props.parentNode.id}`, arr, function (res) {
|
|
|
if (res && res.success) {
|
|
|
proxy.$global.showMsg("删除成功");
|
|
|
} else {
|
|
|
proxy.$global.showMsg("删除失败,资产不存在或者已被删除!","error");
|
|
|
proxy.$global.showMsg("删除失败,资产不存在或者已被删除!", "error");
|
|
|
}
|
|
|
showDialog(false);
|
|
|
getAssets();
|
...
|
...
|
@@ -185,7 +184,11 @@ const assets = (props, {attrs, slots, emit}) => { |
|
|
* 时间:2021/11/3 20:17
|
|
|
*/
|
|
|
let showDialog = (flg) => {
|
|
|
op.value = flg;
|
|
|
if (!props.isAdd) {
|
|
|
op.value = flg;
|
|
|
} else {
|
|
|
proxy.$global.showMsg("请先添加用户!", "error");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
let okFunc = () => {
|
...
|
...
|
@@ -233,17 +236,32 @@ export default { |
|
|
type: String,
|
|
|
default: ''
|
|
|
},
|
|
|
isAdd: {
|
|
|
type: Boolean,
|
|
|
default: false
|
|
|
}
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
}
|
|
|
return {}
|
|
|
},
|
|
|
setup(props, {attrs, slots, emit}) {
|
|
|
const refreshTree = Vue.inject('refreshTree');
|
|
|
let height = Vue.ref(window.innerHeight - 130);
|
|
|
//判定是否展示家庭成员、工作简历级资产列表
|
|
|
let showMore = Vue.ref(false);
|
|
|
|
|
|
const {proxy} = Vue.getCurrentInstance();
|
|
|
let imageUrl = Vue.ref('');
|
|
|
|
|
|
const familyInfoTableData = Vue.ref([]);
|
|
|
// 家庭成员信息弹框显示标识
|
|
|
let familyDiaShow = Vue.ref(false);
|
|
|
//家庭成员信息弹框标题
|
|
|
let familyDiaTitle = Vue.ref('');
|
|
|
const workInfoTableData = Vue.ref([]);
|
|
|
// 简历信息弹框显示标识
|
|
|
let workDiaShow = Vue.ref(false);
|
|
|
//简历信息弹框标题
|
|
|
let workDiaTitle = Vue.ref('');
|
|
|
|
|
|
let ruleForm = Vue.ref({
|
|
|
nickname: '',
|
...
|
...
|
@@ -256,11 +274,36 @@ export default { |
|
|
company: '',
|
|
|
headImgUrl: '',
|
|
|
post: '',
|
|
|
projectId: null,
|
|
|
// projectId: null,
|
|
|
quitTime: '',
|
|
|
state: '',
|
|
|
idcard:'',
|
|
|
politicsStatus:''
|
|
|
idcard: '',
|
|
|
politicsStatus: '',
|
|
|
hasProof: '', //是否有无犯罪证明 joke add 20221012
|
|
|
nativePlace: '', //籍贯 joke add 20221012
|
|
|
birthday: '', //出生日期 joke add 20221012
|
|
|
partyDate: '', //入党日期 joke add 20221012
|
|
|
responsibility: '' //岗位职责 joke add 20221012
|
|
|
})
|
|
|
|
|
|
let familyInfoForm = Vue.ref({
|
|
|
id: '',
|
|
|
personId: props.parentNode.id, //用户id
|
|
|
name: '', //家庭成员姓名
|
|
|
appellation: '', //家庭成员称谓
|
|
|
place: '', //家庭成员工作单位
|
|
|
position: '', //家庭成员职位
|
|
|
})
|
|
|
|
|
|
let familyInfoFormRef = Vue.ref('');
|
|
|
|
|
|
let workInfoForm = Vue.ref({
|
|
|
id: '',
|
|
|
personId: props.parentNode.id, //用户id
|
|
|
place: '', //工作单位
|
|
|
position: '', //职位
|
|
|
startDate: '', //入职日期
|
|
|
endDate: '', //离职日期
|
|
|
})
|
|
|
|
|
|
|
...
|
...
|
@@ -273,6 +316,12 @@ export default { |
|
|
}, function (res) {
|
|
|
if (res && res.object) {
|
|
|
ruleForm.value = res.object
|
|
|
//如果为新录入,则屏蔽部分页面(家庭成员、工作经历、获得奖励及资产信息)
|
|
|
if (res.object.id != null && res.object.id != '') {
|
|
|
showMore.value = true;
|
|
|
}
|
|
|
proxy.familyInfoTableData = res.object.familyInfoList;
|
|
|
proxy.workInfoTableData = res.object.workExperienceList;
|
|
|
} else {
|
|
|
ruleForm.value = res.object
|
|
|
}
|
...
|
...
|
@@ -282,6 +331,94 @@ export default { |
|
|
imageUrl.value = `${sessionStorage.getItem('domainName')}/api-web/bOpsPerson/downloadFile?id=${props.parentNode.id}&access_token=${localStorage.getItem('access_token')}`
|
|
|
}
|
|
|
|
|
|
let refreshTable = () => {
|
|
|
proxy.$http.get("/api-web/bOpsPerson/search", {
|
|
|
"nickname": props.parentNode.label,
|
|
|
"id": props.parentNode.id,
|
|
|
"projectId": props.projectId
|
|
|
}, function (res) {
|
|
|
if (res && res.object) {
|
|
|
//如果为新录入,则屏蔽部分页面(家庭成员、工作经历、获得奖励及资产信息)
|
|
|
if (res.object.id != null && res.object.id != '') {
|
|
|
showMore.value = true;
|
|
|
}
|
|
|
proxy.familyInfoTableData = res.object.familyInfoList;
|
|
|
proxy.workInfoTableData = res.object.workExperienceList;
|
|
|
}
|
|
|
});
|
|
|
|
|
|
//图片回显
|
|
|
imageUrl.value = `${sessionStorage.getItem('domainName')}/api-web/bOpsPerson/downloadFile?id=${props.parentNode.id}&access_token=${localStorage.getItem('access_token')}`
|
|
|
}
|
|
|
|
|
|
//点击家庭成员信息的新增按钮事件
|
|
|
let showDiaByType = (flg, type) => {
|
|
|
if (type === 'family') {
|
|
|
//展示新增或编辑页面
|
|
|
familyDiaShow.value = flg;
|
|
|
if (flg === false) {
|
|
|
familyInfoForm.value = {
|
|
|
id: '',
|
|
|
personId: props.parentNode.id, //用户id
|
|
|
name: '', //家庭成员姓名
|
|
|
appellation: '', //家庭成员称谓
|
|
|
place: '', //家庭成员工作单位
|
|
|
position: '', //家庭成员职位
|
|
|
}
|
|
|
}
|
|
|
} else if (type === 'work') {
|
|
|
//展示新增或编辑页面
|
|
|
workDiaShow.value = flg;
|
|
|
if (flg === false) {
|
|
|
workInfoForm.value = {
|
|
|
id: '',
|
|
|
personId: props.parentNode.id, //用户id
|
|
|
place: '', //工作单位
|
|
|
position: '', //职位
|
|
|
startDate: '', //入职日期
|
|
|
endDate: '', //离职日期
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
let seTitleByType = (name, type) => {
|
|
|
if (type === 'family') {
|
|
|
familyDiaTitle.value = name + '家庭成员';
|
|
|
} else if (type === 'work') {
|
|
|
workDiaTitle.value = name + '工作经历';
|
|
|
}
|
|
|
}
|
|
|
|
|
|
//点击家庭成员新增按钮
|
|
|
let addFamilyInfo = (name, type) => {
|
|
|
showDiaByType(true, type);
|
|
|
seTitleByType(name, type);
|
|
|
}
|
|
|
//点击修改按钮
|
|
|
let updateFamilyOrWorkInfo = (row, type) => {
|
|
|
//获取数据
|
|
|
if (type === 'family') {
|
|
|
familyInfoForm.value = {
|
|
|
id: row.id,
|
|
|
personId: props.parentNode.id, //用户id
|
|
|
name: row.name, //家庭成员姓名
|
|
|
appellation: row.appellation, //家庭成员称谓
|
|
|
place: row.place, //家庭成员工作单位
|
|
|
position: row.position, //家庭成员职位
|
|
|
}
|
|
|
} else if (type === 'work') {
|
|
|
workInfoForm.value = {
|
|
|
id: row.id,
|
|
|
personId: props.parentNode.id, //用户id
|
|
|
place: row.place, //工作单位
|
|
|
position: row.position, //职位
|
|
|
startDate: row.startDate, //入职日期
|
|
|
endDate: row.endDate, //离职日期
|
|
|
}
|
|
|
}
|
|
|
addFamilyInfo('编辑', type);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* @Author LH
|
...
|
...
|
@@ -290,13 +427,13 @@ export default { |
|
|
* @param callback
|
|
|
* @returns {*}
|
|
|
*/
|
|
|
const checkTel= (rule, value, callback) => {
|
|
|
var re1=/^0\d{2}-[1-9]\d{7}$/;
|
|
|
var re2=/^0\d{3}-[1-9]\{6,7}$/;
|
|
|
var result=re1.test(value)||re2.test(value);
|
|
|
const checkTel = (rule, value, callback) => {
|
|
|
var re1 = /^0\d{2}-[1-9]\d{7}$/;
|
|
|
var re2 = /^0\d{3}-[1-9]\{6,7}$/;
|
|
|
var result = re1.test(value) || re2.test(value);
|
|
|
if (!result && value) {
|
|
|
return callback(new Error('请输入正确的座机号!'))
|
|
|
}else{
|
|
|
} else {
|
|
|
callback()
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -307,42 +444,94 @@ export default { |
|
|
* @param callback
|
|
|
* @returns {*}
|
|
|
*/
|
|
|
const checkPhone= (rule, tel, callback) => {
|
|
|
var mobile = /^1[0-9]\d{9}$/;
|
|
|
const checkPhone = (rule, tel, callback) => {
|
|
|
var mobile = /^1[0-9]\d{9}$/;
|
|
|
if (tel != '' && !mobile.test(tel)) {
|
|
|
callback(new Error('请输入正确的手机号!'))
|
|
|
} else {
|
|
|
callback();
|
|
|
}
|
|
|
}
|
|
|
const checkIdCard=(rule, idCard, callback) => {
|
|
|
const checkIdCard = (rule, idCard, callback) => {
|
|
|
var pattern = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
|
|
|
if (idCard != '' && !pattern.test(idCard)) {
|
|
|
callback(new Error('身份证校验失败!'));
|
|
|
callback(new Error('身份证校验失败!'));
|
|
|
} else {
|
|
|
callback();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
const validatorDate = (rule, value, callback) => {
|
|
|
return value !== '' ? callback() : callback(new Error(rule.message));
|
|
|
};
|
|
|
|
|
|
/**
|
|
|
* @author LH
|
|
|
* 表单规则校验
|
|
|
*/
|
|
|
let rules=Vue.ref({
|
|
|
let rules = Vue.ref({
|
|
|
nickname: [
|
|
|
{ message: '请输入姓名', trigger: 'blur' }
|
|
|
{required: true, message: '请输入姓名', trigger: 'blur'}
|
|
|
],
|
|
|
sex: [
|
|
|
{required: true, message: '请选择性别', trigger: 'blur'}
|
|
|
],
|
|
|
phone: [
|
|
|
{ validator: checkPhone, trigger: 'blur' }
|
|
|
{required: true, message: '请输入手机号', trigger: 'blur'},
|
|
|
{validator: checkPhone,message: '请输入正确的手机号' , trigger: 'blur'}
|
|
|
],
|
|
|
company: [
|
|
|
{ message:'请输入所在公司', trigger: 'blur' }
|
|
|
{required: true, message: '请输入所在公司', trigger: 'blur'}
|
|
|
],
|
|
|
idcard: [
|
|
|
{ validator:checkIdCard,message:'请输入正确的身份证号', trigger: 'blur'}
|
|
|
{required: true, message: '请输入身份证号', trigger: 'blur'},
|
|
|
{validator: checkIdCard, message: '请输入正确的身份证号', trigger: 'blur'}
|
|
|
],
|
|
|
entryTime: [
|
|
|
{required: true, message: '请选择入职时间', trigger: 'blur'}
|
|
|
],
|
|
|
state: [
|
|
|
{required: true, message: '请选择在职状态', trigger: 'blur'}
|
|
|
],
|
|
|
university: [
|
|
|
{required: true, message: '请输入毕业院校', trigger: 'blur'}
|
|
|
],
|
|
|
education: [
|
|
|
{required: true, message: '请输入学历', trigger: 'blur'}
|
|
|
]
|
|
|
});
|
|
|
|
|
|
let familyOrWorkRules = Vue.ref({
|
|
|
name: [
|
|
|
{required: true, message: '请输入姓名'},
|
|
|
{message: '请输入姓名', trigger: 'blur'}
|
|
|
],
|
|
|
appellation: [
|
|
|
{required: true, message: '请输入称谓'},
|
|
|
{message: '请输入称谓', trigger: 'blur'}
|
|
|
],
|
|
|
place: [
|
|
|
{required: true, message: '请输入工作单位'},
|
|
|
{message: '请输入工作单位', trigger: 'blur'}
|
|
|
],
|
|
|
position: [
|
|
|
{required: true, message: '请输入职位'},
|
|
|
{message: '请输入职位', trigger: 'blur'}
|
|
|
],
|
|
|
startDate: [
|
|
|
{required: true, message: '请选择入职日期'},
|
|
|
{validator: validatorDate, message: '请选择入职日期', trigger: 'blur'}
|
|
|
],
|
|
|
endDate: [
|
|
|
{required: true, message: '请选择离职日期'},
|
|
|
{validator: validatorDate, message: '请选择离职日期', trigger: 'blur'}
|
|
|
],
|
|
|
});
|
|
|
|
|
|
//调用基础页面的左侧树获取接口,刷新左侧树 joke add 20221128
|
|
|
let refreshMainTree = () => {
|
|
|
refreshTree();
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* @EDITOR LH
|
...
|
...
|
@@ -350,36 +539,86 @@ export default { |
|
|
*/
|
|
|
// 保存用户信息
|
|
|
let saveUser = () => {
|
|
|
proxy.$refs.rule.validate((valid) => {
|
|
|
if (valid) {
|
|
|
console.log('submit!!');
|
|
|
proxy.$http.post("/api-web/bOpsPerson/saveOrUpdate", ruleForm.value, function (res) {
|
|
|
if (res && res.code == 0) {
|
|
|
proxy.$global.showMsg('保存成功!');
|
|
|
if (props.treeNode.map == undefined) {
|
|
|
proxy.$global.showMsg('请先添加业务', 'warning');
|
|
|
emit('showPopout', false)
|
|
|
}
|
|
|
proxy.$refs.rule.validate((valid) => {
|
|
|
if (valid) {
|
|
|
console.log('submit!!');
|
|
|
ruleForm.value.busId = props.treeNode.map.nodeType.projectId;
|
|
|
proxy.$http.post("/api-web/bOpsPerson/saveOrUpdate", ruleForm.value, function (res) {
|
|
|
if (res && res.code == 0) {
|
|
|
proxy.$global.showMsg('保存成功!');
|
|
|
if (props.isAdd){ //新增时
|
|
|
//刷新左侧树
|
|
|
refreshMainTree();
|
|
|
}
|
|
|
});
|
|
|
} else {
|
|
|
console.log('error submit!!');
|
|
|
return false;
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
emit('showPopout', false)
|
|
|
});
|
|
|
} else {
|
|
|
console.log('error submit!!');
|
|
|
return false;
|
|
|
}
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
let saveOrUpdateByType = (type, rules) => {
|
|
|
let msg = '新增';
|
|
|
var data = {};
|
|
|
if (type === 'family') {
|
|
|
if (familyDiaTitle.value.indexOf('新增') == -1) { //表示编辑
|
|
|
msg = '编辑';
|
|
|
}
|
|
|
data = familyInfoForm.value;
|
|
|
} else if (type === 'work') {
|
|
|
if (workDiaTitle.value.indexOf('新增') == -1) { //表示编辑
|
|
|
msg = '编辑';
|
|
|
}
|
|
|
data = workInfoForm.value;
|
|
|
}
|
|
|
rules.validate((valid) => {
|
|
|
if (valid) {
|
|
|
proxy.$http.post("/api-web/bOpsPerson/saveOrUpdateByType?type=" + type, data, function (res) {
|
|
|
if (res && res.success == true) {
|
|
|
proxy.$global.showMsg(msg + '成功!');
|
|
|
showDiaByType(false, type);
|
|
|
refreshTable();
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
//删除
|
|
|
let deleteByType = (row, type) => {
|
|
|
proxy.$http.post("/api-web/bOpsPerson/deleteByType?type=" + type + "&ids=" + row.id, {}, function (res) {
|
|
|
if (res && res.success == true) {
|
|
|
proxy.$global.showMsg('删除成功!');
|
|
|
refreshTable();
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
|
|
|
let getFile = (param) => {
|
|
|
let fileObj = param.file
|
|
|
let params = {
|
|
|
file: fileObj,
|
|
|
id: props.parentNode.id
|
|
|
}
|
|
|
// 上传文件
|
|
|
proxy.$http.uploadFile("/api-web/bOpsPerson/uploadFile", params, function (res) {
|
|
|
if (res && res.success) {
|
|
|
proxy.$global.showMsg("上传成功!");
|
|
|
if (!props.isAdd) {
|
|
|
let fileObj = param.file
|
|
|
let params = {
|
|
|
file: fileObj,
|
|
|
id: props.parentNode.id
|
|
|
}
|
|
|
})
|
|
|
imageUrl.value = URL.createObjectURL(fileObj);
|
|
|
// 上传文件
|
|
|
proxy.$http.uploadFile("/api-web/bOpsPerson/uploadFile", params, function (res) {
|
|
|
if (res && res.success) {
|
|
|
proxy.$global.showMsg("上传成功!");
|
|
|
}
|
|
|
})
|
|
|
imageUrl.value = URL.createObjectURL(fileObj);
|
|
|
} else {
|
|
|
proxy.$global.showMsg("请先添加用户!", "error");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
let beforeAvatarUpload = (file) => {
|
...
|
...
|
@@ -411,12 +650,16 @@ export default { |
|
|
getAssetType,
|
|
|
icon
|
|
|
} = assets(props, {attrs, slots, emit});
|
|
|
|
|
|
let whether = Vue.ref(true);
|
|
|
// // 挂载完
|
|
|
Vue.onMounted(() => {
|
|
|
if (!props.isAdd) {
|
|
|
getPage();
|
|
|
getAssets();
|
|
|
} else {
|
|
|
whether.value = false;
|
|
|
}
|
|
|
getAssetType();
|
|
|
getPage();
|
|
|
getAssets();
|
|
|
})
|
|
|
|
|
|
// 监听编辑状态
|
...
|
...
|
@@ -424,6 +667,7 @@ export default { |
|
|
getAssetType();
|
|
|
getPage();
|
|
|
getAssets();
|
|
|
refreshTable();
|
|
|
});
|
|
|
return {
|
|
|
imageUrl,
|
...
|
...
|
@@ -447,6 +691,26 @@ export default { |
|
|
// 资产属性
|
|
|
icon,
|
|
|
rules,
|
|
|
familyInfoTableData,
|
|
|
addFamilyInfo,
|
|
|
showDiaByType,
|
|
|
seTitleByType,
|
|
|
saveOrUpdateByType,
|
|
|
familyDiaShow,
|
|
|
familyDiaTitle,
|
|
|
familyInfoForm,
|
|
|
deleteByType,
|
|
|
workDiaShow,
|
|
|
workDiaTitle,
|
|
|
workInfoForm,
|
|
|
updateFamilyOrWorkInfo,
|
|
|
familyOrWorkRules,
|
|
|
familyInfoFormRef,
|
|
|
whether,
|
|
|
showMore,
|
|
|
refreshTable,
|
|
|
refreshMainTree,
|
|
|
refreshTree
|
|
|
}
|
|
|
}
|
|
|
} |
...
|
...
|
|