|
|
@ -117,7 +117,7 @@ |
|
|
|
v-hasPermi="['system:dept:add']" |
|
|
|
>新增</el-button |
|
|
|
> |
|
|
|
<!-- v-if="scope.row.parentId != 0 && scope.row.id != 'water_youke_id'"--> |
|
|
|
<!-- v-if="scope.row.parentId != 0 && scope.row.id != 'water_youke_id'"--> |
|
|
|
<el-button |
|
|
|
size="mini" |
|
|
|
type="text" |
|
|
@ -200,7 +200,7 @@ |
|
|
|
<el-input v-model="form.deptName" placeholder="请输入单位名称" /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="显示排序" prop="orderNum"> |
|
|
|
<el-input-number |
|
|
|
v-model="form.orderNum" |
|
|
@ -209,8 +209,8 @@ |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="前端名称" prop="name"> |
|
|
|
<el-input v-model="form.name" placeholder="请输入前端系统名称" /> |
|
|
@ -248,7 +248,21 @@ |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col>--> |
|
|
|
|
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="行政区划" prop="xzqhId"> |
|
|
|
<el-cascader |
|
|
|
:options="areasOptions" |
|
|
|
v-model="form.xzqhId" |
|
|
|
:props="areasOptionProps" |
|
|
|
placeholder="请选择行政区划" |
|
|
|
clearable |
|
|
|
size="small" |
|
|
|
style="width: 100%" |
|
|
|
@change="handleChange" |
|
|
|
> |
|
|
|
</el-cascader> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
|
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="SLOGAN"> |
|
|
@ -308,118 +322,118 @@ |
|
|
|
</el-col> |
|
|
|
</el-row> --> |
|
|
|
|
|
|
|
<!-- <el-row>--> |
|
|
|
<!-- <el-col :span="12">--> |
|
|
|
<!-- <el-form-item label="前端logo" prop="pcLogo">--> |
|
|
|
<!-- <el-upload--> |
|
|
|
<!-- v-model="form.pcLogo"--> |
|
|
|
<!-- class="upload-demo"--> |
|
|
|
<!-- ref="upload"--> |
|
|
|
<!-- action="this.url"--> |
|
|
|
<!-- :show-file-list="false"--> |
|
|
|
<!-- :file-list="fileList"--> |
|
|
|
<!-- :http-request="uploadPcLogo"--> |
|
|
|
<!-- :before-upload="beforeUpload"--> |
|
|
|
<!-- >--> |
|
|
|
<!-- <el-button slot="trigger" size="small" type="primary"--> |
|
|
|
<!-- >选取图片</el-button--> |
|
|
|
<!-- >--> |
|
|
|
<!-- <el-button--> |
|
|
|
<!-- style="margin-left: 30px"--> |
|
|
|
<!-- class="el-button el-button--primary el-button--small"--> |
|
|
|
<!-- type="primary"--> |
|
|
|
<!-- @click="deletePcLogo"--> |
|
|
|
<!-- v-if="img.pcLogoUrl != undefined"--> |
|
|
|
<!-- >删除图片</el-button--> |
|
|
|
<!-- >--> |
|
|
|
<!-- <div slot="tip" class="el-upload__tip">--> |
|
|
|
<!-- 只能上传图片,如:JPG,PNG,且不超过5MB--> |
|
|
|
<!-- </div>--> |
|
|
|
<!-- </el-upload>--> |
|
|
|
<!-- <img--> |
|
|
|
<!-- v-if="img.pcLogoUrl"--> |
|
|
|
<!-- :src="img.pcLogoUrl"--> |
|
|
|
<!-- class="avatar"--> |
|
|
|
<!-- style="width: 200px; height: 124px"--> |
|
|
|
<!-- />--> |
|
|
|
<!-- <i v-else class="el-icon-plus avatar-uploader-icon"></i>--> |
|
|
|
<!-- </el-form-item>--> |
|
|
|
<!-- </el-col>--> |
|
|
|
<!-- <el-row>--> |
|
|
|
<!-- <el-col :span="12">--> |
|
|
|
<!-- <el-form-item label="前端logo" prop="pcLogo">--> |
|
|
|
<!-- <el-upload--> |
|
|
|
<!-- v-model="form.pcLogo"--> |
|
|
|
<!-- class="upload-demo"--> |
|
|
|
<!-- ref="upload"--> |
|
|
|
<!-- action="this.url"--> |
|
|
|
<!-- :show-file-list="false"--> |
|
|
|
<!-- :file-list="fileList"--> |
|
|
|
<!-- :http-request="uploadPcLogo"--> |
|
|
|
<!-- :before-upload="beforeUpload"--> |
|
|
|
<!-- >--> |
|
|
|
<!-- <el-button slot="trigger" size="small" type="primary"--> |
|
|
|
<!-- >选取图片</el-button--> |
|
|
|
<!-- >--> |
|
|
|
<!-- <el-button--> |
|
|
|
<!-- style="margin-left: 30px"--> |
|
|
|
<!-- class="el-button el-button--primary el-button--small"--> |
|
|
|
<!-- type="primary"--> |
|
|
|
<!-- @click="deletePcLogo"--> |
|
|
|
<!-- v-if="img.pcLogoUrl != undefined"--> |
|
|
|
<!-- >删除图片</el-button--> |
|
|
|
<!-- >--> |
|
|
|
<!-- <div slot="tip" class="el-upload__tip">--> |
|
|
|
<!-- 只能上传图片,如:JPG,PNG,且不超过5MB--> |
|
|
|
<!-- </div>--> |
|
|
|
<!-- </el-upload>--> |
|
|
|
<!-- <img--> |
|
|
|
<!-- v-if="img.pcLogoUrl"--> |
|
|
|
<!-- :src="img.pcLogoUrl"--> |
|
|
|
<!-- class="avatar"--> |
|
|
|
<!-- style="width: 200px; height: 124px"--> |
|
|
|
<!-- />--> |
|
|
|
<!-- <i v-else class="el-icon-plus avatar-uploader-icon"></i>--> |
|
|
|
<!-- </el-form-item>--> |
|
|
|
<!-- </el-col>--> |
|
|
|
|
|
|
|
<!-- <!– <el-col :span="8">--> |
|
|
|
<!-- <el-form-item label="首页背景" prop="pcBackground">--> |
|
|
|
<!-- <el-upload--> |
|
|
|
<!-- v-model="form.pcBackground"--> |
|
|
|
<!-- class="upload-demo"--> |
|
|
|
<!-- ref="upload"--> |
|
|
|
<!-- action="this.url"--> |
|
|
|
<!-- :show-file-list="false"--> |
|
|
|
<!-- :file-list="fileList"--> |
|
|
|
<!-- :http-request="uploadPcBackground"--> |
|
|
|
<!-- :before-upload="beforeUpload"--> |
|
|
|
<!-- >--> |
|
|
|
<!-- <el-button slot="trigger" size="small" type="primary"--> |
|
|
|
<!-- >选取图片</el-button--> |
|
|
|
<!-- >--> |
|
|
|
<!-- <el-button--> |
|
|
|
<!-- style="margin-left: 30px"--> |
|
|
|
<!-- class="el-button el-button--primary el-button--small"--> |
|
|
|
<!-- type="primary"--> |
|
|
|
<!-- @click="deletePcBackground"--> |
|
|
|
<!-- v-if="img.pcBackgroundUrl != undefined"--> |
|
|
|
<!-- >删除图片</el-button--> |
|
|
|
<!-- >--> |
|
|
|
<!-- <div slot="tip" class="el-upload__tip">--> |
|
|
|
<!-- 只能上传图片,如:JPG,PNG,且不超过5MB--> |
|
|
|
<!-- <!– <el-col :span="8">--> |
|
|
|
<!-- <el-form-item label="首页背景" prop="pcBackground">--> |
|
|
|
<!-- <el-upload--> |
|
|
|
<!-- v-model="form.pcBackground"--> |
|
|
|
<!-- class="upload-demo"--> |
|
|
|
<!-- ref="upload"--> |
|
|
|
<!-- action="this.url"--> |
|
|
|
<!-- :show-file-list="false"--> |
|
|
|
<!-- :file-list="fileList"--> |
|
|
|
<!-- :http-request="uploadPcBackground"--> |
|
|
|
<!-- :before-upload="beforeUpload"--> |
|
|
|
<!-- >--> |
|
|
|
<!-- <el-button slot="trigger" size="small" type="primary"--> |
|
|
|
<!-- >选取图片</el-button--> |
|
|
|
<!-- >--> |
|
|
|
<!-- <el-button--> |
|
|
|
<!-- style="margin-left: 30px"--> |
|
|
|
<!-- class="el-button el-button--primary el-button--small"--> |
|
|
|
<!-- type="primary"--> |
|
|
|
<!-- @click="deletePcBackground"--> |
|
|
|
<!-- v-if="img.pcBackgroundUrl != undefined"--> |
|
|
|
<!-- >删除图片</el-button--> |
|
|
|
<!-- >--> |
|
|
|
<!-- <div slot="tip" class="el-upload__tip">--> |
|
|
|
<!-- 只能上传图片,如:JPG,PNG,且不超过5MB--> |
|
|
|
|
|
|
|
<!-- </el-upload>--> |
|
|
|
<!-- <img--> |
|
|
|
<!-- v-if="img.pcBackgroundUrl"--> |
|
|
|
<!-- :src="img.pcBackgroundUrl"--> |
|
|
|
<!-- class="avatar"--> |
|
|
|
<!-- style="width: 200px; height: 124px"--> |
|
|
|
<!-- />--> |
|
|
|
<!-- <i v-else class="el-icon-plus avatar-uploader-icon"></i>--> |
|
|
|
<!-- </el-form-item> –>--> |
|
|
|
<!-- </el-col>--> |
|
|
|
<!-- </el-upload>--> |
|
|
|
<!-- <img--> |
|
|
|
<!-- v-if="img.pcBackgroundUrl"--> |
|
|
|
<!-- :src="img.pcBackgroundUrl"--> |
|
|
|
<!-- class="avatar"--> |
|
|
|
<!-- style="width: 200px; height: 124px"--> |
|
|
|
<!-- />--> |
|
|
|
<!-- <i v-else class="el-icon-plus avatar-uploader-icon"></i>--> |
|
|
|
<!-- </el-form-item> –>--> |
|
|
|
<!-- </el-col>--> |
|
|
|
|
|
|
|
<!-- <el-col :span="12">--> |
|
|
|
<!-- <el-form-item label="后端logo" prop="adminLogo">--> |
|
|
|
<!-- <el-upload--> |
|
|
|
<!-- v-model="form.adminLogo"--> |
|
|
|
<!-- class="upload-demo"--> |
|
|
|
<!-- ref="upload"--> |
|
|
|
<!-- action="this.url"--> |
|
|
|
<!-- :show-file-list="false"--> |
|
|
|
<!-- :file-list="fileList"--> |
|
|
|
<!-- :http-request="uploadAdminLogo"--> |
|
|
|
<!-- :before-upload="beforeUpload"--> |
|
|
|
<!-- >--> |
|
|
|
<!-- <el-button slot="trigger" size="small" type="primary"--> |
|
|
|
<!-- >选取图片</el-button--> |
|
|
|
<!-- >--> |
|
|
|
<!-- <el-button--> |
|
|
|
<!-- style="margin-left: 30px"--> |
|
|
|
<!-- class="el-button el-button--primary el-button--small"--> |
|
|
|
<!-- type="primary"--> |
|
|
|
<!-- @click="deleteAdminLogo"--> |
|
|
|
<!-- v-if="img.adminLogoUrl != undefined"--> |
|
|
|
<!-- >删除图片</el-button--> |
|
|
|
<!-- >--> |
|
|
|
<!-- <div slot="tip" class="el-upload__tip">--> |
|
|
|
<!-- 只能上传图片,如:JPG,PNG,且不超过5MB--> |
|
|
|
<!-- </div>--> |
|
|
|
<!-- </el-upload>--> |
|
|
|
<!-- <img--> |
|
|
|
<!-- v-if="img.adminLogoUrl"--> |
|
|
|
<!-- :src="img.adminLogoUrl"--> |
|
|
|
<!-- class="avatar"--> |
|
|
|
<!-- style="width: 200px; height: 124px"--> |
|
|
|
<!-- />--> |
|
|
|
<!-- <i v-else class="el-icon-plus avatar-uploader-icon"></i>--> |
|
|
|
<!-- </el-form-item>--> |
|
|
|
<!-- </el-col>--> |
|
|
|
<!-- </el-row>--> |
|
|
|
<!-- <el-col :span="12">--> |
|
|
|
<!-- <el-form-item label="后端logo" prop="adminLogo">--> |
|
|
|
<!-- <el-upload--> |
|
|
|
<!-- v-model="form.adminLogo"--> |
|
|
|
<!-- class="upload-demo"--> |
|
|
|
<!-- ref="upload"--> |
|
|
|
<!-- action="this.url"--> |
|
|
|
<!-- :show-file-list="false"--> |
|
|
|
<!-- :file-list="fileList"--> |
|
|
|
<!-- :http-request="uploadAdminLogo"--> |
|
|
|
<!-- :before-upload="beforeUpload"--> |
|
|
|
<!-- >--> |
|
|
|
<!-- <el-button slot="trigger" size="small" type="primary"--> |
|
|
|
<!-- >选取图片</el-button--> |
|
|
|
<!-- >--> |
|
|
|
<!-- <el-button--> |
|
|
|
<!-- style="margin-left: 30px"--> |
|
|
|
<!-- class="el-button el-button--primary el-button--small"--> |
|
|
|
<!-- type="primary"--> |
|
|
|
<!-- @click="deleteAdminLogo"--> |
|
|
|
<!-- v-if="img.adminLogoUrl != undefined"--> |
|
|
|
<!-- >删除图片</el-button--> |
|
|
|
<!-- >--> |
|
|
|
<!-- <div slot="tip" class="el-upload__tip">--> |
|
|
|
<!-- 只能上传图片,如:JPG,PNG,且不超过5MB--> |
|
|
|
<!-- </div>--> |
|
|
|
<!-- </el-upload>--> |
|
|
|
<!-- <img--> |
|
|
|
<!-- v-if="img.adminLogoUrl"--> |
|
|
|
<!-- :src="img.adminLogoUrl"--> |
|
|
|
<!-- class="avatar"--> |
|
|
|
<!-- style="width: 200px; height: 124px"--> |
|
|
|
<!-- />--> |
|
|
|
<!-- <i v-else class="el-icon-plus avatar-uploader-icon"></i>--> |
|
|
|
<!-- </el-form-item>--> |
|
|
|
<!-- </el-col>--> |
|
|
|
<!-- </el-row>--> |
|
|
|
|
|
|
|
<!-- <el-row> |
|
|
|
<el-col :span="8"> |
|
|
@ -539,7 +553,7 @@ import Treeselect from "@riophae/vue-treeselect"; |
|
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css"; |
|
|
|
|
|
|
|
import { getFile } from "@/api/common"; |
|
|
|
|
|
|
|
import { getAreasData } from "@/api/areas/index"; |
|
|
|
|
|
|
|
import myaxios from "axios"; |
|
|
|
|
|
|
@ -553,11 +567,21 @@ export default { |
|
|
|
components: { Treeselect }, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
areasOptionProps: { |
|
|
|
emitPath: false, |
|
|
|
checkStrictly: true, //选择任意一级 |
|
|
|
// lazy: true, |
|
|
|
// lazyLoad: function qylazyLoad(node) { |
|
|
|
// // node.level = 5; |
|
|
|
// console.log("node", node.level); |
|
|
|
// }, |
|
|
|
}, |
|
|
|
areasOptions: [], |
|
|
|
uploadForm: new FormData(), |
|
|
|
fileList: [], |
|
|
|
list: [], |
|
|
|
dataTypes:[], |
|
|
|
dataType:[], |
|
|
|
dataTypes: [], |
|
|
|
dataType: [], |
|
|
|
pcLogoUrl: "", // 前端Logo预览 |
|
|
|
pcBackgroundUrl: "", // 前端背景图预览 |
|
|
|
adminLogoUrl: "", // 后端Logo图预览 |
|
|
@ -637,6 +661,9 @@ export default { |
|
|
|
trigger: "blur", |
|
|
|
}, |
|
|
|
], |
|
|
|
xzqhId: [ |
|
|
|
{ required: true, message: "行政区划不能为空", trigger: "blur" }, |
|
|
|
], |
|
|
|
}, |
|
|
|
//全选 |
|
|
|
checkTags: false, |
|
|
@ -645,11 +672,12 @@ export default { |
|
|
|
}; |
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.getTreeData(); |
|
|
|
this.getList(); |
|
|
|
this.getDicts("sys_normal_disable").then((response) => { |
|
|
|
this.statusOptions = response.data; |
|
|
|
}); |
|
|
|
this.getDicts('characteristic_type').then((response) => { |
|
|
|
this.getDicts("characteristic_type").then((response) => { |
|
|
|
this.dataTypes = response.data; |
|
|
|
}); |
|
|
|
this.getDicts("sys_notice_status").then((response) => { |
|
|
@ -669,12 +697,39 @@ export default { |
|
|
|
// }); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
handleRouter(path,row) { |
|
|
|
getTreeData() { |
|
|
|
getAreasData().then((items) => { |
|
|
|
let res = []; |
|
|
|
let getChildren = (res, pid) => { |
|
|
|
for (const i of items.data) { |
|
|
|
if (i.parentid === pid) { |
|
|
|
const newItem = { |
|
|
|
label: i.name, |
|
|
|
value: i.id, |
|
|
|
}; |
|
|
|
if (i.layer != 3) newItem.children = []; |
|
|
|
res.push(newItem); |
|
|
|
getChildren(newItem.children, newItem.value); |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
getChildren(res, items.data[0].parentid); |
|
|
|
console.log("areasOptions", res); |
|
|
|
this.areasOptions = res; |
|
|
|
}); |
|
|
|
}, |
|
|
|
handleChange(value) { |
|
|
|
//value为省市区code数组 |
|
|
|
if (value) { |
|
|
|
console.log("value", value); |
|
|
|
} |
|
|
|
}, |
|
|
|
handleRouter(path, row) { |
|
|
|
this.$router.push({ |
|
|
|
path: path, |
|
|
|
query: { |
|
|
|
deptId: row.id, |
|
|
|
name:row.deptName |
|
|
|
name: row.deptName, |
|
|
|
}, |
|
|
|
}); |
|
|
|
}, |
|
|
@ -815,10 +870,16 @@ export default { |
|
|
|
this.loading = true; |
|
|
|
listDept(this.queryParams).then((response) => { |
|
|
|
// id, parentId, children, rootId |
|
|
|
if(this.queryParams.deptName || this.queryParams.status){ |
|
|
|
if (this.queryParams.deptName || this.queryParams.status) { |
|
|
|
this.deptList = response.data; |
|
|
|
}else{ |
|
|
|
this.deptList = this.handleTree(response.data, "id","parentId","children","0"); |
|
|
|
} else { |
|
|
|
this.deptList = this.handleTree( |
|
|
|
response.data, |
|
|
|
"id", |
|
|
|
"parentId", |
|
|
|
"children", |
|
|
|
"0" |
|
|
|
); |
|
|
|
} |
|
|
|
this.loading = false; |
|
|
|
}); |
|
|
@ -876,9 +937,9 @@ export default { |
|
|
|
menuIds: [], |
|
|
|
tags: [], |
|
|
|
dataSources: [], |
|
|
|
dataType:null, |
|
|
|
beginDate:null, |
|
|
|
endDate:null, |
|
|
|
dataType: null, |
|
|
|
beginDate: null, |
|
|
|
endDate: null, |
|
|
|
status: "0", |
|
|
|
}; |
|
|
|
this.resetForm("form"); |
|
|
@ -982,8 +1043,8 @@ export default { |
|
|
|
if (adminLogo != null && adminLogo != "" && adminLogo != undefined) { |
|
|
|
getFile(adminLogo, this.img, "adminLogoUrl"); // 后端Logo图片 |
|
|
|
} |
|
|
|
if(this.form.dataType){ |
|
|
|
this.dataType = this.form.dataType.split(","); |
|
|
|
if (this.form.dataType) { |
|
|
|
this.dataType = this.form.dataType.split(","); |
|
|
|
} |
|
|
|
this.open = true; |
|
|
|
this.title = "修改单位"; |
|
|
@ -1008,7 +1069,7 @@ export default { |
|
|
|
submitForm: function () { |
|
|
|
return this.$refs["queryForm"].validate((valid) => { |
|
|
|
if (valid) { |
|
|
|
if(this.dataType){ |
|
|
|
if (this.dataType) { |
|
|
|
this.form.dataType = this.dataType.join(","); |
|
|
|
} |
|
|
|
if (this.form.id != undefined) { |
|
|
|