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 app from "./modules/app";
import tagsView from "./modules/tagsView";
import categoryStr from "./modules/categoryStr";
import { requestPost } from "@/js/dai/request";
import { dateFormats } from "@/utils/index";
@ -44,6 +45,7 @@ export default new Vuex.Store({
user,
app,
tagsView,
categoryStr,
},
mutations: {
// 重置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-row>
</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>
</div>
@ -842,9 +875,20 @@ export default {
},
data () {
return {
tableData:[],//
resiDetailObj:{},
activeName:0,
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:{},
residentReligionObj:{},
resiHealthInfonObj:{},//
@ -1101,6 +1145,17 @@ export default {
console.log(err);
})
},
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){
if(tab.index==0){
@ -1115,7 +1170,6 @@ export default {
this.getdisabilityNation()
this.getillnessNation()
this.getchronicNation()
this.getHealthInfoDetailById()
}else if (tab.index == 4){
this.getResidentWorkInfoObj()
@ -1155,6 +1209,8 @@ export default {
this.getResidentDeathRecord()
}else if (tab.index == 18){
this.getResidentMoveOutRecord()
}else if (tab.index == 19){
this.getChangeRecordDetailById()
}
},
async getEduInfoDtoObj(){
@ -1169,7 +1225,18 @@ export default {
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(){
try {

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

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

4
vue.config.js

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

Loading…
Cancel
Save