Browse Source

Merge branch 'dev' of http://git.elinkit.com.cn:7070/r/epmet-work-pc into dev

# Conflicts:
#	src/views/modules/home/index.vue
V1.0
dai 3 years ago
parent
commit
b8e2190d7f
  1. 2
      src/element-ui/theme/index.css
  2. 2
      src/js/store/index.js
  3. 15
      src/js/store/modules/categoryStr.js
  4. 71
      src/views/components/resiInfo.vue
  5. 116
      src/views/modules/base/resi.vue
  6. 4
      vue.config.js

2
src/element-ui/theme/index.css

File diff suppressed because one or more lines are too long

2
src/js/store/index.js

@ -4,6 +4,7 @@ import cloneDeep from "lodash/cloneDeep";
import user from "./modules/user"; import user from "./modules/user";
import app from "./modules/app"; import app from "./modules/app";
import tagsView from "./modules/tagsView"; import tagsView from "./modules/tagsView";
import categoryStr from "./modules/categoryStr";
import { requestPost } from "@/js/dai/request"; import { requestPost } from "@/js/dai/request";
import { dateFormats } from "@/utils/index"; import { dateFormats } from "@/utils/index";
@ -44,6 +45,7 @@ export default new Vuex.Store({
user, user,
app, app,
tagsView, tagsView,
categoryStr,
}, },
mutations: { mutations: {
// 重置vuex本地储存状态 // 重置vuex本地储存状态

15
src/js/store/modules/categoryStr.js

@ -0,0 +1,15 @@
const category = {
state: {
categoryCode:''
},
mutations: {
setCategoryCode(state,str){
state.categoryCode = str
}
},
actions: {
}
}
export default category

71
src/views/components/resiInfo.vue

@ -824,6 +824,39 @@
</el-col> </el-col>
</el-row> </el-row>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="更新记录">
<el-table
class="m-table-item"
:data="tableData"
border
style="width: 100%"
>
<el-table-column
label="序号"
type="index"
fixed="left"
align="left"
width="50"
>
</el-table-column>
<el-table-column
v-for="item in tableHeader"
:key="item.columnName"
:prop="item.columnName"
:label="item.label"
align="left"
:show-overflow-tooltip="true"
:width="item.width || ''"
>
<template slot-scope="scope">
<span >{{ handleFilterSpan(scope.row, item) }}</span>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
@ -842,9 +875,20 @@ export default {
}, },
data () { data () {
return { return {
tableData:[],//
resiDetailObj:{}, resiDetailObj:{},
activeName:0, activeName:0,
eduInfoDto:{}, eduInfoDto:{},
tableHeader: [
{ columnName: "typeName", label: "变更类型", width: 80 },
{ columnName: "reason", label: "原因", width: 150 },
{ columnName: "createdTime", label: "变更时间", width: 150 },
{ columnName: "beforeChangeName", label: "变更前" , width: 200 },
{ columnName: "afterChangeName", label: "变更后" , width: 200 },
{ columnName: "operatorName", label: "操作人", width: 80 },
{ columnName: "changeTime", label: "调整时间", width: 150 },
{ columnName: "remark", label: "备注", width: 100 },
],
hobbyInfoObj:{}, hobbyInfoObj:{},
residentReligionObj:{}, residentReligionObj:{},
resiHealthInfonObj:{},// resiHealthInfonObj:{},//
@ -1102,6 +1146,17 @@ export default {
}) })
}, },
handleFilterSpan(row, item) {
let _val = "";
if (item.itemType === "radio" && item.options.length > 0) {
item.options.forEach((n) => {
if (n.value === row[item.columnName]) _val = n.label;
});
if (row[item.columnName] == "0") return (_val = "");
}
return _val || row[item.columnName];
},
handleClick(tab){ handleClick(tab){
if(tab.index==0){ if(tab.index==0){
this.getEducation() this.getEducation()
@ -1115,7 +1170,6 @@ export default {
this.getdisabilityNation() this.getdisabilityNation()
this.getillnessNation() this.getillnessNation()
this.getchronicNation() this.getchronicNation()
this.getHealthInfoDetailById() this.getHealthInfoDetailById()
}else if (tab.index == 4){ }else if (tab.index == 4){
this.getResidentWorkInfoObj() this.getResidentWorkInfoObj()
@ -1155,6 +1209,8 @@ export default {
this.getResidentDeathRecord() this.getResidentDeathRecord()
}else if (tab.index == 18){ }else if (tab.index == 18){
this.getResidentMoveOutRecord() this.getResidentMoveOutRecord()
}else if (tab.index == 19){
this.getChangeRecordDetailById()
} }
}, },
async getEduInfoDtoObj(){ async getEduInfoDtoObj(){
@ -1169,7 +1225,18 @@ export default {
console.log(error); console.log(error);
} }
}, },
async getChangeRecordDetailById(){
try {
const {data} = await this.$http.post(`/actual/base/residentChangeRecord/getChangeRecordDetailById/${this.resiId}`)
if(data.data == null){
this.eduInfoDto = []
}else{
this.tableData = data.data
}
} catch (error) {
console.log(error);
}
},
// //
async getResidentHobbyInfoObj(){ async getResidentHobbyInfoObj(){
try { try {

116
src/views/modules/base/resi.vue

@ -44,7 +44,13 @@
<el-col :span="24"> <el-col :span="24">
<el-button <el-button
size="small" size="small"
class="diy-button--blue" type="primary"
@click="handleSearchFrom"
>智能查询</el-button
>
<el-button
size="small"
type="primary"
@click="handleSearchFrom" @click="handleSearchFrom"
>查询</el-button >查询</el-button
> >
@ -52,11 +58,10 @@
<el-button <el-button
style="margin-left: 10px" style="margin-left: 10px"
size="small" size="small"
class="diy-button--white" plain
class=" f-right5"
@click="resetSearchForm" @click="resetSearchForm"
>重置</el-button >重置</el-button>
>
<!-- resetSearchForm -->
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
@ -65,10 +70,11 @@
<div class="div_btn"> <div class="div_btn">
<div class="div_btn_left"> <div class="div_btn_left">
<el-button <el-button
style="height:32px;"
v-if="btnAuths.ic_resi_add" v-if="btnAuths.ic_resi_add"
size="small" size="small"
@click="handleAdd" @click="handleAdd"
class="diy-button--blue" type="primary"
icon="el-icon-plus" icon="el-icon-plus"
> >
新增</el-button 新增</el-button
@ -78,7 +84,7 @@
style="margin-left: 10px" style="margin-left: 10px"
size="small" size="small"
@click="diyExport" @click="diyExport"
class="diy-button--white" plain
>导出</el-button >导出</el-button
> >
@ -120,8 +126,8 @@
style="margin-left: 10px" style="margin-left: 10px"
v-if="btnAuths.ic_resi_batch_del" v-if="btnAuths.ic_resi_batch_del"
size="small" size="small"
plain
@click="deleteBatch" @click="deleteBatch"
class="diy-button--white"
>批量删除</el-button >批量删除</el-button
> >
<!-- <el-button type="primary" size="small">下载人口模板</el-button> --> <!-- <el-button type="primary" size="small">下载人口模板</el-button> -->
@ -212,9 +218,6 @@
{{scope.row.categoryInfo.veteranFlag == 1?'退役军人 ':'' }} {{scope.row.categoryInfo.veteranFlag == 1?'退役军人 ':'' }}
{{scope.row.categoryInfo.volunteerFlag == 1?'志愿者 ':'' }} {{scope.row.categoryInfo.volunteerFlag == 1?'志愿者 ':'' }}
</template> </template>
<template v-else>
--
</template>
</div> </div>
<span v-else>{{ handleFilterSpan(scope.row, item) }}</span> <span v-else>{{ handleFilterSpan(scope.row, item) }}</span>
</template> </template>
@ -224,7 +227,6 @@
<el-button <el-button
v-if="btnAuths.ic_resi_view" v-if="btnAuths.ic_resi_view"
type="text" type="text"
class="div-table-button--blue"
size="small" size="small"
@click="handleLook(scope.row)" @click="handleLook(scope.row)"
>查看</el-button >查看</el-button
@ -235,7 +237,6 @@
v-if="btnAuths.ic_resi_update" v-if="btnAuths.ic_resi_update"
style="margin-right: 10px" style="margin-right: 10px"
@click="handleEdit(scope.row)" @click="handleEdit(scope.row)"
class="div-table-button--blue"
size="small" size="small"
type="text" type="text"
>编辑</el-button >编辑</el-button
@ -247,7 +248,6 @@
@onConfirm="handleDel(scope.row)" @onConfirm="handleDel(scope.row)"
> >
<el-button <el-button
class="div-table-button--blue"
size="small" size="small"
type="text" type="text"
slot="reference" slot="reference"
@ -326,25 +326,7 @@
:resi-id="editUserId" :resi-id="editUserId"
@changegroup="handleChangeGroup" @changegroup="handleChangeGroup"
/> />
<!-- <div v-if="dialogVisible"
class="resi-other">
<div class="tabs-other-info">
<el-tabs v-model="activeName"
@tab-click="handleClick">
<el-tab-pane v-for="item in tabsList"
:key="item.groupId"
:label="item.label"
:name="'group' + item.groupId">
<resi-form :ref="'group' + item.groupId"
:columns="3"
:form-info="item.formInfo && item.formInfo"
:support-add="item.supportAdd"
:form-id="item.columnName"
:form-list="item.itemList" />
</el-tab-pane>
</el-tabs>
</div>
</div> -->
</div> </div>
<div class="resi-btns"> <div class="resi-btns">
@ -358,7 +340,7 @@
<el-button <el-button
size="small" size="small"
@click="handlerCancle" @click="handlerCancle"
class="diy-button--common" plain
>取消</el-button >取消</el-button
> >
<el-button <el-button
@ -367,7 +349,6 @@
size="small" size="small"
:loading="btnLoading" :loading="btnLoading"
@click="handleSUbmit" @click="handleSUbmit"
class="diy-button--blue"
>保存</el-button >保存</el-button
> >
@ -404,8 +385,8 @@
<div class="resi-btns"> <div class="resi-btns">
<el-button <el-button
size="small" size="small"
plain
@click="dialogVisible2 = false" @click="dialogVisible2 = false"
class="diy-button--common"
>关闭</el-button >关闭</el-button
> >
</div> </div>
@ -600,15 +581,15 @@ export default {
props: {}, props: {},
async activated() { // async activated() {
console.log("this.$route.query---", this.$route.query); // console.log("this.$route.query---", this.$route.query);
if (this.$route.query && this.$route.query.columnName) { // if (this.$route.query && this.$route.query.columnName) {
this.searchList = []; // this.searchList = [];
let query = this.$route.query; // let query = this.$route.query;
this.defaultCategotyKey = query.columnName; // this.defaultCategotyKey = query.columnName;
console.log("defaultCategotyKey----", this.defaultCategotyKey); // console.log("defaultCategotyKey----", this.defaultCategotyKey);
} // }
}, // },
computed: { computed: {
...mapGetters(["clientHeight", "iframeHeight"]), ...mapGetters(["clientHeight", "iframeHeight"]),
@ -622,15 +603,13 @@ export default {
async created() { async created() {
this.updateBtnAuths(); this.updateBtnAuths();
if (this.$route.query) { // if (this.$route.query) {
let query = this.$route.query; // let query = this.$route.query;
this.defaultCategotyKey = query.columnName; // this.defaultCategotyKey = query.columnName;
} // }
// await this.getFormList() // await this.getFormList()
// console.log('this.$refs.resiSearch', this) // console.log('this.$refs.resiSearch', this)
this.getTableData();
this.pageLoading = true; this.pageLoading = true;
console.log("storeoooo----0000", this.$store); console.log("storeoooo----0000", this.$store);
}, },
@ -768,7 +747,6 @@ export default {
}, },
selectionChange(selection) { selectionChange(selection) {
this.selection = selection; this.selection = selection;
if (selection.length === this.tableData.length) { if (selection.length === this.tableData.length) {
this.selAllFlag = true; this.selAllFlag = true;
this.isIndeterminate = false; this.isIndeterminate = false;
@ -1259,13 +1237,9 @@ export default {
this.submitAdd(_baseForm); this.submitAdd(_baseForm);
}, },
handleDel(row) { handleDel(row) {
let params = {
formCode: "resi_base_info",
userIds: [row.icResiUserId],
};
console.log("row1", row); console.log("row1", row);
this.$http this.$http
.post("/epmetuser/icresiuser/delete", params) .post("/actual/base/residentBaseInfo/batchdel", [row.resiId])
.then(({ data: res }) => { .then(({ data: res }) => {
console.log("row2", row); console.log("row2", row);
if (res.code !== 0) { if (res.code !== 0) {
@ -1509,7 +1483,6 @@ export default {
} }
}); });
}); });
// }
this.formList = itemList; this.formList = itemList;
this.tabsList = groupList; this.tabsList = groupList;
} }
@ -1557,13 +1530,9 @@ export default {
async deleteresiBatch() { async deleteresiBatch() {
if (this.selection.length === 0) if (this.selection.length === 0)
return this.$message.error("请选择之后进行操作"); return this.$message.error("请选择之后进行操作");
let userIds = this.selection.map((item) => item.icResiUserId); let userIds = this.selection.map((item) => item.resiId);
let params = {
formCode: "resi_base_info",
userIds,
};
this.$http this.$http
.post("/epmetuser/icresiuser/delete", params) .post("/actual/base/residentBaseInfo/batchdel", userIds)
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg); return this.$message.error(res.msg);
@ -1578,6 +1547,21 @@ export default {
}); });
}, },
}, },
watch: {
'$route': {
handler: function (newVal, oldVal){
if(newVal.name == "base-resi"){
this.getTableData({categoryKey:this.$store.state.categoryStr.categoryCode||'',pageNo: this.currentPage,
pageSize: this.pageSize})
// this.$refs.myResiSearch.form.categoryKey.push(this.$store.state.categoryStr.categoryCode)
this.$store.commit('setCategoryCode','')
}
},
deep: true,
immediate: true
}
},
}; };
</script> </script>
@ -1650,9 +1634,7 @@ export default {
.collapse-title { .collapse-title {
font-weight: bold; font-weight: bold;
} }
::v-deep .el-button--text {
color: #000;
}
.resi-table { .resi-table {
::v-deep .el-button--text { ::v-deep .el-button--text {
text-decoration: underline; text-decoration: underline;

4
vue.config.js

@ -3,7 +3,7 @@
*/ */
const IS_PROD = ['production', 'test'].includes(process.env.NODE_ENV) const IS_PROD = ['production', 'test'].includes(process.env.NODE_ENV)
module.exports = { module.exports = {
baseUrl: process.env.NODE_ENV === 'production' ? '' : '/epmet-oper', baseUrl: process.env.NODE_ENV === 'production' ? '' : '/epmet-work-pc',
css: { css: {
// 是否使用css分离插件 ExtractTextPlugin // 是否使用css分离插件 ExtractTextPlugin
extract: IS_PROD, extract: IS_PROD,
@ -23,7 +23,7 @@ module.exports = {
.loader('svg-sprite-loader') .loader('svg-sprite-loader')
}, },
productionSourceMap: false, productionSourceMap: false,
outputDir: 'dist', outputDir: 'epmet-work-pc',
assetsDir: 'static', assetsDir: 'static',
devServer: { devServer: {
open: true, open: true,

Loading…
Cancel
Save