ct
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
</template>
|
||||
<template #right>
|
||||
<el-input size="small" placeholder="搜索姓名、手机号" v-model="search.name" clearable
|
||||
@change="page.current=1,getTableData()"/>
|
||||
v-throttle="() => {page.current = 1, getTableData()}"/>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-table :tableData="tableData" :total="page.total" :current.sync="page.current" :size.sync="page.size"
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
</template>
|
||||
<template #right>
|
||||
<el-input size="small" placeholder="搜索名称" v-model="search.name" clearable
|
||||
@change="page.current=1,getTableData()"/>
|
||||
@clear="page.current = 1,search.name = '', getTableData()"
|
||||
v-throttle="() => {page.current = 1, getTableData()}"/>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-table :tableData="tableData" :total="page.total" :current.sync="page.current" :size.sync="page.size"
|
||||
@@ -20,6 +21,12 @@
|
||||
active-color="#5088FF" inactive-color="#D0D4DC"></el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column slot="miniappStatus" align="center" label="状态" width="150">
|
||||
<template v-slot="{ row }">
|
||||
<el-switch v-model="row.miniappStatus" @change="onMiniappStatusChange(row)" active-value="1" inactive-value="0"
|
||||
active-color="#5088FF" inactive-color="#D0D4DC"></el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column slot="options" align="center" label="操作" fixed="right" width="200px">
|
||||
<el-row type="flex" justify="center" align="middle" slot-scope="{row}">
|
||||
<el-button type="text" @click="detail(row)">详情</el-button>
|
||||
@@ -90,6 +97,12 @@
|
||||
<el-radio label="0">禁用</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="小程序状态" prop="miniappStatus">
|
||||
<el-radio-group v-model.trim="dialogForm.miniappStatus">
|
||||
<el-radio label="1">启用</el-radio>
|
||||
<el-radio label="0">禁用</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ai-dialog>
|
||||
|
||||
@@ -164,6 +177,7 @@ export default {
|
||||
{prop: "lng", label: "经度", width: 100},
|
||||
{prop: "address", label: "中心点", width: 100},
|
||||
{slot: "status",},
|
||||
{slot: "miniappStatus",},
|
||||
{prop: "createTime", label: "创建时间", width: 150},
|
||||
{slot: "options"},
|
||||
]
|
||||
@@ -181,6 +195,7 @@ export default {
|
||||
miniappSecret: [{required: true, message: "请填写小程序SECRET"}],
|
||||
dvcpUrl: [{required: true, message: "请填写访问域名"}],
|
||||
status: [{required: true, message: "请选择状态", trigger: "change"}],
|
||||
miniappStatus: [{required: true, message: "请选择小程序状态", trigger: "change"}],
|
||||
areaId: [{required: true, message: "请选择地区", trigger: "change"}],
|
||||
lat: [{required: true, message: "请选择中心点"}],
|
||||
}
|
||||
@@ -271,6 +286,20 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
onMiniappStatusChange(row) {
|
||||
this.instance.post(`/app/appdvcpconfig/setMiniappStatus`, null, {
|
||||
params: {
|
||||
id: row.id,
|
||||
status: row.miniappStatus
|
||||
}
|
||||
}).then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success(+row.miniappStatus ? '已启用' : '已禁用');
|
||||
this.getTableData();
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
add() {
|
||||
this.dialogForm = {};
|
||||
this.dialog = true;
|
||||
|
||||
@@ -137,7 +137,7 @@ export default {
|
||||
this.instance.post(this.top.actions.modify, null, {
|
||||
params: {...this.form, menus}
|
||||
}).then(res => {
|
||||
if (res?.msg == "success") {
|
||||
if (res?.code == 0) {
|
||||
this.$message.success(`${this.msgTitle}应用角色成功`)
|
||||
this.back()
|
||||
this.top.searchList()
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<ai-empty v-else>请选择应用</ai-empty>
|
||||
</el-row>
|
||||
<div v-if="dialog" class="sign-box">
|
||||
<ai-sign style="margin: auto" :instance="$axios" :action="{login:'/auth/oauth/token?corpId=ww596787bb70f08288'}"
|
||||
<ai-sign style="margin: auto" :instance="$axios" :action="{login}"
|
||||
visible @login="getToken" :showScanLogin="false"/>
|
||||
</div>
|
||||
<el-button type="info" v-if="!showTools" class="fixedBtn" @click="showTools=true">显示工具栏</el-button>
|
||||
@@ -45,6 +45,11 @@ export default {
|
||||
},
|
||||
selectedApp() {
|
||||
return this.$route.matched.length > 0
|
||||
},
|
||||
login() {
|
||||
let url = '/auth/oauth/token';
|
||||
/project\/sass/g.test(location.pathname) && (url += "?corpId=ww596787bb70f08288")
|
||||
return url
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -70,7 +75,7 @@ export default {
|
||||
this.$axios.post("/admin/user/detail-phone").then(res => {
|
||||
if (res && res.data) {
|
||||
this.$store.commit("setUserInfo", res.data)
|
||||
if (/^\/xiushan/.test(location.pathname)) {
|
||||
if (/^\/project\/xiushan/.test(location.pathname)) {
|
||||
this.$store.commit("setFinanceUser")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ import Vue from 'vue';
|
||||
import App from './App.vue';
|
||||
import ui from 'element-ui';
|
||||
import router from './router/router';
|
||||
import apps from './entries';
|
||||
import axios from './router/axios';
|
||||
import utils from './utils';
|
||||
import vcUI from 'dvcp-ui';
|
||||
@@ -14,7 +13,6 @@ import dataV from '@jiaminghi/data-view';
|
||||
|
||||
Vue.use(dataV);
|
||||
|
||||
Vue.use(apps);
|
||||
Vue.use(ui);
|
||||
Vue.use(vcUI);
|
||||
Vue.use(dvUI);
|
||||
@@ -25,7 +23,7 @@ Vue.prototype.formatContent = (val) => val.replace(/(\r\n)|(\n)/g, '<br>');
|
||||
Object.keys(utils).map((e) => (Vue.prototype[e] = utils[e]));
|
||||
utils.$store.init(store);
|
||||
new Vue({
|
||||
router,
|
||||
store,
|
||||
render: (h) => h(App)
|
||||
router,
|
||||
store,
|
||||
render: (h) => h(App)
|
||||
}).$mount('#app');
|
||||
|
||||
@@ -21,8 +21,9 @@ export default {
|
||||
let {name, label} = files(path).default,
|
||||
addApp = {
|
||||
name, label: label || name,
|
||||
path: path.replace(/\.(\/.+\/App.+)\.vue$/, '$1'),
|
||||
entry: 'appEntry'
|
||||
path: path.replace(/\.(\/.+\/App.+)\.vue$/, '/packages$1'),
|
||||
entry: 'appEntry',
|
||||
module: files(path).default
|
||||
}
|
||||
//命名规范入口文件必须以App开头
|
||||
store.commit("addApp", addApp)
|
||||
@@ -34,8 +35,9 @@ export default {
|
||||
let {name, label} = cores(path).default,
|
||||
addApp = {
|
||||
name, label: label || name,
|
||||
path: path.replace(/\.(\/.+\/App.+)\.vue$/, '$1'),
|
||||
entry: 'appEntry'
|
||||
path: path.replace(/\.(\/.+\/App.+)\.vue$/, '/core$1'),
|
||||
entry: 'appEntry',
|
||||
module: cores(path).default
|
||||
}
|
||||
//命名规范入口文件必须以App开头
|
||||
store.commit("addApp", addApp)
|
||||
@@ -46,9 +48,10 @@ export default {
|
||||
if (project(path).default) {
|
||||
let {name, label} = project(path).default,
|
||||
addApp = {
|
||||
name, label: label || name,
|
||||
path: path.replace(/\.(\/.+\/App.+)\.vue$/, '$1'),
|
||||
entry: 'appEntry'
|
||||
name: [path.replace(/\.\/([^\/]+)\/.*/, '$1'), name].join("_"), label: label || name,
|
||||
path: path.replace(/\.(\/.+\/App.+)\.vue$/, '/project$1'),
|
||||
entry: 'appEntry',
|
||||
module: project(path).default
|
||||
}
|
||||
//命名规范入口文件必须以App开头
|
||||
store.commit("addApp", addApp)
|
||||
|
||||
@@ -9,9 +9,12 @@ let baseURLs = {
|
||||
instance.defaults.baseURL = baseURLs[process.env.NODE_ENV]
|
||||
instance.interceptors.request.eject(0);
|
||||
instance.interceptors.request.use(config => {
|
||||
if (/^\/xiushan/.test(location.pathname)) {
|
||||
if (/\/xiushan/.test(location.pathname)) {
|
||||
config.baseURL = "/xsjr"
|
||||
config.url = config.url.replace(/(app|auth|admin)\//, "")
|
||||
}else if (/project\/oms/.test(location.pathname)) {
|
||||
config.baseURL = "/omsapi"
|
||||
config.url = config.url.replace(/(app|auth|admin)\//, "")
|
||||
}
|
||||
if (!config.withoutToken && localStorage.getItem("ui-token")) {
|
||||
config.headers['Authorization'] = ["Bearer", localStorage.getItem("ui-token")].join(" ")
|
||||
|
||||
@@ -7,12 +7,16 @@
|
||||
|
||||
<script>
|
||||
|
||||
import {mapState} from "vuex";
|
||||
|
||||
export default {
|
||||
name: "appEntry",
|
||||
label: "应用库-应用",
|
||||
computed: {
|
||||
...mapState(['apps']),
|
||||
app() {
|
||||
return this.$route.name
|
||||
let app = this.apps.find(e => e.name == this.$route.name)
|
||||
return app ? app.module : ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
"main": "lib/cw-webapps.common.js",
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
"serve:oms": "npx cross-env NODE_ENV=oms vue-cli-service serve",
|
||||
"build": "vue-cli-service build",
|
||||
"lib": "vue-cli-service build --no-clean --target lib --dest lib packages/index.js&&npm unpublish --force&&npm publish",
|
||||
"lib:core": "vue-cli-service build --target lib --dest core/dist core/index.js --name vc-app-core&&npm unpublish --force&&npm publish",
|
||||
"lib:project": "node project/build.js",
|
||||
@@ -55,6 +53,7 @@
|
||||
"image-webpack-loader": "^6.0.0",
|
||||
"inquirer": "^6.5.2",
|
||||
"node-sass": "npm:sass@^1.43.4",
|
||||
"readline": "^1.3.0",
|
||||
"sass-loader": "^7.1.0",
|
||||
"uglifyjs-webpack-plugin": "^2.2.0",
|
||||
"v-viewer": "^1.6.4",
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
</template>
|
||||
<template slot="right">
|
||||
<el-input v-model="search.messageName" size="small" placeholder="媒资名称" clearable
|
||||
@keyup.enter.native=";(page.current = 1), getList()"
|
||||
v-throttle="() => {page.current = 1, getList()}"
|
||||
@clear=";(page.current = 1), (search.messageName = ''), getList()"
|
||||
suffix-icon="iconfont iconSearch"/>
|
||||
</template>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
<template #right>
|
||||
<el-input v-model="search.houseCode" size="small" placeholder="请输入户号/户主" clearable
|
||||
@keyup.enter.native=";(page.current = 1), getList()"
|
||||
v-throttle="() => {page.current = 1, getList()}"
|
||||
@clear=";(page.current = 1), (search.houseCode = ''), getList()" suffix-icon="iconfont iconSearch"/>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
|
||||
@@ -17,7 +17,14 @@
|
||||
|
||||
<!-- 搜索 -->
|
||||
<template slot="right">
|
||||
<el-input v-model="search.managerName" size="small" placeholder="楼栋号/楼长/联系方式" clearable @keyup.enter.native=";(page.current = 1), getList()" @clear=";(page.current = 1), (search.managerName = ''), getList()" suffix-icon="iconfont iconSearch" />
|
||||
<el-input
|
||||
v-model="search.managerName"
|
||||
size="small"
|
||||
placeholder="楼栋号/楼长/联系方式"
|
||||
clearable
|
||||
v-throttle="() => {page.current = 1, getList()}"
|
||||
@clear=";(page.current = 1), (search.managerName = ''), getList()"
|
||||
suffix-icon="iconfont iconSearch" />
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
</div>
|
||||
<b>{{ item.title }}</b>
|
||||
<p>{{ item.description }}</p>
|
||||
<div class="visit-imgs">
|
||||
<div class="visit-imgs" v-if="item.images.length">
|
||||
<ai-uploader v-model="item.images" :instance="instance" :limit="9" disabled/>
|
||||
</div>
|
||||
<div class="visit-status">
|
||||
@@ -186,6 +186,11 @@ export default {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
b {
|
||||
display: block;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.visit-item__top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
225
packages/2.0.5/AppCodeGeneration/components/Add.vue
vendored
225
packages/2.0.5/AppCodeGeneration/components/Add.vue
vendored
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<ai-detail v-if="pageShow">
|
||||
<ai-detail v-if="pageShow" class="add-form">
|
||||
<template #title>
|
||||
<ai-title :title="params.id ? '编辑'+colData.applicationName : '新增' + colData.applicationName" isShowBottomBorder
|
||||
isShowBack @onBackClick="onBack(true)"></ai-title>
|
||||
@@ -13,57 +13,82 @@
|
||||
<el-form-item :label="item.fieldName" :prop="item.fieldDbName" style="width: 100%">
|
||||
<!-- 字典下拉选择 -->
|
||||
<template v-if="item.type == 'dict'">
|
||||
<ai-select v-model="formData[item.fieldDbName]" :placeholder="item.fieldName" :selectList="dict.getDict(item.dict)" :disabled="item.disable == 1" />
|
||||
<ai-select v-model="formData[item.fieldDbName]" :placeholder="item.fieldName" :selectList="dict.getDict(item.dict)" :disabled="item.disable == 1 || !!(formData.resident_id && item.isInit)" />
|
||||
</template>
|
||||
<!-- 单选radio -->
|
||||
<template v-else-if="item.type == 'radio'">
|
||||
<el-radio-group v-model="formData[item.fieldDbName]" :disabled="item.disable == 1">
|
||||
<el-radio-group v-model="formData[item.fieldDbName]" :disabled="item.disable == 1 || !!(formData.resident_id && item.isInit)">
|
||||
<el-radio :label="item.dictValue" v-for="(item, i) in dict.getDict(item.dict)" :key="i">{{ item.dictName }}</el-radio>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
<!-- 开关onOff -->
|
||||
<template v-else-if="item.type == 'onOff'">
|
||||
<el-switch v-model="formData[item.fieldDbName]" active-color="#26f" inactive-color="#ddd" active-value="1" inactive-value="0" :disabled="item.disable == 1"></el-switch>
|
||||
<el-switch v-model="formData[item.fieldDbName]" active-color="#26f" inactive-color="#ddd" active-value="1" inactive-value="0" :disabled="item.disable == 1 || !!(formData.resident_id && item.isInit)"></el-switch>
|
||||
</template>
|
||||
<!-- 多选checkbox -->
|
||||
<template v-else-if="item.type == 'checkbox'">
|
||||
<el-checkbox-group v-model="formData[item.fieldDbName]" :disabled="item.disable == 1">
|
||||
<el-checkbox-group v-model="formData[item.fieldDbName]" :disabled="item.disable == 1 || !!(formData.resident_id && item.isInit)">
|
||||
<el-checkbox v-for="(item, i) in dict.getDict(item.dict)" :label="item.dictValue" :key="i">
|
||||
{{ item.dictName }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</template>
|
||||
<!-- 身份证输入框 -->
|
||||
<!-- 网格 -->
|
||||
<template v-else-if="item.type === 'gird'">
|
||||
<el-input disabled :value="girdName" size="small" placeholder="请选择网格">
|
||||
<template slot="append">
|
||||
<el-button size="small" @click="showGrid = true, treeObj.checkedKeys = formData[item.fieldDbName] ? [formData[item.fieldDbName]] : [], gridFieldName = item.fieldDbName">选择网格</el-button>
|
||||
</template>
|
||||
</el-input>
|
||||
</template>
|
||||
<template v-else-if="item.type === 'resident'">
|
||||
<el-input
|
||||
v-model="formData.name"
|
||||
:placeholder="'请选择'+item.fieldName">
|
||||
<template slot="append">
|
||||
<ai-person-select
|
||||
:instance="instance"
|
||||
:disabled="!!params.id"
|
||||
:url="'/app/appresident/list?auditType=1&areaId=' + user.info.areaId"
|
||||
:isMultiple="false" dialogTitle="选择" @selectPerson="onChange">
|
||||
<template name="option" v-slot:option="{ item }">
|
||||
<span class="iconfont iconProlife">{{ item.name }}</span>
|
||||
<ai-id mode="show" :show-eyes="false" :value="item.idNumber"/>
|
||||
</template>
|
||||
</ai-person-select>
|
||||
</template>
|
||||
</el-input>
|
||||
</template>
|
||||
<template v-else-if="item.type == 'idNumber'">
|
||||
<ai-id v-model="formData[item.fieldDbName]" :disabled="item.disable == 1" />
|
||||
<ai-id v-model="formData[item.fieldDbName]" :disabled="item.disable == 1 || !!(formData.resident_id && item.isInit)" />
|
||||
</template>
|
||||
<!-- input输入框 -->
|
||||
<template v-else-if="item.type == 'input' || item.type == 'name' || item.type == 'phone'">
|
||||
<el-input v-model="formData[item.fieldDbName]" :placeholder="'请输入'+item.fieldName" clearable :disabled="item.disable == 1"
|
||||
<el-input v-model="formData[item.fieldDbName]" :placeholder="'请输入'+item.fieldName" clearable :disabled="item.disable == 1 || !!(formData.resident_id && item.isInit)"
|
||||
:maxlength="item.maxLength" show-word-limit></el-input>
|
||||
</template>
|
||||
<!-- number 输入框 -->
|
||||
<template v-else-if="item.type == 'number'">
|
||||
<el-input-number v-model="formData[item.fieldDbName]" :label="'请输入'+item.fieldName" :disabled="item.disable == 1" :precision="item.decimalPlaces" :max="item.maxValue" :min="item.minValue"></el-input-number>
|
||||
<el-input-number v-model="formData[item.fieldDbName]" :label="'请输入'+item.fieldName" :disabled="item.disable == 1 || !!(formData.resident_id && item.isInit)" :precision="item.decimalPlaces" :max="item.maxValue" :min="item.minValue"></el-input-number>
|
||||
</template>
|
||||
<!-- textarea输入框 -->
|
||||
<template v-else-if="item.type == 'textarea' || item.type == 'text'">
|
||||
<el-input v-model="formData[item.fieldDbName]" :placeholder="'请输入'+item.fieldName" clearable :disabled="item.disable == 1"
|
||||
<el-input v-model="formData[item.fieldDbName]" :placeholder="'请输入'+item.fieldName" clearable :disabled="item.disable == 1 || !!(formData.resident_id && item.isInit)"
|
||||
:maxlength="item.maxLength" type="textarea" show-word-limit :rows="3"></el-input>
|
||||
</template>
|
||||
<!-- 日期选择 -->
|
||||
<template v-else-if="item.type == 'date'">
|
||||
<el-date-picker v-model="formData[item.fieldDbName]" type="date" placeholder="请选择" :disabled="item.disable == 1"
|
||||
<el-date-picker style="width: 100%;" v-model="formData[item.fieldDbName]" type="date" placeholder="请选择" :disabled="item.disable == 1 || !!(formData.resident_id && item.isInit)"
|
||||
:value-format="item.timePattern"></el-date-picker>
|
||||
</template>
|
||||
<!-- 日期带时分秒选择 -->
|
||||
<template v-else-if="item.type == 'datetime'">
|
||||
<el-date-picker v-model="formData[item.fieldDbName]" type="datetime" placeholder="选择日期时间" :disabled="item.disable == 1"
|
||||
<el-date-picker v-model="formData[item.fieldDbName]" type="datetime" placeholder="选择日期时间" :disabled="item.disable == 1 || !!(formData.resident_id && item.isInit)"
|
||||
:value-format="item.timePattern"></el-date-picker>
|
||||
</template>
|
||||
<!-- 时间-时分秒选择 -->
|
||||
<template v-else-if="item.type == 'time'">
|
||||
<el-time-picker v-model="formData[item.fieldDbName]" placeholder="请选择" :disabled="item.disable == 1"
|
||||
<el-time-picker v-model="formData[item.fieldDbName]" placeholder="请选择" :disabled="item.disable == 1 || !!(formData.resident_id && item.isInit)"
|
||||
:value-format="item.timePattern"></el-time-picker>
|
||||
</template>
|
||||
<!-- 附件 -->
|
||||
@@ -74,11 +99,11 @@
|
||||
</template>
|
||||
<!-- 富文本 -->
|
||||
<template v-else-if="item.type == 'rtf'">
|
||||
<ai-editor v-model="formData[item.fieldDbName]" :instance="instance"/>
|
||||
<ai-editor v-model="formData[item.fieldDbName]" :instance="instance" :disabled="item.disable == 1 || !!(formData.resident_id && item.isInit)"/>
|
||||
</template>
|
||||
<!-- 地区选择 -->
|
||||
<template v-else-if="item.type == 'area'">
|
||||
<ai-area-get :instance="instance" v-model="formData[item.fieldDbName]" :name.sync="formData[item.fieldDbName +'_name']" :disabled="item.disable == 1"/>
|
||||
<ai-area-get :instance="instance" v-model="formData[item.fieldDbName]" :name.sync="formData[item.fieldDbName +'_name']" :disabled="item.disable == 1 || !!(formData.resident_id && item.isInit)"/>
|
||||
</template>
|
||||
<!-- 人员选择 -->
|
||||
<div class="especial" v-else-if="item.type == 'user'">
|
||||
@@ -92,10 +117,31 @@
|
||||
</template>
|
||||
</ai-card>
|
||||
</el-form>
|
||||
<ai-dialog
|
||||
title="选择网格"
|
||||
:visible.sync="showGrid"
|
||||
:destroyOnClose="true"
|
||||
@close="showGrid = false"
|
||||
@onConfirm="getCheckedTree"
|
||||
width="720px">
|
||||
<div class="grid">
|
||||
<el-tree
|
||||
:data="treeObj.treeList"
|
||||
:props="treeObj.defaultProps"
|
||||
node-key="id"
|
||||
ref="tree"
|
||||
:check-strictly="true"
|
||||
show-checkbox
|
||||
:default-checked-keys="treeObj.checkedKeys"
|
||||
default-expand-all
|
||||
@check="onCheckChange">
|
||||
</el-tree>
|
||||
</div>
|
||||
</ai-dialog>
|
||||
</template>
|
||||
<template #footer>
|
||||
<el-button class="delete-btn footer-btn" @click="onBack">取消</el-button>
|
||||
<el-button class="footer-btn" type="primary" @click="submit('formData')">提交</el-button>
|
||||
<el-button class="footer-btn" type="primary" :loading="isLoading" @click="submit('formData')">提交</el-button>
|
||||
</template>
|
||||
</ai-detail>
|
||||
</template>
|
||||
@@ -115,14 +161,28 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
formData: {},
|
||||
formData: {
|
||||
age: 2
|
||||
},
|
||||
pickerOptions0: {
|
||||
disabledDate(time) {
|
||||
return time.getTime() < Date.now() - 8.64e7;
|
||||
}
|
||||
},
|
||||
isLoading: false,
|
||||
girdName: '',
|
||||
gridFieldName: '',
|
||||
showGrid: false,
|
||||
formDataList: [],
|
||||
pageShow: false,
|
||||
pageShow: true,
|
||||
treeObj: {
|
||||
treeList: [],
|
||||
defaultProps: {
|
||||
children: "girdList",
|
||||
label: "girdName",
|
||||
},
|
||||
checkedKeys: [],
|
||||
},
|
||||
colData: {},
|
||||
areaId: ''
|
||||
}
|
||||
@@ -141,12 +201,77 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getGridList()
|
||||
this.getFormData()
|
||||
if (this.params.id) {
|
||||
this.getDetail()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getGridList() {
|
||||
this.instance.post(`/app/appgirdinfo/listAll`).then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.treeObj.treeList = this.format(res.data)
|
||||
if (this.formData.girdId) {
|
||||
this.$set(this.treeObj, 'checkedKeys', [this.formData.girdId])
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onChange (e) {
|
||||
this.formData.resident_id = e.id
|
||||
Object.keys(this.formData).forEach(item => {
|
||||
for (var p in e){
|
||||
if (item === p) {
|
||||
this.$set(this.formData, item, e[item])
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
const idNumberInfo = this.idCardNoUtil.getIdCardInfo(e.idNumber)
|
||||
this.$set(this.formData, 'birthDate', idNumberInfo.birthday)
|
||||
this.formData.photo = e.photo ? [{
|
||||
url: e.photo
|
||||
}] : []
|
||||
},
|
||||
getCheckedTree() {
|
||||
const gird = this.$refs.tree.getCheckedNodes()
|
||||
|
||||
if (gird.length) {
|
||||
this.girdName = gird[0].girdName
|
||||
this.formData[this.gridFieldName] = gird[0].id
|
||||
} else {
|
||||
this.girdName = ''
|
||||
this.formData[this.gridFieldName] = ''
|
||||
}
|
||||
|
||||
this.showGrid = false
|
||||
},
|
||||
|
||||
onCheckChange (e) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.tree.getCheckedKeys().forEach(v => {
|
||||
this.$refs.tree.setChecked(v, false)
|
||||
})
|
||||
this.$refs.tree.setChecked(e.id, true)
|
||||
})
|
||||
},
|
||||
|
||||
format (list) {
|
||||
return list.map(item => {
|
||||
if (item.girdLevel !== '2') {
|
||||
item.disabled = true
|
||||
}
|
||||
|
||||
if (item.girdList && item.girdList.length) {
|
||||
item.girdList = this.format(item.girdList)
|
||||
}
|
||||
|
||||
return item
|
||||
})
|
||||
},
|
||||
|
||||
initForm(data) {
|
||||
this.colData = data
|
||||
let dictList = []
|
||||
@@ -184,6 +309,11 @@ export default {
|
||||
colItem.fieldValue = val
|
||||
}
|
||||
|
||||
} else if (item.type === 'upload') {
|
||||
colItem = {
|
||||
...item,
|
||||
fieldValue: []
|
||||
}
|
||||
} else if (item.type == 'onOff') {
|
||||
colItem = {
|
||||
...item,
|
||||
@@ -195,8 +325,10 @@ export default {
|
||||
colItem = {
|
||||
...item,
|
||||
type: item.type,
|
||||
min: item.minValue || '',
|
||||
max: item.maxValue || ''
|
||||
min: item.minValue || 1,
|
||||
max: item.maxValue || 1000000000,
|
||||
minValue: item.minValue || 1,
|
||||
maxValue: item.maxValue || 1000000000
|
||||
}
|
||||
if (!this.params.id) {
|
||||
colItem.fieldValue = Number(item.defaultValue) || 0
|
||||
@@ -222,7 +354,11 @@ export default {
|
||||
}
|
||||
// console.log(colItem)
|
||||
formList[item.groupIndex]?.push(colItem) || (formList[item.groupIndex] = [colItem])
|
||||
this.$set(this.formData, colItem.fieldDbName, colItem.fieldValue || "")
|
||||
if (item.type === 'number') {
|
||||
this.$set(this.formData, item.fieldDbName, 1)
|
||||
} else {
|
||||
this.$set(this.formData, item.fieldDbName, colItem.fieldValue || '')
|
||||
}
|
||||
})
|
||||
this.formDataList = Object.values(formList)
|
||||
|
||||
@@ -240,12 +376,28 @@ export default {
|
||||
getDetail() {
|
||||
this.instance.post(`/app/appapplicationinfo/queryDetailById?appId=${this.appId}&id=${this.params.id}`).then((res) => {
|
||||
if (res?.data) {
|
||||
this.formData = res.data
|
||||
this.configs.tableInfos.map((item) => {
|
||||
this.formData[item.fieldDbName] = res.data[item.fieldDbName] || ''
|
||||
if(item.type == 'checkbox') {
|
||||
var checkList = this.formData[item.fieldDbName]?.split(',')
|
||||
this.formData[item.fieldDbName] = checkList
|
||||
}
|
||||
|
||||
if (item.type === 'gird' && this.formData[item.fieldDbName]) {
|
||||
this.girdName = res.data[`${item.fieldDbName}_name`]
|
||||
}
|
||||
|
||||
if (item.type === 'upload' && !this.formData[item.fieldDbName]) {
|
||||
this.formData[item.fieldDbName] = []
|
||||
}
|
||||
|
||||
if (item.type === 'upload' && this.formData[item.fieldDbName]) {
|
||||
this.formData[item.fieldDbName] = this.formData[item.fieldDbName].split(',').map(v => {
|
||||
return {
|
||||
url: v
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -258,18 +410,19 @@ export default {
|
||||
submit() {
|
||||
this.$refs.formData?.validate((valid) => {
|
||||
if (valid) {
|
||||
this.isLoading = true
|
||||
this.formDataList.map((item) => {
|
||||
if (item.length) {
|
||||
item.map((items) => {
|
||||
if (items.type == 'checkbox' && this.formData[items.fieldDbName].length) { //多选
|
||||
this.formData[items.fieldDbName] = this.formData[items.fieldDbName]?.toString()
|
||||
}
|
||||
if (items.type == 'upload' && this.formData[items.fieldDbName].length) { //附件 只传id
|
||||
var files = []
|
||||
this.formData[items.fieldDbName].map((item) => {
|
||||
files.push(item.id)
|
||||
})
|
||||
this.formData[items.fieldDbName] = files.join(',')
|
||||
if (items.type == 'upload') {
|
||||
this.formData[items.fieldDbName] = this.formData[items.fieldDbName].map(v => v.url).join(',')
|
||||
}
|
||||
|
||||
if(items.type == 'gird' && this.formData[items.fieldDbName]) {
|
||||
this.formData[items.fieldDbName] = this.formData[items.fieldDbName] + '_' + this.girdName
|
||||
}
|
||||
if(items.type == 'area' && this.formData[items.fieldDbName]) {
|
||||
var area = []
|
||||
@@ -284,12 +437,15 @@ export default {
|
||||
...this.formData,
|
||||
id: this.params.id || ''
|
||||
}).then((res) => {
|
||||
this.isLoading = false
|
||||
if (res.code == 0) {
|
||||
this.$message.success('提交成功')
|
||||
setTimeout(() => {
|
||||
this.onBack(true)
|
||||
}, 600)
|
||||
}
|
||||
}).catch(() => {
|
||||
this.isLoading = false
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -314,6 +470,19 @@ export default {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.add-form {
|
||||
::v-deep .AiPersonSelect {
|
||||
.el-button {
|
||||
border-color: transparent;
|
||||
background-color: transparent;
|
||||
color: inherit;
|
||||
border-top: 0;
|
||||
border-bottom: 0;
|
||||
background: transparent;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.especial {
|
||||
margin-bottom: 12px;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<ai-detail v-if="pageShow" isHasSidebar>
|
||||
<ai-detail v-loading="pageShow" isHasSidebar>
|
||||
<template #title>
|
||||
<ai-title :title="colData.applicationName+'详情'" isShowBottomBorder isShowBack @onBackClick="onBack(true)"></ai-title>
|
||||
</template>
|
||||
@@ -7,17 +7,16 @@
|
||||
<AiSidebar :tabTitle="tabTitle" v-model="currIndex" v-if="appType"></AiSidebar>
|
||||
<ai-card v-show="currIndex === 0" :title="items[0].groupName" v-for="(items, indexs) in formDataList" :key="indexs">
|
||||
<template slot="content">
|
||||
<ai-wrapper class="mar-t16" label-width="80px" :columnsNumber="1">
|
||||
<div v-for="(item, index) in items" :key="index" :style="item.grid == 0.5 ? 'width: 50%;': 'width: 100%;'" class="form-div">
|
||||
<ai-info-item :label="item.fieldName+ ':'">
|
||||
<span v-if="item.dict && item.type != 'checkbox'">{{$dict.getLabel(item.dict, formData[item.fieldDbName]) || '-'}}</span>
|
||||
<span v-if="!item.dict && item.type != 'rtf' && item.type != 'upload' && item.type != 'area'">{{formData[item.fieldDbName]}}</span>
|
||||
<span v-if="item.type == 'checkbox'">{{formData[item.fieldDbName]}}</span>
|
||||
<span v-if="item.type == 'rtf'" v-html="formData[item.fieldDbName]"></span>
|
||||
<ai-file-list :fileList="formData[item.fieldDbName]" v-if="item.type == 'upload'" :fileOps="{name: 'name', size: 'fileSizeStr'}"></ai-file-list>
|
||||
<span v-if="item.type == 'area'" v-html="formData[item.fieldDbName+'_name']"></span>
|
||||
</ai-info-item>
|
||||
</div>
|
||||
<ai-wrapper>
|
||||
<ai-info-item :label="item.fieldName" v-show="item.type !== 'resident'" v-for="(item, index) in items" :key="index" :isLine="item.grid == 1">
|
||||
<span v-if="item.dict && item.type != 'checkbox'">{{$dict.getLabel(item.dict, formData[item.fieldDbName]) || '-'}}</span>
|
||||
<span v-else-if="item.type == 'checkbox'">{{formData[item.fieldDbName]}}</span>
|
||||
<span v-else-if="item.type == 'rtf'" v-html="formData[item.fieldDbName]"></span>
|
||||
<ai-file-list :fileList="formData[item.fieldDbName]" v-else-if="item.type == 'upload'" :fileOps="{name: 'name', size: 'fileSizeStr'}"></ai-file-list>
|
||||
<span v-else-if="item.type == 'area'">{{ formData[item.fieldDbName + '_name'] }}</span>
|
||||
<span v-else-if="item.type == 'gird'">{{ formData[item.fieldDbName + '_name'] }}</span>
|
||||
<span v-else>{{ formData[item.fieldDbName] || '-' }}</span>
|
||||
</ai-info-item>
|
||||
</ai-wrapper>
|
||||
</template>
|
||||
</ai-card>
|
||||
@@ -83,7 +82,7 @@
|
||||
},
|
||||
|
||||
mounted () {
|
||||
this.getFormData()
|
||||
this.pageShow = true
|
||||
this.getDetail()
|
||||
},
|
||||
|
||||
@@ -136,7 +135,15 @@
|
||||
}
|
||||
}
|
||||
formList[item.groupIndex]?.push(colItem) || (formList[item.groupIndex] = [colItem])
|
||||
this.$set(this.formData, colItem.fieldDbName, colItem.fieldValue || "")
|
||||
if (item.type === 'upload') {
|
||||
this.$set(this.formData, colItem.fieldDbName, this.formData[colItem.fieldDbName] ? this.formData[colItem.fieldDbName].split(',').map(v => {
|
||||
return {
|
||||
url: v
|
||||
}
|
||||
}) : [])
|
||||
} else {
|
||||
this.$set(this.formData, colItem.fieldDbName, this.formData[colItem.fieldDbName] || "")
|
||||
}
|
||||
})
|
||||
this.formDataList = Object.values(formList)
|
||||
|
||||
@@ -157,13 +164,18 @@
|
||||
this.instance.post(`/app/appapplicationinfo/queryDetailById?appId=${this.appId}&id=${this.params.id}`).then((res) => {
|
||||
if (res?.data) {
|
||||
this.formData = res.data
|
||||
this.getFormData()
|
||||
|
||||
this.pageShow = false
|
||||
}
|
||||
}).catch(() => {
|
||||
this.pageShow = false
|
||||
})
|
||||
},
|
||||
|
||||
getDictList (listName) {
|
||||
this.dict.load(listName.join(',')).then(() => {
|
||||
this.pageShow = true
|
||||
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
@@ -33,6 +33,8 @@
|
||||
</template>
|
||||
<template #right v-if="showRightInput">
|
||||
<el-input :placeholder="placeholder" v-model="search.searchParam" size="small"
|
||||
@keyup.enter.native="$forceUpdate();(page.current = 1), getList()"
|
||||
@clear="$forceUpdate();(page.current = 1), getList()"
|
||||
@change="$forceUpdate();(page.current = 1), getList()" clearable prefix-icon="iconfont iconSearch"/>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
@@ -67,9 +69,10 @@
|
||||
</div>
|
||||
<div v-if="item.type == 'rtf'" v-html="row[item.fieldDbName]"></div>
|
||||
<div v-if="item.type == 'checkbox'">{{ row[item.fieldDbName] }}</div>
|
||||
<div v-if="item.type == 'gird'">{{ row[item.fieldDbName + '_name'] }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column slot="options" label="操作" align="center" width="200">
|
||||
<el-table-column slot="options" label="操作" fixed="right" align="center" width="160">
|
||||
<template slot-scope="{ row }">
|
||||
<div class="table-options">
|
||||
<el-button type="text" @click="toDetail(row, 'Detail')">详情</el-button>
|
||||
|
||||
@@ -42,7 +42,8 @@
|
||||
<div class="grid">
|
||||
<el-tree :data="treeObj.treeList" :props="treeObj.defaultProps" node-key="id" ref="tree"
|
||||
:check-strictly="true" show-checkbox
|
||||
:default-checked-keys="treeObj.checkedKeys" default-expand-all highlight-current>
|
||||
:default-checked-keys="treeObj.checkedKeys" default-expand-all
|
||||
@check="onCheckChange">
|
||||
</el-tree>
|
||||
</div>
|
||||
<div class="dialog-footer" slot="footer">
|
||||
@@ -120,7 +121,7 @@ export default {
|
||||
this.treeObj.checkedKeys = [];
|
||||
this.instance.post(`/app/appgirdinfo/listAll`, null, null).then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.treeObj.treeList = res.data;
|
||||
this.treeObj.treeList = this.format(res.data)
|
||||
if (this.form.girdInfoList.length) {
|
||||
this.form.girdInfoList.map((e) => {
|
||||
this.treeObj.checkedKeys.push(e.id);
|
||||
@@ -129,6 +130,29 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
onCheckChange (e) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.tree.getCheckedKeys().forEach(v => {
|
||||
this.$refs.tree.setChecked(v, false)
|
||||
})
|
||||
this.$refs.tree.setChecked(e.id, true)
|
||||
})
|
||||
},
|
||||
|
||||
format (list) {
|
||||
return list.map(item => {
|
||||
if (item.girdLevel !== '2') {
|
||||
item.disabled = true
|
||||
}
|
||||
|
||||
if (item.girdList && item.girdList.length) {
|
||||
item.girdList = this.format(item.girdList)
|
||||
}
|
||||
|
||||
return item
|
||||
})
|
||||
},
|
||||
getCheckedTree() {
|
||||
if (this.$refs.tree.getCheckedNodes().length > 1) {
|
||||
return this.$message.error('不能绑定多个网格')
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<el-button :disabled="!ids.length" icon="iconfont iconDelete" size="small" @click="removeAll">删除</el-button>
|
||||
</template>
|
||||
<template slot="right">
|
||||
<el-input v-model="search.communityName" class="search-input" size="small" @change=";(search.current = 1), getList()" placeholder="小区名称" suffix-icon="iconfont iconSearch" clearable />
|
||||
<el-input @clear=";(search.current = 1), (search.communityName = ''), getList()" v-throttle="() => {search.current=1,getList()}" v-model="search.communityName" class="search-input" size="small" placeholder="小区名称" suffix-icon="iconfont iconSearch" clearable />
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<ai-search-bar bottomBorder>
|
||||
<template slot="right">
|
||||
<el-input v-model="search.keyword" size="small" placeholder="设备名称/设备编号" clearable
|
||||
@keyup.enter.native=";(page.current = 1), getList()"
|
||||
v-throttle="() => {page.current = 1, getList()}"
|
||||
@clear=";(page.current = 1), (search.keyword = ''), getList()" suffix-icon="iconfont iconSearch"/>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
@@ -23,7 +23,7 @@
|
||||
<template slot-scope="{ row }">
|
||||
<el-button type="text" @click="close(row.id)">停播</el-button>
|
||||
<el-button type="text" @click="bind(row)">绑定行政区划</el-button>
|
||||
<el-button type="text" @click="locate=true">地图标绘</el-button>
|
||||
<!-- <el-button type="text" @click="locate=true">地图标绘</el-button>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
|
||||
6
packages/2.0.5/AppForm/components/Add.vue
vendored
6
packages/2.0.5/AppForm/components/Add.vue
vendored
@@ -16,7 +16,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<basic-info ref="basicInfo" v-model="basicInfo" v-show="currIndex === 0" :dict="dict" :instance="instance"></basic-info>
|
||||
<form-layout class="form-config__wrapper" v-model="tableInfos" ref="form" v-show="currIndex === 1" :dict="dict" :instance="instance"></form-layout>
|
||||
<form-layout :appType="basicInfo.appType" :currIndex="currIndex" class="form-config__wrapper" v-model="tableInfos" ref="form" v-show="currIndex === 1" :dict="dict" :instance="instance"></form-layout>
|
||||
<form-config
|
||||
ref="config"
|
||||
:showListFields="showListFields"
|
||||
@@ -121,7 +121,9 @@
|
||||
menuLevel1Name: res.data.menuLevel1Name,
|
||||
menuLevel3Name: res.data.menuLevel3Name,
|
||||
menuLevel2Name: res.data.menuLevel2Name,
|
||||
appType: res.data.appType
|
||||
appType: res.data.appType,
|
||||
corpId: res.data.corpId,
|
||||
corpName: res.data.corpName
|
||||
}
|
||||
this.fuzzyQueryFields = res.data.fuzzyQueryFields
|
||||
this.tableInfos = res.data.tableInfos
|
||||
|
||||
37
packages/2.0.5/AppForm/components/BasicInfo.vue
vendored
37
packages/2.0.5/AppForm/components/BasicInfo.vue
vendored
@@ -4,7 +4,7 @@
|
||||
<ai-card title="基本信息">
|
||||
<template #content>
|
||||
<div class="ai-form">
|
||||
<el-form-item label="所属平台" prop="saasPlatformId" style="width: 100%;" :rules="[{ required: false, message: '请选择所属平台', trigger: 'change' }]">
|
||||
<el-form-item label="所属平台" prop="saasPlatformId" style="width: 100%;" :rules="[{ required: true, message: '请选择所属平台', trigger: 'change' }]">
|
||||
<el-select
|
||||
size="small"
|
||||
style="width: 100%;"
|
||||
@@ -20,6 +20,15 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.saasPlatformId" style="width: 100%;" label="所属企业" prop="corpId" :rules="[{ required: true, message: '请选择所属企业', trigger: 'change' }]">
|
||||
<ai-select
|
||||
v-model="form.corpId"
|
||||
placeholder="请选择所属企业"
|
||||
clearable
|
||||
@change="onCompanyChange"
|
||||
:selectList="companyList">
|
||||
</ai-select>
|
||||
</el-form-item>
|
||||
<el-form-item style="width: 100%;" label="一级菜单名称" prop="menuLevel1Name" :rules="[{ required: true, message: '请输入一级菜单名称', trigger: 'change' }]">
|
||||
<el-input size="small" placeholder="请输入一级菜单名称" :maxlength="8" v-model="form.menuLevel1Name"></el-input>
|
||||
</el-form-item>
|
||||
@@ -68,8 +77,11 @@
|
||||
menuLevel1Name: '',
|
||||
menuLevel2Name: '',
|
||||
menuLevel3Name: '',
|
||||
appType: ''
|
||||
appType: '',
|
||||
corpId: '',
|
||||
corpName: ''
|
||||
},
|
||||
companyList: [],
|
||||
sassList: []
|
||||
}
|
||||
},
|
||||
@@ -77,6 +89,9 @@
|
||||
watch: {
|
||||
value (v) {
|
||||
this.form = JSON.parse(JSON.stringify(v))
|
||||
if (this.form.saasPlatformId) {
|
||||
this.getCompanyList()
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -92,6 +107,7 @@
|
||||
methods: {
|
||||
onChange (e) {
|
||||
this.form.saasPlatformName = this.sassList.filter(v => v.id === e)[0].name
|
||||
this.form.saasPlatformId && this.getCompanyList()
|
||||
},
|
||||
|
||||
validate () {
|
||||
@@ -103,6 +119,23 @@
|
||||
return result
|
||||
},
|
||||
|
||||
onCompanyChange (e) {
|
||||
this.form.corpName = this.companyList.filter(v => v.dictValue === e)[0].dictName
|
||||
},
|
||||
|
||||
getCompanyList () {
|
||||
this.instance.post(`/app/appCorp/page?current=1&size=1000&saasId=${this.form.saasPlatformId}`).then(res => {
|
||||
if (res.data.records.length) {
|
||||
this.companyList = res.data.records.map(v => {
|
||||
return {
|
||||
dictValue: v.corpId,
|
||||
dictName: v.name
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
getSassList () {
|
||||
this.instance.post(`/app/appSaas/listAll`).then(res => {
|
||||
if (res.data) {
|
||||
|
||||
87
packages/2.0.5/AppForm/components/FormLayout.vue
vendored
87
packages/2.0.5/AppForm/components/FormLayout.vue
vendored
@@ -51,6 +51,7 @@
|
||||
scroll
|
||||
@end="onElEnd"
|
||||
element="div"
|
||||
filter=".components-filter"
|
||||
draggable=".components-item"
|
||||
group="componentsGroup"
|
||||
:sort="true">
|
||||
@@ -58,10 +59,13 @@
|
||||
class="components-item"
|
||||
v-for="(item, i) in group.column"
|
||||
:style="{width: item.grid * 100 + '%'}"
|
||||
:class="[groupIndex === j && activeIndex === i ? 'active' : '']"
|
||||
:class="{
|
||||
'components-filter': item.isInit,
|
||||
'active': groupIndex === j && activeIndex === i
|
||||
}"
|
||||
@click.stop="groupIndex = j, activeIndex = i, isGroup = false"
|
||||
:key="i">
|
||||
<div class="left-item__item--remove" title="删除字段" v-show="groupIndex === j && activeIndex === i" @click.stop="removeItem(j, i)">
|
||||
<div class="left-item__item--remove" title="删除字段" v-show="!item.isInit && groupIndex === j && activeIndex === i" @click.stop="removeItem(j, i)">
|
||||
<i class="iconfont iconDelete"></i>
|
||||
<span>删除字段</span>
|
||||
</div>
|
||||
@@ -69,6 +73,16 @@
|
||||
<template v-if="(item.type === 'textarea')">
|
||||
<el-input :disabled="item.disable === '1'" :rows="item.lineNumber" size="small" type="textarea" :placeholder="item.fieldTips" v-model="item.defaultValue"></el-input>
|
||||
</template>
|
||||
<template v-if="(item.type === 'resident')">
|
||||
<el-input :disabled="item.disable === '1'" size="small" placeholder="请选择人员" v-model="item.defaultValue">
|
||||
<template slot="append">选择人员</template>
|
||||
</el-input>
|
||||
</template>
|
||||
<template v-if="(item.type === 'gird')">
|
||||
<el-input :disabled="item.disable === '1'" size="small" placeholder="请选择网格" v-model="item.defaultValue">
|
||||
<template slot="append">选择网格</template>
|
||||
</el-input>
|
||||
</template>
|
||||
<template v-if="item.type === 'radio'">
|
||||
<el-radio-group v-model="item.defaultValue" :disabled="item.disable === '1'">
|
||||
<el-radio :label="field.label" v-for="(field, index) in item.options" :key="index">{{ field.label }}</el-radio>
|
||||
@@ -110,11 +124,10 @@
|
||||
<template v-if="item.type === 'area'">
|
||||
<ai-area-get
|
||||
:instance="instance"
|
||||
always-show
|
||||
/>
|
||||
always-show />
|
||||
</template>
|
||||
<template v-if="item.type === 'select'">
|
||||
<el-select :disabled="item.disable === '1'" size="small" :placeholder="item.fieldTips" v-model="item.defaultValue">
|
||||
<el-select :disabled="item.disable === '1'" style="width: 100%;" size="small" :placeholder="item.fieldTips" v-model="item.defaultValue">
|
||||
<el-option
|
||||
v-for="(filed, index) in item.options"
|
||||
:key="index"
|
||||
@@ -153,7 +166,7 @@
|
||||
<el-input placeholder="请输入分组名称" :maxlength="32" show-word-limit v-model="currTarget.groupName"></el-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layout-right__del" @click="removeGroup" v-if="isGroup && targetList.length > 1">
|
||||
<div class="layout-right__del" @click="removeGroup" v-if="isGroup && targetList.length > 1 && !currTarget.isInit">
|
||||
<span>删除分组</span>
|
||||
</div>
|
||||
<div class="right-item" v-if="activeIndex > -1">
|
||||
@@ -360,7 +373,9 @@
|
||||
params: Object,
|
||||
type: String,
|
||||
areaId: String,
|
||||
value: Array
|
||||
value: Array,
|
||||
appType: String,
|
||||
currIndex: Number
|
||||
},
|
||||
|
||||
components: {
|
||||
@@ -424,6 +439,12 @@
|
||||
}
|
||||
},
|
||||
|
||||
currIndex (v, oldV) {
|
||||
if (this.appType && !this.value.length && oldV === 0) {
|
||||
this.getInitFileds()
|
||||
}
|
||||
},
|
||||
|
||||
activeIndex () {
|
||||
if (this.activeIndex > -1 && this.groupIndex > -1 && !this.isGroup) {
|
||||
const filed = this.targetList[this.groupIndex].column[this.activeIndex]
|
||||
@@ -509,6 +530,56 @@
|
||||
})
|
||||
},
|
||||
|
||||
getInitFileds () {
|
||||
this.instance.post(`/app/appapplicationinfo/queryInitTable?appType=${this.appType}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
let arr = res.data
|
||||
let groups = this.unique(arr.map(v => v.groupName))
|
||||
this.targetList = groups.map(groupName => {
|
||||
const column = arr.filter(v => v.groupName === groupName).map(item => {
|
||||
if (['select', 'checkbox', 'radio'].includes(item.type)) {
|
||||
item.options = item.selectValues.split('`').map(v => {
|
||||
return {
|
||||
label: v,
|
||||
value: ''
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
if (item.type === 'checkbox' && item.defaultValue) {
|
||||
item.defaultValue = item.defaultValue.split('`')
|
||||
}
|
||||
|
||||
if (item.grid) {
|
||||
item.grid = Number(item.grid)
|
||||
}
|
||||
|
||||
return item
|
||||
})
|
||||
|
||||
return {
|
||||
type: 'group',
|
||||
fieldName: '卡片',
|
||||
fixedLabel: '卡片',
|
||||
icon: 'iconpic',
|
||||
groupName,
|
||||
column: column,
|
||||
isInit: '1'
|
||||
}
|
||||
})
|
||||
|
||||
this.targetList.push({
|
||||
type: 'group',
|
||||
fieldName: '卡片',
|
||||
fixedLabel: '卡片',
|
||||
icon: 'iconpic',
|
||||
groupName: '基础信息',
|
||||
column: []
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onConfirm () {
|
||||
let result = []
|
||||
this.targetList.forEach((group, i) => {
|
||||
@@ -517,7 +588,7 @@
|
||||
...item,
|
||||
groupIndex: i,
|
||||
groupName: group.groupName,
|
||||
fieldDbName: this.isUnique(item.type) ? item.type : `${item.type}${i}${index}`,
|
||||
fieldDbName: item.isInit ? item.fieldDbName : (this.isUnique(item.type) ? item.type : `${item.type}${i}${index}`),
|
||||
defaultValue: item.type === 'checkbox' && item.defaultValue ? item.defaultValue.join('`') : item.defaultValue,
|
||||
selectValues: item.options ? item.options.map(v => v.label).join('`') : ''
|
||||
})
|
||||
|
||||
2
packages/2.0.5/AppForm/components/List.vue
vendored
2
packages/2.0.5/AppForm/components/List.vue
vendored
@@ -12,7 +12,7 @@
|
||||
<el-input
|
||||
v-model="search.applicationName"
|
||||
size="small"
|
||||
@keyup.enter.native="search.current = 1, getList()"
|
||||
v-throttle="() => {search.current = 1, getList()}"
|
||||
placeholder="请输入菜单名称"
|
||||
clearable
|
||||
@clear="search.current = 1, search.applicationName = '', getList()"
|
||||
|
||||
3
packages/2.0.5/AppGridBlock/AppGridBlock.vue
vendored
3
packages/2.0.5/AppGridBlock/AppGridBlock.vue
vendored
@@ -57,7 +57,8 @@ export default {
|
||||
|
||||
this.$nextTick(() => {
|
||||
if (data.isRefresh) {
|
||||
this.$refs.component.getList();
|
||||
this.$refs.component.getList()
|
||||
this.$refs.component.getTreeList()
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
placeholder="输入网格名称"
|
||||
@keyup.enter.native="(page.current = 1), getList()"
|
||||
clearable
|
||||
v-throttle="() => {page.current = 1, getList()}"
|
||||
@clear="(searchObj.girdName = '', page.current = 1), getList()"
|
||||
suffix-icon="iconfont iconSearch"
|
||||
/>
|
||||
|
||||
174
packages/2.0.5/AppGridMember/AppGridMember.vue
vendored
174
packages/2.0.5/AppGridMember/AppGridMember.vue
vendored
@@ -1,79 +1,117 @@
|
||||
<template>
|
||||
<div class="AppGridMember">
|
||||
<keep-alive :include="['List']">
|
||||
<component
|
||||
ref="component"
|
||||
:is="component"
|
||||
@change="onChange"
|
||||
:params="params"
|
||||
:instance="instance"
|
||||
:dict="dict"
|
||||
></component>
|
||||
</keep-alive>
|
||||
</div>
|
||||
<ai-list class="AppGridMember" v-if="!isShowDetail">
|
||||
<template slot="title">
|
||||
<ai-title title="网格员管理" :isShowBottomBorder="false"></ai-title>
|
||||
</template>
|
||||
<template slot="tabs">
|
||||
<el-tabs v-model="currIndex">
|
||||
<el-tab-pane v-for="(tab,i) in tabs" :key="i" :label="tab.label">
|
||||
<component :ref="String(i)" v-if="currIndex == i" :is="tab.comp" @change="onChange" lazy :instance="instance" :dict="dict" :permissions="permissions"/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</template>
|
||||
</ai-list>
|
||||
<Add v-else-if="component === 'Add'" :params="params" :instance="instance" :dict="dict" :permissions="permissions" @change="onChange"></Add>
|
||||
<Family v-else-if="component === 'Family'" :params="params" :instance="instance" :dict="dict" :permissions="permissions" @change="onChange"></Family>
|
||||
<ApplyDetail v-else-if="component === 'ApplyDetail'" :params="params" :instance="instance" :dict="dict" :permissions="permissions" @change="onChange"></ApplyDetail>
|
||||
<ApplyAdd v-else-if="component === 'ApplyAdd'" :params="params" :instance="instance" :dict="dict" :permissions="permissions" @change="onChange"></ApplyAdd>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import List from "./components/list";
|
||||
import Add from "./components/add";
|
||||
import Family from "./components/Family";
|
||||
import List from './components/list'
|
||||
import ApplyList from './components/ApplyList'
|
||||
import Add from './components/add'
|
||||
import ApplyDetail from './components/ApplyDetail'
|
||||
import ApplyAdd from './components/ApplyAdd'
|
||||
import Family from './components/Family'
|
||||
|
||||
export default {
|
||||
name: "AppGridMember",
|
||||
label: "网格管理员",
|
||||
export default {
|
||||
name: "AppGridMember",
|
||||
label: "网格管理员",
|
||||
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
component: "List",
|
||||
params: {},
|
||||
include: [],
|
||||
};
|
||||
},
|
||||
|
||||
components: {
|
||||
Add,
|
||||
List,
|
||||
Family
|
||||
},
|
||||
|
||||
mounted() {},
|
||||
|
||||
methods: {
|
||||
onChange(data) {
|
||||
if (data.type === "Add") {
|
||||
this.component = "Add";
|
||||
this.params = data.params;
|
||||
}
|
||||
|
||||
if (data.type === "Family") {
|
||||
this.component = "Family"
|
||||
this.params = data.params
|
||||
}
|
||||
|
||||
if (data.type === "list") {
|
||||
this.component = "List";
|
||||
this.params = data.params;
|
||||
|
||||
this.$nextTick(() => {
|
||||
if (data.isRefresh) {
|
||||
this.$refs.component.getList();
|
||||
}
|
||||
});
|
||||
}
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
data() {
|
||||
return {
|
||||
component: "List",
|
||||
params: {},
|
||||
include: [],
|
||||
currIndex: '0',
|
||||
isShowDetail: false
|
||||
};
|
||||
},
|
||||
|
||||
computed: {
|
||||
tabs () {
|
||||
const tabList = [
|
||||
{label: '网格员信息', name: 'List', comp: List, permission: ''},
|
||||
// {label: '申报信息', name: 'ApplyList', comp: ApplyList, permission: ''}
|
||||
].filter(item => {
|
||||
return true
|
||||
})
|
||||
|
||||
return tabList
|
||||
}
|
||||
},
|
||||
|
||||
components: {
|
||||
Add,
|
||||
List,
|
||||
Family,
|
||||
ApplyList,
|
||||
ApplyDetail,
|
||||
ApplyAdd
|
||||
},
|
||||
|
||||
mounted() {},
|
||||
|
||||
methods: {
|
||||
onChange(data) {
|
||||
if (data.type === "Add") {
|
||||
this.component = "Add"
|
||||
this.isShowDetail = true
|
||||
this.params = data.params
|
||||
}
|
||||
|
||||
if (data.type === "Family") {
|
||||
this.component = "Family"
|
||||
this.isShowDetail = true
|
||||
this.params = data.params
|
||||
}
|
||||
if (data.type === "ApplyDetail") {
|
||||
this.component = "ApplyDetail"
|
||||
this.isShowDetail = true
|
||||
this.params = data.params
|
||||
}
|
||||
|
||||
if (data.type === "ApplyAdd") {
|
||||
this.component = "ApplyAdd"
|
||||
this.isShowDetail = true
|
||||
this.params = data.params
|
||||
}
|
||||
|
||||
if (data.type === "list") {
|
||||
this.component = "List"
|
||||
this.isShowDetail = false
|
||||
this.params = data.params
|
||||
}
|
||||
|
||||
if (data.type === "ApplyList") {
|
||||
this.component = "ApplyList"
|
||||
this.isShowDetail = false
|
||||
this.params = data.params
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.AppGridMember {
|
||||
height: 100%;
|
||||
background: #f3f6f9;
|
||||
overflow: auto;
|
||||
}
|
||||
.AppGridMember {
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
107
packages/2.0.5/AppGridMember/components/ApplyAdd.vue
vendored
Normal file
107
packages/2.0.5/AppGridMember/components/ApplyAdd.vue
vendored
Normal file
@@ -0,0 +1,107 @@
|
||||
<template>
|
||||
<ai-detail class="content-add">
|
||||
<template slot="title">
|
||||
<ai-title :title="params.id ? '编辑' : '添加'" isShowBack isShowBottomBorder @onBackClick="cancel(false)">
|
||||
</ai-title>
|
||||
</template>
|
||||
<template slot="content">
|
||||
<ai-card title="基本信息">
|
||||
<template #content>
|
||||
<el-form class="ai-form" :model="form" label-width="120px" ref="form">
|
||||
<el-form-item label="姓名" style="width: 100%;" prop="name" :rules="[{required: true, message: '请输入姓名', trigger: 'blur'}]">
|
||||
<el-input size="small" v-model="form.name" placeholder="请输入..." :maxlength="20"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系电话" style="width: 100%;" prop="phone" :rules="[{required: true, message: '请输入联系电话', trigger: 'blur'}]">
|
||||
<el-input size="small" v-model="form.phone" placeholder="请输入..." :maxlength="11"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="网格名称" style="width: 100%;" prop="girdName" :rules="[{required: true, message: '请输入网格名称', trigger: 'blur'}]">
|
||||
<el-input size="small" v-model="form.girdName" placeholder="请输入..." :maxlength="50"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
</ai-card>
|
||||
</template>
|
||||
<template #footer>
|
||||
<el-button @click="cancel">取消</el-button>
|
||||
<el-button type="primary" :loading="isLoading" @click="confirm">提交</el-button>
|
||||
</template>
|
||||
</ai-detail>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'ApplyAdd',
|
||||
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
params: Object
|
||||
},
|
||||
|
||||
data () {
|
||||
return {
|
||||
form: {
|
||||
name: '',
|
||||
phone: '',
|
||||
gridName: ''
|
||||
},
|
||||
isLoading: false,
|
||||
id: ''
|
||||
}
|
||||
},
|
||||
|
||||
created () {
|
||||
if (this.params && this.params.id) {
|
||||
this.id = this.params.id
|
||||
this.getInfo(this.params.id)
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
getInfo (id) {
|
||||
this.instance.post(`/app/appcontentinfo/queryDetailById?id=${id}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.form = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onChange () {
|
||||
this.form.files = []
|
||||
},
|
||||
|
||||
confirm () {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
this.isLoading = true
|
||||
this.instance.post(`/app/appgirdmemberapply/addOrUpdate`, {
|
||||
...this.form,
|
||||
id: this.params.id || ''
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success('提交成功')
|
||||
setTimeout(() => {
|
||||
this.cancel(true)
|
||||
}, 600)
|
||||
} else {
|
||||
this.isLoading = false
|
||||
}
|
||||
}).catch(() => {
|
||||
this.isLoading = false
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
cancel (isRefresh) {
|
||||
this.$emit('change', {
|
||||
type: 'list',
|
||||
isRefresh: !!isRefresh
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
</style>
|
||||
65
packages/2.0.5/AppGridMember/components/ApplyDetail.vue
vendored
Normal file
65
packages/2.0.5/AppGridMember/components/ApplyDetail.vue
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
<template>
|
||||
<ai-detail>
|
||||
<template slot="title">
|
||||
<ai-title title="详情" isShowBack isShowBottomBorder @onBackClick="cancel(false)">
|
||||
</ai-title>
|
||||
</template>
|
||||
<template slot="content">
|
||||
<ai-card title="基本信息">
|
||||
<template #content>
|
||||
<ai-wrapper>
|
||||
<ai-info-item label="姓名" isLine :value="info.name"></ai-info-item>
|
||||
<ai-info-item label="联系电话" isLine :value="info.phone"></ai-info-item>
|
||||
<ai-info-item label="网格名称" isLine :value="info.girdName"></ai-info-item>
|
||||
</ai-wrapper>
|
||||
</template>
|
||||
</ai-card>
|
||||
</template>
|
||||
</ai-detail>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'ApplyDetail',
|
||||
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
params: Object
|
||||
},
|
||||
|
||||
data () {
|
||||
return {
|
||||
info: {},
|
||||
id: ''
|
||||
}
|
||||
},
|
||||
|
||||
created () {
|
||||
if (this.params && this.params.id) {
|
||||
this.id = this.params.id
|
||||
this.getInfo(this.params.id)
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
getInfo (id) {
|
||||
this.instance.post(`/app/appgirdmemberapply/queryDetailById?id=${id}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.info = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
cancel (isRefresh) {
|
||||
this.$emit('change', {
|
||||
type: 'ApplyList',
|
||||
isRefresh: !!isRefresh
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
</style>
|
||||
179
packages/2.0.5/AppGridMember/components/ApplyList.vue
vendored
Normal file
179
packages/2.0.5/AppGridMember/components/ApplyList.vue
vendored
Normal file
@@ -0,0 +1,179 @@
|
||||
<template>
|
||||
<ai-list class="list" isTabs>
|
||||
<template slot="content">
|
||||
<ai-search-bar bottomBorder>
|
||||
<template slot="left">
|
||||
<el-button
|
||||
icon="iconfont iconAdd"
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="add('')">添加</el-button>
|
||||
<el-button
|
||||
icon="iconfont iconDelete"
|
||||
@click="deleteById(ids.join(','))"
|
||||
:disabled="!Boolean(ids.length)">
|
||||
删除
|
||||
</el-button>
|
||||
<ai-import :instance="instance" :dict="dict" type="appgirdmemberapply" name="网格员申报" @success="getList()">
|
||||
<el-button icon="iconfont iconImport">导入</el-button>
|
||||
</ai-import>
|
||||
</template>
|
||||
<template slot="right">
|
||||
<el-input
|
||||
v-model="searchObj.name"
|
||||
size="small"
|
||||
placeholder="网格员/责任网格"
|
||||
@keyup.enter.native="(page.current = 1), getList()"
|
||||
clearable
|
||||
@clear="(searchObj.name = '', page.current = 1), getList()"
|
||||
suffix-icon="iconfont iconSearch" />
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-table
|
||||
:tableData="tableData"
|
||||
:col-configs="colConfigs"
|
||||
:total="page.total"
|
||||
ref="aitableex"
|
||||
:current.sync="page.current"
|
||||
:size.sync="page.size"
|
||||
@selection-change="(v) => (ids = v.map((e) => e.id))"
|
||||
@getList="getList()">
|
||||
<el-table-column label="操作" slot="options" align="center" fixed="right" width="120">
|
||||
<template slot-scope="{ row }">
|
||||
<div class="table-options">
|
||||
<el-button type="text" @click="toDetail(row.id)">详情</el-button>
|
||||
<el-button type="text" @click="deleteById(row.id)">删除</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
</template>
|
||||
</ai-list>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'ApplyList',
|
||||
label: '网格员管理',
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
searchObj: {
|
||||
name: "",
|
||||
selectionDate: "",
|
||||
},
|
||||
page: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0,
|
||||
},
|
||||
goAdd: false,
|
||||
tableData: [],
|
||||
fileList: [],
|
||||
ids: [],
|
||||
detail: {},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.dict.load("sex", "girdMemberType", "politicsStatus", "education");
|
||||
this.getList();
|
||||
},
|
||||
computed: {
|
||||
colConfigs() {
|
||||
let _ = this;
|
||||
return [
|
||||
{
|
||||
type: "selection",
|
||||
},
|
||||
{
|
||||
prop: "name",
|
||||
label: "网格员姓名",
|
||||
},
|
||||
{
|
||||
prop: "girdName",
|
||||
align: "left",
|
||||
label: "责任网格",
|
||||
},
|
||||
{
|
||||
prop: "phone",
|
||||
align: "center",
|
||||
label: "联系电话",
|
||||
}
|
||||
];
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
this.instance
|
||||
.post("/app/appgirdmemberapply/list", null, {
|
||||
params: {
|
||||
...this.searchObj,
|
||||
...this.page,
|
||||
},
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.tableData = res.data.records;
|
||||
this.page.total = res.data.total;
|
||||
}
|
||||
});
|
||||
},
|
||||
deleteById(ids) {
|
||||
ids &&
|
||||
this.$confirm("是否要删除该网格员?", {
|
||||
type: "error",
|
||||
})
|
||||
.then(() => {
|
||||
this.instance
|
||||
.post("/app/appgirdmemberapply/delete", null, {
|
||||
params: { ids },
|
||||
})
|
||||
.then((res) => {
|
||||
if (res?.code == 0) {
|
||||
this.$message.success("删除成功!");
|
||||
this.getList();
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
add (id) {
|
||||
this.$emit('change', {
|
||||
type: 'ApplyAdd',
|
||||
params: {
|
||||
id: id || ''
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
toDetail (id) {
|
||||
this.$emit('change', {
|
||||
type: 'ApplyDetail',
|
||||
params: {
|
||||
id
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
handleSelectionChange(val) {
|
||||
this.ids = [];
|
||||
val.map((e) => {
|
||||
this.ids.push(e.id);
|
||||
});
|
||||
},
|
||||
resetSearch() {
|
||||
Object.keys(this.searchObj).map((e) => {
|
||||
this.searchObj[e] = "";
|
||||
});
|
||||
this.getList();
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
@@ -23,7 +23,7 @@
|
||||
v-model="search.name"
|
||||
class="search-input"
|
||||
size="small"
|
||||
@keyup.enter.native="search.current = 1, getList()"
|
||||
v-throttle="() => {search.current = 1, getList()}"
|
||||
placeholder="姓名/身份证/联系方式"
|
||||
clearable
|
||||
@clear="search.current = 1, search.name = '', getList()"
|
||||
|
||||
10
packages/2.0.5/AppGridMember/components/list.vue
vendored
10
packages/2.0.5/AppGridMember/components/list.vue
vendored
@@ -1,8 +1,5 @@
|
||||
<template>
|
||||
<ai-list class="list">
|
||||
<template slot="title">
|
||||
<ai-title title="网格员管理" :isShowBottomBorder="true"></ai-title>
|
||||
</template>
|
||||
<ai-list class="list" isTabs>
|
||||
<template slot="content">
|
||||
<ai-search-bar bottomBorder>
|
||||
<template slot="left">
|
||||
@@ -20,6 +17,7 @@
|
||||
v-model="searchObj.name"
|
||||
size="small"
|
||||
placeholder="网格员/责任网格"
|
||||
v-throttle="() => {page.current = 1, getList()}"
|
||||
@keyup.enter.native="(page.current = 1), getList()"
|
||||
clearable
|
||||
@clear="(searchObj.name = '', page.current = 1), getList()"
|
||||
@@ -56,7 +54,7 @@
|
||||
<template slot-scope="{ row }">
|
||||
<div class="table-options">
|
||||
<el-button type="text" @click="toFamily(row.id)">责任家庭</el-button>
|
||||
<el-button type="text" @click="add(row.id)">查看</el-button>
|
||||
<el-button type="text" @click="add(row.id)">详情</el-button>
|
||||
<el-button type="text" @click="deleteById(row.id)">删除</el-button>
|
||||
</div>
|
||||
</template>
|
||||
@@ -68,7 +66,7 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "list",
|
||||
name: "List",
|
||||
label: "网格员管理",
|
||||
props: {
|
||||
instance: Function,
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
|
||||
<!-- 搜索 -->
|
||||
<template slot="right">
|
||||
<el-input v-model="search.name" size="small" placeholder="户主/联系电话" clearable @keyup.enter.native=";(page.current = 1), getList()" @clear=";(page.current = 1), (search.name = ''), getList()" suffix-icon="iconfont iconSearch" />
|
||||
<el-input v-model="search.name" size="small"
|
||||
v-throttle="() => {page.current = 1, getList()}" placeholder="户主/联系电话" clearable @clear=";(page.current = 1), (search.name = ''), getList()" suffix-icon="iconfont iconSearch" />
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
</template>
|
||||
<template slot="right">
|
||||
<el-input v-model="search.name" size="small" placeholder="媒资名称" clearable
|
||||
@keyup.enter.native=";(page.current = 1), getList()"
|
||||
v-throttle="() => {page.current = 1, getList()}"
|
||||
@clear=";(page.current = 1), (search.name = ''), getList()" suffix-icon="iconfont iconSearch"/>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<ai-select v-model="status" placeholder="请选择" clearable :selectList="$dict.getDict('fpStatus')" @change="page.current=1,getTableData()"></ai-select>
|
||||
</template>
|
||||
<template #right>
|
||||
<el-input placeholder="姓名/身份证/户主联系方式" v-model="search.name" size="small" clearable @change="page.current=1,getTableData()" suffix-icon="iconfont iconSearch"/>
|
||||
<el-input placeholder="姓名/身份证/户主联系方式" v-model="search.name" size="small" @clear="page.current = 1,search.name = '', getTableData()" clearable v-throttle="() => {page.current = 1, getTableData()}" suffix-icon="iconfont iconSearch"/>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-search-bar>
|
||||
|
||||
@@ -20,7 +20,8 @@
|
||||
v-model="search.name"
|
||||
size="small"
|
||||
clearable
|
||||
@change="page.current=1,getTableData()"
|
||||
@clear="page.current = 1,search.name = '', getTableData()"
|
||||
v-throttle="() => {page.current = 1, getTableData()}"
|
||||
suffix-icon="iconfont iconSearch"/>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
|
||||
62
packages/2.0.5/AppVisitVondolence/AppVisitVondolence.vue
vendored
Normal file
62
packages/2.0.5/AppVisitVondolence/AppVisitVondolence.vue
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
<template>
|
||||
<div class="AppVisitVondolence">
|
||||
<keep-alive :include="['List']">
|
||||
<component ref="component" :is="component" @change="onChange" :params="params" :instance="instance" :dict="dict"></component>
|
||||
</keep-alive>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import List from './components/List.vue'
|
||||
import Detail from './components/Detail.vue'
|
||||
|
||||
export default {
|
||||
name: 'AppVisitVondolence',
|
||||
label: '走访慰问',
|
||||
|
||||
components: {
|
||||
List,
|
||||
Detail
|
||||
},
|
||||
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function
|
||||
},
|
||||
|
||||
data () {
|
||||
return {
|
||||
component: 'List',
|
||||
params: {}
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
onChange (data) {
|
||||
if (data.type === 'Detail') {
|
||||
this.component = 'Detail'
|
||||
this.isShowDetail = true
|
||||
this.params = data.params
|
||||
}
|
||||
|
||||
if (data.type === 'list') {
|
||||
this.component = 'List'
|
||||
this.params = data.params
|
||||
|
||||
this.$nextTick(() => {
|
||||
if (data.isRefresh) {
|
||||
this.$refs.component.getList()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.AppVisitVondolence {
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
89
packages/2.0.5/AppVisitVondolence/components/Detail.vue
vendored
Normal file
89
packages/2.0.5/AppVisitVondolence/components/Detail.vue
vendored
Normal file
@@ -0,0 +1,89 @@
|
||||
<template>
|
||||
<ai-detail>
|
||||
<template slot="title">
|
||||
<ai-title title="详情" isShowBack isShowBottomBorder @onBackClick="cancel(true)">
|
||||
</ai-title>
|
||||
</template>
|
||||
<template slot="content">
|
||||
<ai-card title="基本信息">
|
||||
<template #content>
|
||||
<ai-wrapper
|
||||
label-width="120px">
|
||||
<ai-info-item label="标题" :value="info.title" isLine></ai-info-item>
|
||||
<ai-info-item label="描述" isLine :value="info.description"></ai-info-item>
|
||||
<ai-info-item label="图片" isLine :value="info.idNumber">
|
||||
<ai-uploader v-model="info.images" :instance="instance" :limit="9" disabled/>
|
||||
</ai-info-item>
|
||||
<ai-info-item label="慰问对象" :value="info.name"></ai-info-item>
|
||||
<ai-info-item label="对象类型" :value="info.type"></ai-info-item>
|
||||
<ai-info-item label="现实状态" isLine :value="dict.getLabel('visitCondolenceReality', info.reality)"></ai-info-item>
|
||||
<ai-info-item label="走访人" :value="info.createUserName"></ai-info-item>
|
||||
<ai-info-item label="走访时间" :value="info.visitTime"></ai-info-item>
|
||||
</ai-wrapper>
|
||||
</template>
|
||||
</ai-card>
|
||||
</template>
|
||||
</ai-detail>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'Detail',
|
||||
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
params: Object
|
||||
},
|
||||
|
||||
data () {
|
||||
return {
|
||||
info: {},
|
||||
id: ''
|
||||
}
|
||||
},
|
||||
|
||||
created () {
|
||||
this.id = this.params.id
|
||||
this.dict.load(['visitCondolenceReality']).then(() => {
|
||||
this.getDictList()
|
||||
})
|
||||
},
|
||||
|
||||
methods: {
|
||||
getInfo (id) {
|
||||
this.instance.post(`/app/appvisitvondolence/queryDetailById?id=${id}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.info = res.data
|
||||
this.info.images = res.data.images ? JSON.parse(res.data.images) : []
|
||||
this.info.type = this.dictList.filter(v => v.dictValue === res.data.applicationId)[0].dictName
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
getDictList () {
|
||||
this.instance.post(`/app/appapplicationinfo/queryApplicationListByType`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.dictList = res.data.map(v => {
|
||||
return {
|
||||
dictValue: v.id,
|
||||
dictName: v.applicationName
|
||||
}
|
||||
})
|
||||
this.getInfo(this.params.id)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
cancel (isRefresh) {
|
||||
this.$emit('change', {
|
||||
type: 'list',
|
||||
isRefresh: !!isRefresh
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
</style>
|
||||
155
packages/2.0.5/AppVisitVondolence/components/List.vue
vendored
Normal file
155
packages/2.0.5/AppVisitVondolence/components/List.vue
vendored
Normal file
@@ -0,0 +1,155 @@
|
||||
<template>
|
||||
<ai-list class="list">
|
||||
<ai-title slot="title" title="走访慰问" isShowBottomBorder></ai-title>
|
||||
<template slot="content">
|
||||
<div class="content">
|
||||
<ai-search-bar bottomBorder>
|
||||
<template #left>
|
||||
<ai-select
|
||||
v-model="search.applicationId"
|
||||
clearable
|
||||
placeholder="请选择对象类型"
|
||||
:selectList="dictList"
|
||||
@change="search.current = 1, getList()">
|
||||
</ai-select>
|
||||
<ai-select
|
||||
v-model="search.reality"
|
||||
clearable
|
||||
placeholder="请选择现实状态"
|
||||
:selectList="dict.getDict('visitCondolenceReality')"
|
||||
@change="search.current = 1, getList()">
|
||||
</ai-select>
|
||||
</template>
|
||||
<template #right>
|
||||
<el-input
|
||||
v-model="search.title"
|
||||
size="small"
|
||||
placeholder="标题、慰问对象、走访人"
|
||||
clearable
|
||||
v-throttle="() => {search.current = 1, getList()}"
|
||||
@clear="search.current = 1, search.title = '', getList()"
|
||||
suffix-icon="iconfont iconSearch">
|
||||
</el-input>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-table
|
||||
:tableData="tableData"
|
||||
:col-configs="colConfigs"
|
||||
:total="total"
|
||||
style="margin-top: 16px;"
|
||||
:current.sync="search.current"
|
||||
:size.sync="search.size"
|
||||
@getList="getList">
|
||||
<el-table-column slot="options" width="120px" fixed="right" label="操作" align="center">
|
||||
<template slot-scope="{ row }">
|
||||
<div class="table-options">
|
||||
<el-button type="text" @click="toDetail(row.id)">详情</el-button>
|
||||
<el-button type="text" @click="remove(row.id)">删除</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
</div>
|
||||
</template>
|
||||
</ai-list>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
export default {
|
||||
name: 'List',
|
||||
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object
|
||||
},
|
||||
|
||||
data () {
|
||||
return {
|
||||
search: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
title: '',
|
||||
reality: '',
|
||||
menuLevel3Name: ''
|
||||
},
|
||||
dictList: [],
|
||||
info: {},
|
||||
colConfigs: [
|
||||
{ prop: 'title', label: '标题' },
|
||||
{ prop: 'visitTime', align: 'center', label: '走访时间' },
|
||||
{ prop: 'name', align: 'center', label: '慰问对象' },
|
||||
{ prop: 'menuLevel3Name', align: 'center', label: '对象类型' },
|
||||
{ prop: 'reality', align: 'center', label: '现实状态', formart: v => v ? this.dict.getLabel('visitCondolenceReality', v) : '-' },
|
||||
{ prop: 'createUserName', align: 'center', label: '走访人' }
|
||||
],
|
||||
tableData: [],
|
||||
total: 0
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapState(['user'])
|
||||
},
|
||||
|
||||
created () {
|
||||
this.getDictList()
|
||||
this.dict.load(['visitCondolenceReality']).then(() => {
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
|
||||
methods: {
|
||||
getList () {
|
||||
this.instance.post(`/app/appvisitvondolence/list`, null, {
|
||||
params: {
|
||||
...this.search
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.tableData = res.data.records
|
||||
this.total = res.data.total
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
getDictList () {
|
||||
this.instance.post(`/app/appapplicationinfo/queryApplicationListByType`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.dictList = res.data.map(v => {
|
||||
return {
|
||||
dictValue: v.id,
|
||||
dictName: v.applicationName
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
remove(id) {
|
||||
this.$confirm('确定删除该数据?').then(() => {
|
||||
this.instance.post(`/app/appvisitvondolence/delete?ids=${id}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success('删除成功!')
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
toDetail (id) {
|
||||
this.$emit('change', {
|
||||
type: 'Detail',
|
||||
params: {
|
||||
id: id || ''
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.list {
|
||||
}
|
||||
</style>
|
||||
65
packages/3.0.0/AppContentInfo/AppContentInfo.vue
vendored
65
packages/3.0.0/AppContentInfo/AppContentInfo.vue
vendored
@@ -1,15 +1,26 @@
|
||||
<template>
|
||||
<div class="doc-circulation ailist-wrapper">
|
||||
<keep-alive :include="['List']">
|
||||
<component ref="component" :moduleName="moduleName" :moduleId="moduleId" :is="component" @change="onChange" :params="params" :instance="instance" :dict="dict"></component>
|
||||
</keep-alive>
|
||||
</div>
|
||||
<ai-list v-if="!isShowDetail">
|
||||
<template slot="title">
|
||||
<ai-title :title="moduleName" :isShowBottomBorder="false" :isShowArea="true" v-model="areaId" :instance="instance" @change="onAreaChange"></ai-title>
|
||||
</template>
|
||||
<template slot="tabs">
|
||||
<el-tabs v-model="currIndex">
|
||||
<el-tab-pane v-for="(tab,i) in tabs" :key="i" :label="tab.label">
|
||||
<component :areaId="areaId" :moduleName="moduleName" :moduleId="moduleId" :ref="String(i)" v-if="currIndex == i" :is="tab.comp" @change="onChange" lazy :instance="instance" :dict="dict" :permissions="permissions"/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</template>
|
||||
</ai-list>
|
||||
<Add v-else-if="component === 'Add'" :moduleName="moduleName" :moduleId="moduleId" :areaId="areaId" :params="params" :instance="instance" :dict="dict" :permissions="permissions" @change="onChange"></Add>
|
||||
<Detail v-else-if="component === 'Detail'" :moduleName="moduleName" :moduleId="moduleId" :params="params" :instance="instance" :dict="dict" :permissions="permissions" @change="onChange"></Detail>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import List from './components/List'
|
||||
import Add from './components/Add'
|
||||
import Detail from './components/Detail'
|
||||
import Audit from './components/Audit'
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'AppContentInfo',
|
||||
@@ -17,31 +28,48 @@
|
||||
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object
|
||||
dict: Object,
|
||||
permissions: Function
|
||||
},
|
||||
|
||||
data () {
|
||||
return {
|
||||
areaId: '',
|
||||
component: 'List',
|
||||
params: {},
|
||||
moduleId: '',
|
||||
include: [],
|
||||
moduleName: ''
|
||||
moduleName: '',
|
||||
tabs: [],
|
||||
currIndex: '0',
|
||||
isShowDetail: false
|
||||
}
|
||||
},
|
||||
|
||||
components: {
|
||||
Add,
|
||||
List,
|
||||
Audit,
|
||||
Detail
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapState(['user'])
|
||||
},
|
||||
|
||||
created () {
|
||||
this.moduleId = this.$route.query.moduleId
|
||||
this.areaId = this.user.info.areaId
|
||||
|
||||
this.instance.post('/app/appcontentmoduleinfo/queryDetailById?id=' + this.$route.query.moduleId).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.moduleName = res.data.moduleName
|
||||
this.tabs = [
|
||||
{label: this.moduleName, name: 'List', comp: List, permission: ''},
|
||||
{label: `${this.moduleName}审核`, name: 'Audit', comp: Audit, permission: 'app_appcontentinfo_examine'}
|
||||
].filter(item => {
|
||||
return item.name !== 'Audit' || (res.data.needExamine === '1' && item.name === 'Audit' && this.permissions(item.permission))
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -51,23 +79,32 @@
|
||||
if (data.type === 'Add') {
|
||||
this.component = 'Add'
|
||||
this.params = data.params
|
||||
this.isShowDetail = true
|
||||
}
|
||||
|
||||
if (data.type === 'Detail') {
|
||||
this.component = 'Detail'
|
||||
this.params = data.params
|
||||
this.isShowDetail = true
|
||||
}
|
||||
|
||||
if (data.type === 'list') {
|
||||
if (data.type === 'Audit') {
|
||||
this.component = 'Audit'
|
||||
this.params = data.params
|
||||
this.isShowDetail = false
|
||||
}
|
||||
|
||||
if (data.type === 'List') {
|
||||
this.component = 'List'
|
||||
this.params = data.params
|
||||
|
||||
this.$nextTick(() => {
|
||||
if (data.isRefresh) {
|
||||
this.$refs.component.getList()
|
||||
}
|
||||
})
|
||||
this.isShowDetail = false
|
||||
}
|
||||
},
|
||||
|
||||
onAreaChange () {
|
||||
this.$nextTick(() => {
|
||||
this.$refs[this.currIndex][0].getList()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
16
packages/3.0.0/AppContentInfo/components/Add.vue
vendored
16
packages/3.0.0/AppContentInfo/components/Add.vue
vendored
@@ -100,6 +100,7 @@
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
params: Object,
|
||||
areaId: String,
|
||||
moduleName: String
|
||||
},
|
||||
data () {
|
||||
@@ -134,7 +135,8 @@
|
||||
}
|
||||
],
|
||||
isHideCoverimg: false,
|
||||
cateList: []
|
||||
cateList: [],
|
||||
needExamine: '0'
|
||||
}
|
||||
},
|
||||
|
||||
@@ -145,7 +147,7 @@
|
||||
created () {
|
||||
this.getModuleInfo()
|
||||
this.getCateList()
|
||||
this.form.areaId = this.user.info.areaId
|
||||
this.form.areaId = this.areaId
|
||||
this.disabledLevel = this.user.info.areaList.length
|
||||
if (this.params && this.params.id) {
|
||||
this.id = this.params.id
|
||||
@@ -161,7 +163,6 @@
|
||||
this.form.pictureUrl = res.data.pictureUrl ? [{
|
||||
url: res.data.pictureUrl
|
||||
}] : []
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -170,6 +171,7 @@
|
||||
this.instance.post(`/app/appcontentmoduleinfo/queryDetailById?id=${this.$route.query.moduleId}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.isHideCoverimg = res.data.styleType === '0'
|
||||
this.needExamine = res.data.needExamine
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -253,7 +255,11 @@
|
||||
pictureUrl: this.form.pictureUrl.length ? this.form.pictureUrl[0].url : ''
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success('提交成功')
|
||||
if (this.needExamine === '1') {
|
||||
this.$message.success('提交成功,等待管理员审核')
|
||||
} else {
|
||||
this.$message.success('提交成功')
|
||||
}
|
||||
setTimeout(() => {
|
||||
this.cancel(true)
|
||||
}, 600)
|
||||
@@ -269,7 +275,7 @@
|
||||
|
||||
cancel (isRefresh) {
|
||||
this.$emit('change', {
|
||||
type: 'list',
|
||||
type: 'List',
|
||||
isRefresh: !!isRefresh
|
||||
})
|
||||
}
|
||||
|
||||
201
packages/3.0.0/AppContentInfo/components/Audit.vue
vendored
Normal file
201
packages/3.0.0/AppContentInfo/components/Audit.vue
vendored
Normal file
@@ -0,0 +1,201 @@
|
||||
<template>
|
||||
<ai-list class="notice" isTabs>
|
||||
<template slot="content">
|
||||
<ai-search-bar class="search-bar">
|
||||
<template #left>
|
||||
<ai-select
|
||||
v-model="search.examineStatus"
|
||||
@change="search.current = 1, getList()"
|
||||
placeholder="审核状态"
|
||||
:selectList="dict.getDict('auditStatus')">
|
||||
</ai-select>
|
||||
</template>
|
||||
<template #right>
|
||||
<el-input
|
||||
v-model="search.title"
|
||||
class="search-input"
|
||||
size="small"
|
||||
v-throttle="() => {search.current=1,getList()}"
|
||||
placeholder="请输入标题"
|
||||
clearable
|
||||
@clear="search.current = 1, search.title = '', getList()"
|
||||
suffix-icon="iconfont iconSearch">
|
||||
</el-input>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-table
|
||||
:tableData="tableData"
|
||||
:col-configs="colConfigs"
|
||||
:total="total"
|
||||
style="margin-top: 6px;"
|
||||
:current.sync="search.current"
|
||||
:size.sync="search.size"
|
||||
@getList="getList">
|
||||
<el-table-column slot="tags" label="标签">
|
||||
<template slot-scope="{ row }">
|
||||
<div class="table-tags">
|
||||
<el-tag type="info" v-for="(item, index) in row.tags" size="small" :key="index">{{ item }}</el-tag>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column slot="options" width="120px" fixed="right" label="操作" align="center">
|
||||
<template slot-scope="{ row }">
|
||||
<div class="table-options">
|
||||
<el-button type="text" @click="audit(row.id)">审核</el-button>
|
||||
<el-button type="text" @click="toDetail(row.id)">详情</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
<ai-dialog
|
||||
:visible.sync="isShow"
|
||||
width="800px"
|
||||
@close="onClose"
|
||||
title="审核"
|
||||
@onConfirm="onConfirm">
|
||||
<el-form class="ai-form" label-width="120px" :model="form" ref="form">
|
||||
<el-form-item label="是否通过审核" prop="pass" style="width: 100%;" :rules="[{ required: true, message: '请选择是否通过审核' }]">
|
||||
<el-radio-group v-model="form.pass" @change="onStatusChange">
|
||||
<el-radio label="0">否</el-radio>
|
||||
<el-radio label="1">是</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.pass === '0'" label="审核意见" prop="opinion" style="width: 100%;" :rules="[{ required: form.pass === '0', message: '请输入审核意见' }]">
|
||||
<el-input type="textarea" :rows="5" :maxlength="200" v-model="form.opinion" clearable placeholder="请输入审核意见" show-word-limit></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ai-dialog>
|
||||
</template>
|
||||
</ai-list>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
export default {
|
||||
name: 'Audit',
|
||||
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
moduleName: String,
|
||||
areaId: String
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
search: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
title: '',
|
||||
examineStatus: ''
|
||||
},
|
||||
form: {
|
||||
opinion: '',
|
||||
pass: ''
|
||||
},
|
||||
id: '',
|
||||
isShow: false,
|
||||
total: 0,
|
||||
colConfigs: [
|
||||
{ prop: 'title', label: '标题', align: 'left', width: '200px' },
|
||||
{ prop: 'areaName', label: '地区', align: 'left' },
|
||||
{ prop: 'examineStatus', label: '状态', align: 'center', formart: v => this.dict.getLabel('auditStatus', v) },
|
||||
{ prop: 'examineOpinion', label: '信息', align: 'center' },
|
||||
{ prop: 'createUserName', label: '发布人', align: 'center' },
|
||||
{ prop: 'createTime', label: '发布时间', align: 'center' },
|
||||
{ slot: 'options', label: '操作', align: 'center' }
|
||||
],
|
||||
areaName: '',
|
||||
unitName: '',
|
||||
tableData: []
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapState(['user'])
|
||||
},
|
||||
|
||||
created () {
|
||||
this.dict.load('auditStatus').then(() => {
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
|
||||
methods: {
|
||||
getList() {
|
||||
this.instance.post(`/app/appcontentinfo/list-web`, null, {
|
||||
params: {
|
||||
moduleId: this.$route.query.moduleId,
|
||||
...this.search,
|
||||
areaId: this.areaId,
|
||||
queryType: 1
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.tableData = res.data.records
|
||||
this.total = res.data.total
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onStatusChange () {
|
||||
this.form.opinion = ''
|
||||
this.$refs.form.clearValidate()
|
||||
},
|
||||
|
||||
onClose () {
|
||||
this.form.opinion = ''
|
||||
this.form.pass = ''
|
||||
},
|
||||
|
||||
onConfirm () {
|
||||
this.$refs.form.validate(v => {
|
||||
if (v) {
|
||||
this.instance.post('/app/appcontentinfo/examine', null, {
|
||||
params: {
|
||||
...this.form,
|
||||
id: this.id
|
||||
}
|
||||
}).then(res => {
|
||||
if (res?.code == 0) {
|
||||
this.isShow = false
|
||||
this.getList()
|
||||
this.$message.success('审核成功!')
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
audit (id) {
|
||||
this.id = id
|
||||
this.isShow = true
|
||||
},
|
||||
|
||||
remove(id) {
|
||||
this.$confirm('确定删除该数据?').then(() => {
|
||||
this.instance.post(`/app/appcontentinfo/delete?ids=${id}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success('删除成功!')
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
toDetail(id) {
|
||||
this.$emit('change', {
|
||||
type: 'Detail',
|
||||
params: {
|
||||
id: id || ''
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.notice {
|
||||
}
|
||||
</style>
|
||||
@@ -7,6 +7,35 @@
|
||||
<template slot="content">
|
||||
<ai-card title="基本信息">
|
||||
<template #content>
|
||||
<ai-wrapper
|
||||
label-width="120px">
|
||||
<ai-info-item label="标题" isLine :value="info.title"></ai-info-item>
|
||||
<ai-info-item label="发布地区" isLine :value="info.areaName"></ai-info-item>
|
||||
<ai-info-item label="文章类型" isLine :value="info.contentType === '0' ? '文章' : '视频'"></ai-info-item>
|
||||
<ai-info-item label="分类" isLine :value="info.categoryName"></ai-info-item>
|
||||
<ai-info-item label="正文" v-if="info.contentType === '0'" isLine>
|
||||
<AiArticle :value="info.content"></AiArticle>
|
||||
</ai-info-item>
|
||||
<ai-info-item v-if="info.contentType === '0'" isLine label="封面图片">
|
||||
<ai-uploader
|
||||
:instance="instance"
|
||||
disabled
|
||||
v-model="info.files"
|
||||
:limit="9">
|
||||
</ai-uploader>
|
||||
</ai-info-item>
|
||||
<ai-info-item v-if="info.contentType === '1'" isLine label="封面图片">
|
||||
<video style="width:100%; height:100%; object-fit: fill;" :src="info.files[0].url" controls></video>
|
||||
</ai-info-item>
|
||||
<ai-info-item v-if="info.contentType === '1'" isLine label="视频封面">
|
||||
<ai-uploader
|
||||
:instance="instance"
|
||||
disabled
|
||||
v-model="info.pictureUrl"
|
||||
:limit="1">
|
||||
</ai-uploader>
|
||||
</ai-info-item>
|
||||
</ai-wrapper>
|
||||
</template>
|
||||
</ai-card>
|
||||
</template>
|
||||
@@ -40,19 +69,19 @@
|
||||
|
||||
methods: {
|
||||
getInfo (id) {
|
||||
this.instance.post(`/app/appeveryvillagecode/queryDetailById?id=${id}`).then(res => {
|
||||
this.instance.post(`/app/appcontentinfo/queryDetailById?id=${id}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.form = res.data
|
||||
this.form.codeUrl = [{
|
||||
url: res.data.codeUrl
|
||||
}]
|
||||
this.info = res.data
|
||||
this.info.pictureUrl = res.data.pictureUrl ? [{
|
||||
url: res.data.pictureUrl
|
||||
}] : []
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
cancel (isRefresh) {
|
||||
this.$emit('change', {
|
||||
type: 'list',
|
||||
type: 'List',
|
||||
isRefresh: !!isRefresh
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
<template>
|
||||
<ai-list class="notice">
|
||||
<template slot="title">
|
||||
<ai-title :title="moduleName" isShowBottomBorder isShowArea v-model="search.areaId" :instance="instance" @change="search.current = 1, getList()"></ai-title>
|
||||
</template>
|
||||
<ai-list class="notice" isTabs>
|
||||
<template slot="content">
|
||||
<ai-search-bar class="search-bar">
|
||||
<template #left>
|
||||
@@ -13,7 +10,7 @@
|
||||
v-model="search.title"
|
||||
class="search-input"
|
||||
size="small"
|
||||
@keyup.enter.native="search.current = 1, search.title, getList()"
|
||||
v-throttle="() => {search.current = 1, getList()}"
|
||||
placeholder="请输入标题"
|
||||
clearable
|
||||
@clear="search.current = 1, search.title = '', getList()"
|
||||
@@ -36,10 +33,11 @@
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column slot="options" width="140px" fixed="right" label="操作" align="center">
|
||||
<el-table-column slot="options" width="160px" fixed="right" label="操作" align="center">
|
||||
<template slot-scope="{ row }">
|
||||
<div class="table-options">
|
||||
<el-button type="text" @click="toAdd(row.id)">编辑</el-button>
|
||||
<el-button type="text" @click="toDetail(row.id)">详情</el-button>
|
||||
<el-button type="text" @click="remove(row.id)">删除</el-button>
|
||||
</div>
|
||||
</template>
|
||||
@@ -57,7 +55,8 @@
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
moduleName: String
|
||||
moduleName: String,
|
||||
areaId: String
|
||||
},
|
||||
|
||||
data() {
|
||||
@@ -65,8 +64,7 @@
|
||||
search: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
title: '',
|
||||
areaId: ''
|
||||
title: ''
|
||||
},
|
||||
currIndex: -1,
|
||||
areaList: [],
|
||||
@@ -90,16 +88,18 @@
|
||||
},
|
||||
|
||||
created() {
|
||||
this.search.areaId = this.user.info.areaId
|
||||
this.getList()
|
||||
this.dict.load('auditStatus').then(() => {
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
|
||||
methods: {
|
||||
getList() {
|
||||
this.instance.post(`/app/appcontentinfo/list`, null, {
|
||||
this.instance.post(`/app/appcontentinfo/list-web`, null, {
|
||||
params: {
|
||||
moduleId: this.$route.query.moduleId,
|
||||
...this.search
|
||||
...this.search,
|
||||
areaId: this.areaId
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
@@ -127,6 +127,15 @@
|
||||
id: id || ''
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
toDetail(id) {
|
||||
this.$emit('change', {
|
||||
type: 'Detail',
|
||||
params: {
|
||||
id: id || ''
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,6 +18,12 @@
|
||||
</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否审核" style="width: 100%;" prop="needExamine" :rules="[{required: true, message: '请选择是否审核', trigger: 'change'}]">
|
||||
<el-radio-group v-model="form.needExamine">
|
||||
<el-radio label="0">否</el-radio>
|
||||
<el-radio label="1">是</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
</ai-card>
|
||||
@@ -65,7 +71,8 @@
|
||||
form: {
|
||||
moduleName: '',
|
||||
menuId: '',
|
||||
menuName: ''
|
||||
menuName: '',
|
||||
needExamine: '0'
|
||||
},
|
||||
isShowAdd: false,
|
||||
treeData: [],
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
:current.sync="search.current"
|
||||
:size.sync="search.size"
|
||||
@getList="getList">
|
||||
<el-table-column slot="options" width="220px" fixed="right" label="操作" align="center">
|
||||
<el-table-column slot="options" width="160px" fixed="right" label="操作" align="center">
|
||||
<template slot-scope="{ row }">
|
||||
<div class="table-options">
|
||||
<el-button type="text" @click="toAdd(row.id)">编辑</el-button>
|
||||
@@ -95,7 +95,8 @@
|
||||
colConfigs: [
|
||||
{ prop: 'moduleName', label: '模块名称', align: 'left', width: '200px' },
|
||||
{ prop: 'menuName', label: '关联菜单', align: 'center' },
|
||||
{ prop: 'categoryStr', label: '文章分类', align: 'center' }
|
||||
{ prop: 'categoryStr', label: '文章分类', align: 'center' },
|
||||
{ prop: 'needExamine', label: '是否审核', align: 'center', formart: v => v === '0' ? '否' : '是' }
|
||||
],
|
||||
cateColConfigs: [
|
||||
{prop: 'categoryName', label: '分类名称', align: 'center'}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<template slot="content">
|
||||
<ai-card title="基本信息">
|
||||
<template #content>
|
||||
<el-form ref="form" class="ai-form" :model="form" label-width="110px" label-position="right">
|
||||
<el-form ref="CBookForm" class="ai-form" :model="form" label-width="110px" label-position="right">
|
||||
<el-form-item label="地区" style="width: 100%;" prop="codeName">
|
||||
<span style="color: #666;">{{ form.areaName }}</span>
|
||||
</el-form-item>
|
||||
@@ -72,13 +72,10 @@
|
||||
},
|
||||
id: '',
|
||||
regPhone,
|
||||
areaList: []
|
||||
}
|
||||
},
|
||||
|
||||
created () {
|
||||
this.getAreaList()
|
||||
|
||||
if (this.params && this.params.areaId && !this.params.id) {
|
||||
this.form.areaId = this.params.areaId
|
||||
this.form.areaName = this.params.areaName
|
||||
@@ -93,31 +90,18 @@
|
||||
methods: {
|
||||
getInfo (id) {
|
||||
this.instance.post(`/app/appconvenientaddressbook/queryDetailById?id=${id}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
if (res?.data) {
|
||||
this.form = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
getAreaList() {
|
||||
this.instance.post(`/admin/area/queryAreaByParentId?id=341021104000`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.areaList = res.data.map(item => {
|
||||
item.dictName = item.name
|
||||
item.dictValue = item.id
|
||||
|
||||
return item
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onClose () {
|
||||
this.form.explain = ''
|
||||
},
|
||||
|
||||
confirm () {
|
||||
this.$refs.form.validate((valid) => {
|
||||
this.$refs.CBookForm.validate((valid) => {
|
||||
if (valid) {
|
||||
this.instance.post(`/app/appconvenientaddressbook/addOrUpdate`, {
|
||||
...this.form,
|
||||
|
||||
@@ -11,25 +11,25 @@
|
||||
<div class="addressBook-left__list">
|
||||
<div class="addressBook-left__list--title">
|
||||
<el-input
|
||||
class="addressBook-left__list--search"
|
||||
size="mini"
|
||||
clearable
|
||||
placeholder="请输入地区名称"
|
||||
v-model="unitName"
|
||||
suffix-icon="iconfont iconSearch">
|
||||
class="addressBook-left__list--search"
|
||||
size="mini"
|
||||
clearable
|
||||
placeholder="请输入地区名称"
|
||||
v-model="unitName"
|
||||
suffix-icon="iconfont iconSearch">
|
||||
</el-input>
|
||||
</div>
|
||||
<el-tree
|
||||
:filter-node-method="filterNode"
|
||||
ref="tree"
|
||||
:props="defaultProps"
|
||||
node-key="id"
|
||||
:data="areaTree"
|
||||
highlight-current
|
||||
:current-node-key="search.areaId"
|
||||
:default-expanded-keys="defaultExpanded"
|
||||
:default-checked-keys="defaultChecked"
|
||||
@current-change="onTreeChange">
|
||||
:filter-node-method="filterNode"
|
||||
ref="tree"
|
||||
:props="defaultProps"
|
||||
node-key="id"
|
||||
:data="areaTree"
|
||||
highlight-current
|
||||
:current-node-key="search.areaId"
|
||||
:default-expanded-keys="defaultExpanded"
|
||||
:default-checked-keys="defaultChecked"
|
||||
@current-change="onTreeChange">
|
||||
</el-tree>
|
||||
</div>
|
||||
</div>
|
||||
@@ -37,43 +37,45 @@
|
||||
<template slot="content">
|
||||
<ai-search-bar class="search-bar">
|
||||
<template #left>
|
||||
<el-button size="small" type="primary" :disabled="isShowAdd" icon="iconfont iconAdd" @click="toAdd('')">添加</el-button>
|
||||
<ai-import :instance="instance" :dict="dict" type="appconvenientaddressbook" name="便民通讯录" @success="getList()">
|
||||
<el-button size="small" type="primary" :disabled="isShowAdd" icon="iconfont iconAdd" @click="toAdd('')">添加
|
||||
</el-button>
|
||||
<ai-import :instance="instance" :dict="dict" type="appconvenientaddressbook" name="便民通讯录"
|
||||
@success="getList()">
|
||||
<el-button icon="iconfont iconImport">导入</el-button>
|
||||
</ai-import>
|
||||
<ai-download :instance="instance" url="/app/appconvenientaddressbook/export" :params="search" fileName="便民通讯录" :disabled="tableData.length == 0">
|
||||
<ai-download :instance="instance" url="/app/appconvenientaddressbook/export" :params="search" fileName="便民通讯录"
|
||||
:disabled="tableData.length == 0">
|
||||
<el-button icon="iconfont iconExported" :disabled="tableData.length == 0">导出</el-button>
|
||||
</ai-download>
|
||||
</template>
|
||||
<template slot="right">
|
||||
<el-input
|
||||
v-model="search.name"
|
||||
class="search-input"
|
||||
size="small"
|
||||
@keyup.enter.native="search.current = 1, getList()"
|
||||
placeholder="请输入名称/电话/类型"
|
||||
clearable
|
||||
@change="getList"
|
||||
@clear="search.current = 1, search.name = '', getList()"
|
||||
suffix-icon="iconfont iconSearch">
|
||||
v-model="search.name"
|
||||
class="search-input"
|
||||
size="small"
|
||||
v-throttle="() => {search.current = 1, getList()}"
|
||||
placeholder="请输入名称/电话/类型"
|
||||
clearable
|
||||
@clear="search.current = 1, search.name = '', getList()"
|
||||
suffix-icon="iconfont iconSearch">
|
||||
</el-input>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-table
|
||||
:tableData="tableData"
|
||||
:col-configs="colConfigs"
|
||||
:total="total"
|
||||
style="margin-top: 6px;"
|
||||
:current.sync="search.current"
|
||||
:size.sync="search.size"
|
||||
@getList="getList">
|
||||
:tableData="tableData"
|
||||
:col-configs="colConfigs"
|
||||
:total="total"
|
||||
style="margin-top: 6px;"
|
||||
:current.sync="search.current"
|
||||
:size.sync="search.size"
|
||||
@getList="getList">
|
||||
<el-table-column slot="isPublic" label="是否公开" align="center">
|
||||
<template slot-scope="{ row }">
|
||||
<el-switch
|
||||
v-model="row.isPublic"
|
||||
active-value="1"
|
||||
@change="e => onChange(row.id, e)"
|
||||
inactive-value="0">
|
||||
v-model="row.isPublic"
|
||||
active-value="1"
|
||||
@change="e => onChange(row.id, e)"
|
||||
inactive-value="0">
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -91,176 +93,165 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
export default {
|
||||
name: 'List',
|
||||
import {mapState} from 'vuex'
|
||||
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object
|
||||
},
|
||||
export default {
|
||||
name: 'List',
|
||||
|
||||
data() {
|
||||
return {
|
||||
search: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
name: '',
|
||||
areaId: ''
|
||||
},
|
||||
defaultExpanded: [],
|
||||
defaultChecked: [],
|
||||
areaTree: [],
|
||||
defaultProps: {
|
||||
children: 'children',
|
||||
label: 'name'
|
||||
},
|
||||
currIndex: -1,
|
||||
areaList: [],
|
||||
total: 10,
|
||||
colConfigs: [
|
||||
{prop: 'name', label: '名称', align: 'left'},
|
||||
{prop: 'type', label: '类型', align: 'center'},
|
||||
{prop: 'phone', label: '电话', align: 'center'},
|
||||
{prop: 'createTime', align: 'center', label: '创建时间'},
|
||||
{slot: 'isPublic', label: '是否公开', align: 'center'}
|
||||
],
|
||||
areaName: '',
|
||||
unitName: '',
|
||||
tableData: []
|
||||
}
|
||||
},
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
data() {
|
||||
return {
|
||||
search: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
name: '',
|
||||
areaId: ''
|
||||
},
|
||||
defaultExpanded: [],
|
||||
defaultChecked: [],
|
||||
areaTree: [],
|
||||
defaultProps: {
|
||||
children: 'children',
|
||||
label: 'name'
|
||||
},
|
||||
currIndex: -1,
|
||||
total: 10,
|
||||
colConfigs: [
|
||||
{prop: 'name', label: '名称', align: 'left'},
|
||||
{prop: 'type', label: '类型', align: 'center'},
|
||||
{prop: 'phone', label: '电话', align: 'center'},
|
||||
{prop: 'createTime', align: 'center', label: '创建时间'},
|
||||
{slot: 'isPublic', label: '是否公开', align: 'center'}
|
||||
],
|
||||
areaName: '',
|
||||
unitName: '',
|
||||
tableData: []
|
||||
}
|
||||
},
|
||||
|
||||
isShowAdd () {
|
||||
const str = this.search.areaId.substr(this.search.areaId.length - 3)
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
|
||||
return false
|
||||
}
|
||||
},
|
||||
isShowAdd() {
|
||||
return false
|
||||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
unitName (val) {
|
||||
this.$refs.tree.filter(val)
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
unitName(val) {
|
||||
this.$refs.tree.filter(val)
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.search.areaId = this.user.info.areaId
|
||||
this.areaName = this.user.info.areaName
|
||||
this.getTree()
|
||||
this.getAreaList()
|
||||
this.getList()
|
||||
created() {
|
||||
this.search.areaId = this.user.info.areaId
|
||||
this.areaName = this.user.info.areaName
|
||||
this.getTree()
|
||||
this.getList()
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.$nextTick(() => {
|
||||
})
|
||||
},
|
||||
|
||||
methods: {
|
||||
getList() {
|
||||
this.instance.post(`/app/appconvenientaddressbook/list`, null, {
|
||||
params: {
|
||||
...this.search
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.tableData = res.data.records
|
||||
this.total = res.data.total
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
methods: {
|
||||
getList() {
|
||||
this.instance.post(`/app/appconvenientaddressbook/list`, null, {
|
||||
params: {
|
||||
...this.search
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.tableData = res.data.records
|
||||
this.total = res.data.total
|
||||
}
|
||||
})
|
||||
},
|
||||
onChange(id) {
|
||||
this.instance.post(`/app/appconvenientaddressbook/enable?id=${id}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success('修改成功')
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onChange (id) {
|
||||
this.instance.post(`/app/appconvenientaddressbook/enable?id=${id}`).then(res => {
|
||||
filterNode(value, data) {
|
||||
if (!value) return true
|
||||
return data.name.indexOf(value) !== -1
|
||||
},
|
||||
|
||||
onTreeChange(e) {
|
||||
this.search.areaId = e.id
|
||||
this.areaName = e.name
|
||||
this.search.current = 1
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
|
||||
getTree() {
|
||||
this.instance.post(`/admin/area/queryAllArea?id=${this.user.info.areaId}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
let parent = res.data.map(v => {
|
||||
v.label = v.name
|
||||
v.children = []
|
||||
|
||||
return v
|
||||
}).filter(e => !e.parentid)[0]
|
||||
this.defaultExpanded = [parent.id]
|
||||
this.defaultChecked = [parent.id]
|
||||
this.search.areaId = parent.id
|
||||
this.addChild(parent, res.data)
|
||||
this.areaTree = [parent]
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.$refs.tree.setCurrentKey(parent.id)
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
addChild(parent, list) {
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
if (list[i].parentId === parent.id) {
|
||||
parent.children.push(list[i])
|
||||
}
|
||||
}
|
||||
|
||||
if (list.length > 0) {
|
||||
parent['children'].map(v => this.addChild(v, list))
|
||||
}
|
||||
},
|
||||
|
||||
remove(id) {
|
||||
this.$confirm('确定删除该数据?').then(() => {
|
||||
this.instance.post(`/app/appconvenientaddressbook/delete?ids=${id}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success('修改成功')
|
||||
this.$message.success('删除成功!')
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
filterNode(value, data) {
|
||||
if (!value) return true
|
||||
return data.name.indexOf(value) !== -1
|
||||
},
|
||||
|
||||
onTreeChange (e) {
|
||||
this.search.areaId = e.id
|
||||
this.areaName = e.name
|
||||
this.search.current = 1
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
|
||||
getTree () {
|
||||
this.instance.post(`/admin/area/queryAllArea?id=${this.user.info.areaId}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
let parent = res.data.map(v => {
|
||||
v.label = v.name
|
||||
v.children = []
|
||||
|
||||
return v
|
||||
}).filter(e => !e.parentid)[0]
|
||||
this.defaultExpanded = [parent.id]
|
||||
this.defaultChecked = [parent.id]
|
||||
this.search.areaId = parent.id
|
||||
this.addChild(parent, res.data)
|
||||
this.areaTree = [parent]
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.$refs.tree.setCurrentKey(parent.id)
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
addChild (parent, list) {
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
if (list[i].parentId === parent.id) {
|
||||
parent.children.push(list[i])
|
||||
}
|
||||
toAdd(id) {
|
||||
this.$emit('change', {
|
||||
type: 'Add',
|
||||
params: {
|
||||
areaName: this.areaName,
|
||||
id: id || '',
|
||||
areaId: this.search.areaId
|
||||
}
|
||||
|
||||
if (list.length > 0) {
|
||||
parent['children'].map(v => this.addChild(v, list))
|
||||
}
|
||||
},
|
||||
|
||||
getAreaList() {
|
||||
this.instance.post(`/admin/area/queryAreaByParentId?id=341021104000`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.areaList = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
remove(id) {
|
||||
this.$confirm('确定删除该数据?').then(() => {
|
||||
this.instance.post(`/app/appconvenientaddressbook/delete?ids=${id}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success('删除成功!')
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
toAdd(id) {
|
||||
this.$emit('change', {
|
||||
type: 'Add',
|
||||
params: {
|
||||
areaName: this.areaName,
|
||||
id: id || '',
|
||||
areaId: this.search.areaId
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@@ -315,6 +306,7 @@
|
||||
|
||||
.addressBook-left__list--search {
|
||||
flex: 1;
|
||||
|
||||
::v-deep input {
|
||||
width: 100%;
|
||||
}
|
||||
@@ -336,7 +328,7 @@
|
||||
background: transparent;
|
||||
|
||||
.el-tree-node__expand-icon.is-leaf {
|
||||
color: transparent!important;
|
||||
color: transparent !important;
|
||||
}
|
||||
|
||||
.el-tree-node__content > .el-tree-node__expand-icon {
|
||||
@@ -369,7 +361,7 @@
|
||||
}
|
||||
|
||||
background: #2266FF;
|
||||
|
||||
|
||||
span {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
size="small"
|
||||
placeholder="请输入姓名"
|
||||
clearable
|
||||
@keyup.enter.native="search.current = 1, getList()"
|
||||
v-throttle="() => {search.current = 1, getList()}"
|
||||
@clear="search.current = 1, search.name = '', getList()"
|
||||
suffix-icon="iconfont iconSearch">
|
||||
</el-input>
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
<ai-title title="三会一课" isShowBottomBorder slot="title">
|
||||
<template #rightBtn>
|
||||
<ai-party :instance="instance" v-model="partyId" :topOrgId="topOrgId" :name.sync="partyOrgLabel"
|
||||
style="display:inline-block" @origin="changeParty" customClicker url="/app/partyOrganization/queryAllChildren">
|
||||
style="display:inline-block" @origin="changeParty" customClicker
|
||||
url="/app/partyOrganization/queryAllChildren">
|
||||
<el-input size="small" v-model="partyOrgLabel" readonly placeholder="选择党组织">
|
||||
<el-row slot="append" type="flex" class="partyPicker">
|
||||
<i class="iconfont icondangyuan"/>
|
||||
@@ -42,11 +43,7 @@
|
||||
</template>
|
||||
<template #right>
|
||||
<el-input size="small" v-model="search.meetingAgenda" placeholder="会议标题/创建人"
|
||||
prefix-icon="iconfont iconSearch" clearable
|
||||
@keyup.enter.native="page.current=1,getAppThreeMeetingInfo()"/>
|
||||
<el-button type="primary" icon="iconfont iconSearch" @click="page.current=1,getAppThreeMeetingInfo()">查询
|
||||
</el-button>
|
||||
<el-button icon="el-icon-refresh-right" @click="resetSearch">重置</el-button>
|
||||
suffix-icon="iconfont iconSearch" v-throttle="() => {page.current = 1, getAppThreeMeetingInfo()}" clearable @clear="search.meetingAgenda = '', page.current=1,getAppThreeMeetingInfo()"/>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-search-bar>
|
||||
@@ -136,18 +133,19 @@
|
||||
<div class="content input-240">
|
||||
<div class="flex">
|
||||
<el-date-picker
|
||||
v-model="searchYear"
|
||||
type="year"
|
||||
size="small"
|
||||
style="width: 200px; margin-right: 10px;"
|
||||
value-format="yyyy"
|
||||
@change="getMeetStatistics"
|
||||
placeholder="选择年份">
|
||||
v-model="searchYear"
|
||||
type="year"
|
||||
size="small"
|
||||
style="width: 200px; margin-right: 10px;"
|
||||
value-format="yyyy"
|
||||
@change="getMeetStatistics"
|
||||
placeholder="选择年份">
|
||||
</el-date-picker>
|
||||
<el-select style="width: 200px" v-model="searchMonth" placeholder="全部" size="small" clearable class="timeSelect"
|
||||
@change="getMeetStatistics">
|
||||
<el-select style="width: 200px" v-model="searchMonth" placeholder="全部" size="small" clearable
|
||||
class="timeSelect"
|
||||
@change="getMeetStatistics">
|
||||
<el-option v-for="(op,j) in dict.getDict('monthList')" :key="j" :label="op.dictName"
|
||||
:value="op.dictValue"/>
|
||||
:value="op.dictValue"/>
|
||||
</el-select>
|
||||
</div>
|
||||
<ul class="totalTitle">
|
||||
|
||||
@@ -47,28 +47,28 @@
|
||||
</span>
|
||||
</span>
|
||||
<span class="value" v-else>-</span></el-form-item>
|
||||
<ai-title title="附件" isShowBottomBorder>
|
||||
<template #rightBtn>
|
||||
<el-button type="text" icon="iconfont iconDownload" @click="downLoadAll">下载全部</el-button>
|
||||
</template>
|
||||
</ai-title>
|
||||
<el-form-item label-width="0">
|
||||
<div v-if="obj.annex.length">
|
||||
<div class="flie" v-for="(item, index) in obj.annex" :key="index"
|
||||
@click="downFile(item)">
|
||||
<p>
|
||||
<svg aria-hidden="true" style="width:24px;height:24px;">
|
||||
<use xlink:href="#iconAppendix_UNdownload"></use>
|
||||
</svg>
|
||||
<span>{{ item.name }}</span>
|
||||
</p>
|
||||
<span style="color:#999;">{{ (item.size / 1024).toFixed(2) + "KB" }}
|
||||
<span class="iconfont iconDownload" style="color:#5088FF"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="no-data" style="height:160px;width:100%;" v-else></div>
|
||||
</el-form-item>
|
||||
<!-- <ai-title title="附件" isShowBottomBorder>-->
|
||||
<!-- <template #rightBtn>-->
|
||||
<!-- <el-button type="text" icon="iconfont iconDownload" @click="downLoadAll">下载全部</el-button>-->
|
||||
<!-- </template>-->
|
||||
<!-- </ai-title>-->
|
||||
<!-- <el-form-item label-width="0">-->
|
||||
<!-- <div v-if="obj.annex.length">-->
|
||||
<!-- <div class="flie" v-for="(item, index) in obj.annex" :key="index"-->
|
||||
<!-- @click="downFile(item)">-->
|
||||
<!-- <p>-->
|
||||
<!-- <svg aria-hidden="true" style="width:24px;height:24px;">-->
|
||||
<!-- <use xlink:href="#iconAppendix_UNdownload"></use>-->
|
||||
<!-- </svg>-->
|
||||
<!-- <span>{{ item.name }}</span>-->
|
||||
<!-- </p>-->
|
||||
<!-- <span style="color:#999;">{{ (item.size / 1024).toFixed(2) + "KB" }}-->
|
||||
<!-- <span class="iconfont iconDownload" style="color:#5088FF"></span>-->
|
||||
<!-- </span>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="no-data" style="height:160px;width:100%;" v-else></div>-->
|
||||
<!-- </el-form-item>-->
|
||||
<ai-title title="人员信息" isShowBottomBorder/>
|
||||
<el-form-item label="与会组织">{{ arrLabel(obj.appThreeMeetingOrganizationList, 'name') }}</el-form-item>
|
||||
<el-form-item label="主持人">{{ arrLabel(obj.hostList, 'userName') }}</el-form-item>
|
||||
|
||||
175
packages/3.0.0/AppNavConfig/components/List.vue
vendored
175
packages/3.0.0/AppNavConfig/components/List.vue
vendored
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<ai-list class="list">
|
||||
<ai-list class="list" v-loading="isLoading">
|
||||
<ai-title slot="title" title="导航配置" isShowBottomBorder></ai-title>
|
||||
<template slot="content">
|
||||
<ai-card title="首页功能">
|
||||
@@ -37,6 +37,13 @@
|
||||
<i class="el-icon-error icon" @click="removeApp(item.id)" v-if="isRemove && item.type !== '0' && item.picked !== '1'"></i>
|
||||
<i class="el-icon-circle-plus icon" @click="addApp(item)" v-if="isCanAdd(item)"></i>
|
||||
<h2>{{ item.name }}</h2>
|
||||
<div class="item-setting">
|
||||
<div class="item-mask"></div>
|
||||
<div class="item-wrapper__icon" @click.stop="editApp(item)">
|
||||
<i class="el-icon-setting"></i>
|
||||
<div>编辑</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -93,9 +100,35 @@
|
||||
<el-form-item label="图标" prop="pictureUrl" style="width: 100%;" :rules="[{ required: true, message: '请上传图标 ', trigger: 'change' }]">
|
||||
<ai-uploader v-model="form.pictureUrl" :instance="instance" :limit="1"></ai-uploader>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="权限配置" v-if="form.type === '0'" prop="pictureUrl" style="width: 100%;">
|
||||
<el-input disabled :value="girdName" size="small" placeholder="请选择地区">
|
||||
<template slot="append">
|
||||
<el-button size="small" @click="isShowArea = true">选择地区</el-button>
|
||||
</template>
|
||||
</el-input>
|
||||
</el-form-item> -->
|
||||
</div>
|
||||
</el-form>
|
||||
</ai-dialog>
|
||||
<ai-dialog
|
||||
title="选择权限"
|
||||
:visible.sync="isShowArea"
|
||||
:destroyOnClose="true"
|
||||
@close="isShowArea = false"
|
||||
@onConfirm="getCheckedTree"
|
||||
width="720px">
|
||||
<el-tree
|
||||
:data="treeList"
|
||||
:props="defaultProps"
|
||||
node-key="id"
|
||||
check-strictly
|
||||
ref="tree"
|
||||
show-checkbox
|
||||
:default-checked-keys="defaultChecked"
|
||||
:default-expanded-keys="defaultExpanded"
|
||||
default-expand-all>
|
||||
</el-tree>
|
||||
</ai-dialog>
|
||||
</template>
|
||||
</ai-list>
|
||||
</template>
|
||||
@@ -120,7 +153,15 @@
|
||||
id: '',
|
||||
isEdit: false,
|
||||
isRemove: false,
|
||||
defaultExpanded: [],
|
||||
isRest: true,
|
||||
isShowArea: false,
|
||||
isLoading: false,
|
||||
defaultProps: {
|
||||
children: "children",
|
||||
label: "label",
|
||||
},
|
||||
treeList: [],
|
||||
form: {
|
||||
type: '',
|
||||
pictureUrl: [],
|
||||
@@ -143,8 +184,10 @@
|
||||
dictName: '客服',
|
||||
dictValue: '4'
|
||||
}],
|
||||
info: {},
|
||||
isShowAdd: false,
|
||||
list: []
|
||||
list: [],
|
||||
defaultChecked: []
|
||||
}
|
||||
},
|
||||
|
||||
@@ -169,6 +212,86 @@
|
||||
})
|
||||
},
|
||||
|
||||
getCheckedTree () {
|
||||
const keys = this.$refs.tree.getCheckedNodes(false, true).map(v => v.id)
|
||||
|
||||
this.instance.post(`/app/appminihomeconfig/addOrUpdate`, {
|
||||
...this.info,
|
||||
areaIds: keys
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success('修改成功')
|
||||
this.isShowArea = false
|
||||
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
format (list) {
|
||||
return list.map(item => {
|
||||
if (item.girdLevel !== '2') {
|
||||
item.disabled = true
|
||||
}
|
||||
|
||||
if (item.girdList && item.girdList.length) {
|
||||
item.girdList = this.format(item.girdList)
|
||||
}
|
||||
|
||||
return item
|
||||
})
|
||||
},
|
||||
|
||||
editApp (e) {
|
||||
if (e.type !== '0') {
|
||||
this.form = {
|
||||
...e,
|
||||
pictureUrl: [{
|
||||
url: e.pictureUrl
|
||||
}]
|
||||
}
|
||||
this.isShowAdd = true
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
this.info = e
|
||||
this.isLoading = true
|
||||
this.instance.post(`/app/appminihomeconfig/queryDetailById?id=${e.id}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
let parent = res.data.areaConfigs.map(v => {
|
||||
v.label = v.name
|
||||
v.children = []
|
||||
|
||||
return v
|
||||
}).filter(e => !e.parentId)[0]
|
||||
this.defaultExpanded = res.data.areaConfigs.filter(v => v.checked).map(v => v.id)
|
||||
this.defaultChecked = res.data.areaConfigs.filter(v => v.checked).map(v => v.id)
|
||||
this.addChild(parent, res.data.areaConfigs)
|
||||
this.treeList = [parent]
|
||||
|
||||
this.isShowArea = true
|
||||
}
|
||||
|
||||
this.isLoading = false
|
||||
}).catch(() => {
|
||||
this.isLoading = false
|
||||
})
|
||||
},
|
||||
|
||||
addChild(parent, list) {
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
if (list[i].parentId === parent.id) {
|
||||
parent.children.push(list[i])
|
||||
}
|
||||
}
|
||||
|
||||
if (list.length > 0) {
|
||||
parent['children'].map(v => this.addChild(v, list))
|
||||
}
|
||||
},
|
||||
|
||||
isCanAdd (item) {
|
||||
const isHas = this.picked.map(v => v.id).indexOf(item.id) > -1
|
||||
|
||||
@@ -238,7 +361,6 @@
|
||||
if (valid) {
|
||||
this.instance.post(`/app/appminihomeconfig/addOrUpdate`, {
|
||||
...this.form,
|
||||
id: this.id || null,
|
||||
pictureUrl: this.form.pictureUrl[0].url
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
@@ -328,6 +450,53 @@
|
||||
position: relative;
|
||||
margin: 0 16px 16px 0;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
|
||||
.item-setting {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 0;
|
||||
opacity: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
transition: all ease 0.3s;
|
||||
|
||||
.item-wrapper__icon {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
|
||||
div {
|
||||
margin-top: 6px;
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
i, div {
|
||||
font-size: 16px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.item-mask {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(0, 0, 0, 0.6);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
z-index: 1;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
img {
|
||||
width: 60px;
|
||||
|
||||
2
packages/3.0.0/AppNotice/components/List.vue
vendored
2
packages/3.0.0/AppNotice/components/List.vue
vendored
@@ -13,7 +13,7 @@
|
||||
v-model="search.title"
|
||||
class="search-input"
|
||||
size="small"
|
||||
@keyup.enter.native="search.current = 1, getList()"
|
||||
v-throttle="() => {search.current = 1, getList()}"
|
||||
placeholder="请输入标题"
|
||||
clearable
|
||||
@change="getList"
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
v-model="search.title"
|
||||
class="search-input"
|
||||
size="small"
|
||||
@keyup.enter.native="search.title = 1, search.title, getList()"
|
||||
placeholder="请输入课程主题"
|
||||
clearable
|
||||
@clear="search.current = 1, search.title = '', getList()"
|
||||
v-throttle="() => {search.current = 1, getList()}"
|
||||
@clear="search.current=1, search.title = '', getList()"
|
||||
suffix-icon="iconfont iconSearch">
|
||||
</el-input>
|
||||
</template>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
v-model="search.content"
|
||||
class="search-input"
|
||||
size="small"
|
||||
@keyup.enter.native="search.current = 1, getList()"
|
||||
v-throttle="() => {search.current = 1, getList()}"
|
||||
placeholder="请输入内容描述/上报居民/联系方式"
|
||||
clearable
|
||||
@change="getList"
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
v-model="search.groupName"
|
||||
class="search-input"
|
||||
size="small"
|
||||
@keyup.enter.native="search.current = 1, getList()"
|
||||
v-throttle="() => {search.current = 1, getList()}"
|
||||
placeholder="请输入事件类型名称"
|
||||
clearable
|
||||
@change="getList"
|
||||
|
||||
@@ -1,14 +1,24 @@
|
||||
<template>
|
||||
<div class="AppReturnHomeRegister">
|
||||
<keep-alive :include="['List']">
|
||||
<component ref="component" :is="component" @change="onChange" :params="params" :instance="instance" :dict="dict"></component>
|
||||
</keep-alive>
|
||||
</div>
|
||||
<ai-list class="AppReturnHomeRegister" v-if="!isShowDetail">
|
||||
<template slot="title">
|
||||
<ai-title title="返乡登记" :isShowBottomBorder="false" :fullname.sync="areaName" v-model="areaId" :instance="instance" @change="onAreaChange"></ai-title>
|
||||
</template>
|
||||
<template slot="tabs">
|
||||
<el-tabs v-model="currIndex">
|
||||
<el-tab-pane v-for="(tab,i) in tabs" :key="i" :label="tab.label">
|
||||
<component :areaId="areaId" :ref="String(i)" v-if="currIndex == i" :is="tab.comp" @change="onChange" lazy :instance="instance" :dict="dict" :permissions="permissions"/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</template>
|
||||
</ai-list>
|
||||
<Detail v-else-if="component === 'Detail'" :params="params" :instance="instance" :dict="dict" :permissions="permissions" @change="onChange"></Detail>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import List from './components/List.vue'
|
||||
import Detail from './components/Detail.vue'
|
||||
import AbnormalList from './components/AbnormalList.vue'
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'AppReturnHomeRegister',
|
||||
@@ -16,7 +26,8 @@
|
||||
|
||||
components: {
|
||||
List,
|
||||
Detail
|
||||
Detail,
|
||||
AbnormalList
|
||||
},
|
||||
|
||||
props: {
|
||||
@@ -25,13 +36,35 @@
|
||||
permissions: Function
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
|
||||
tabs () {
|
||||
const tabList = [
|
||||
{label: '返乡登记', name: 'List', comp: List, permission: ''},
|
||||
// {label: '历史异常人员', name: 'AbnormalList', comp: AbnormalList, permission: ''}
|
||||
]
|
||||
|
||||
return tabList
|
||||
}
|
||||
},
|
||||
|
||||
data () {
|
||||
return {
|
||||
activeName: 'JoinEvent',
|
||||
currIndex: '0',
|
||||
component: 'List',
|
||||
params: {}
|
||||
params: {},
|
||||
areaId: '',
|
||||
isShowDetail: false,
|
||||
areaName: ''
|
||||
}
|
||||
},
|
||||
|
||||
created () {
|
||||
this.areaId = this.user.info.areaId
|
||||
},
|
||||
|
||||
methods: {
|
||||
onChange (data) {
|
||||
if (data.type === 'Detail') {
|
||||
@@ -39,9 +72,15 @@
|
||||
this.isShowDetail = true
|
||||
this.params = data.params
|
||||
}
|
||||
if (data.type === 'AbnormalList') {
|
||||
this.component = 'AbnormalList'
|
||||
this.isShowDetail = false
|
||||
this.params = data.params
|
||||
}
|
||||
|
||||
if (data.type === 'list') {
|
||||
if (data.type === 'List') {
|
||||
this.component = 'List'
|
||||
this.isShowDetail = false
|
||||
this.params = data.params
|
||||
|
||||
this.$nextTick(() => {
|
||||
@@ -50,6 +89,10 @@
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
onAreaChange () {
|
||||
this.$refs[this.currIndex][0].changeArea()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
200
packages/3.0.0/AppReturnHomeRegister/components/AbnormalList.vue
vendored
Normal file
200
packages/3.0.0/AppReturnHomeRegister/components/AbnormalList.vue
vendored
Normal file
@@ -0,0 +1,200 @@
|
||||
<template>
|
||||
<ai-list isTabs>
|
||||
<template slot="content">
|
||||
<ai-search-bar bottomBorder>
|
||||
<template #left>
|
||||
<ai-select
|
||||
v-model="search.status"
|
||||
clearable
|
||||
placeholder="请选择健康状态"
|
||||
:selectList="dictList"
|
||||
@change="search.current = 1, getList()">
|
||||
</ai-select>
|
||||
<ai-download :instance="instance" url="/app/appepidemicbackhomerecord/export" :params="param" fileName="返乡登记" :disabled="tableData.length == 0">
|
||||
<el-button icon="iconfont iconExported" :disabled="tableData.length == 0">导出</el-button>
|
||||
</ai-download>
|
||||
</template>
|
||||
<template #right>
|
||||
<el-input
|
||||
v-model="search.name"
|
||||
size="small"
|
||||
placeholder="请输入姓名"
|
||||
clearable
|
||||
v-throttle="() => {search.current = 1, getList()}"
|
||||
@clear="search.current = 1, search.name = '', getList()"
|
||||
suffix-icon="iconfont iconSearch">
|
||||
</el-input>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-table
|
||||
:tableData="tableData"
|
||||
:col-configs="colConfigs"
|
||||
:total="total"
|
||||
v-loading="loading"
|
||||
style="margin-top: 16px;"
|
||||
:current.sync="search.current"
|
||||
:size.sync="search.size"
|
||||
@getList="getList">
|
||||
<el-table-column slot="options" width="140px" fixed="right" label="操作" align="center">
|
||||
<template slot-scope="{ row }">
|
||||
<div class="table-options">
|
||||
<el-button type="text" @click="toDetail(row.id)">详情</el-button>
|
||||
<el-button type="text" @click="remove(row.id)">删除</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
</template>
|
||||
</ai-list>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
export default {
|
||||
name: 'AbnormalList',
|
||||
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object
|
||||
},
|
||||
|
||||
data () {
|
||||
return {
|
||||
search: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
name: '',
|
||||
arriveAreaId: '',
|
||||
status: ''
|
||||
},
|
||||
dictList: [{
|
||||
dictName: '异常',
|
||||
dictValue: '0'
|
||||
}, {
|
||||
dictName: '正常',
|
||||
dictValue: '1'
|
||||
}],
|
||||
info: {},
|
||||
colConfigs: [
|
||||
{ prop: 'name', label: '姓名' },
|
||||
{ prop: 'phone', align: 'center', label: '手机号码' },
|
||||
{ prop: 'startTime', align: 'center', label: '出发时间', formart: v => v.substr(0, v.length - 3) },
|
||||
{
|
||||
prop: 'startAreaName',
|
||||
align: 'center',
|
||||
label: '出发地区'
|
||||
},
|
||||
{ prop: 'arriveTime', align: 'center', label: '到达时间', formart: v => v.substr(0, v.length - 3) },
|
||||
{
|
||||
prop: 'arriveAreaName',
|
||||
align: 'center',
|
||||
label: '到达地区'
|
||||
},
|
||||
{ prop: 'checkTime', align: 'center', label: '核酸日期', formart: v => v.split(' ')[0] },
|
||||
{
|
||||
prop: 'status',
|
||||
align: 'center',
|
||||
label: '健康状态',
|
||||
render: (h, {row}) => {
|
||||
return h('span', {
|
||||
style: {
|
||||
color: row.status === '0' ? 'red' : '#333'
|
||||
}
|
||||
}, row.status === '0' ? '异常' : '正常')
|
||||
}
|
||||
}
|
||||
],
|
||||
ids: [],
|
||||
tableData: [],
|
||||
total: 0,
|
||||
loading: false,
|
||||
disabledLevel: 0
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
|
||||
param () {
|
||||
return this.search
|
||||
}
|
||||
},
|
||||
|
||||
created () {
|
||||
this.disabledLevel = this.user.info.areaList.length - 1
|
||||
this.search.arriveAreaId = this.user.info.areaId
|
||||
this.loading = true
|
||||
this.dict.load(['marriageType', 'marriagePersonType', 'modeType']).then(() => {
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
|
||||
methods: {
|
||||
getList () {
|
||||
this.instance.post(`/app/appepidemicbackhomerecord/list`, null, {
|
||||
params: {
|
||||
...this.search
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.tableData = res.data.records
|
||||
this.total = res.data.total
|
||||
this.loading = false
|
||||
} else {
|
||||
this.loading = false
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
|
||||
this.getTotalInfo()
|
||||
},
|
||||
|
||||
toDetail (id) {
|
||||
this.$emit('change', {
|
||||
type: 'Detail',
|
||||
params: {
|
||||
id: id || ''
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
changeArea () {
|
||||
this.search.current = 1
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.getList()
|
||||
this.getTotalInfo()
|
||||
})
|
||||
},
|
||||
|
||||
remove(id) {
|
||||
this.$confirm('确定删除该数据?').then(() => {
|
||||
this.instance.post(`/app/appepidemicbackhomerecord/delete?ids=${id}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success('删除成功!')
|
||||
this.getTotalInfo()
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
getTotalInfo () {
|
||||
this.instance.post(`/app/appepidemicbackhomerecord/statistic`, null, {
|
||||
params: {
|
||||
areaId: this.search.arriveAreaId
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.info = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
</style>
|
||||
@@ -258,7 +258,7 @@
|
||||
|
||||
cancel () {
|
||||
this.$emit('change', {
|
||||
type: 'list',
|
||||
type: 'List',
|
||||
isRefresh: true
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<ai-list class="list">
|
||||
<ai-title slot="title" title="返乡登记" v-if="search.arriveAreaId" isShowBottomBorder :instance="instance" :disabledLevel="disabledLevel" isShowArea v-model="search.arriveAreaId" @change="changeArea"></ai-title>
|
||||
<ai-list class="list" isTabs>
|
||||
<template slot="content">
|
||||
<div class="statistics-top">
|
||||
<div class="statistics-top__item">
|
||||
@@ -44,7 +43,7 @@
|
||||
size="small"
|
||||
placeholder="请输入姓名"
|
||||
clearable
|
||||
@keyup.enter.native="search.current = 1, getList()"
|
||||
v-throttle="() => {search.current = 1, getList()}"
|
||||
@clear="search.current = 1, search.name = '', getList()"
|
||||
suffix-icon="iconfont iconSearch">
|
||||
</el-input>
|
||||
@@ -80,7 +79,8 @@
|
||||
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object
|
||||
dict: Object,
|
||||
areaId: String
|
||||
},
|
||||
|
||||
data () {
|
||||
@@ -89,7 +89,6 @@
|
||||
current: 1,
|
||||
size: 10,
|
||||
name: '',
|
||||
arriveAreaId: '',
|
||||
status: ''
|
||||
},
|
||||
dictList: [{
|
||||
@@ -147,7 +146,6 @@
|
||||
|
||||
created () {
|
||||
this.disabledLevel = this.user.info.areaList.length - 1
|
||||
this.search.arriveAreaId = this.user.info.areaId
|
||||
this.loading = true
|
||||
this.dict.load(['marriageType', 'marriagePersonType', 'modeType']).then(() => {
|
||||
this.getList()
|
||||
@@ -158,7 +156,8 @@
|
||||
getList () {
|
||||
this.instance.post(`/app/appepidemicbackhomerecord/list`, null, {
|
||||
params: {
|
||||
...this.search
|
||||
...this.search,
|
||||
arriveAreaId: this.areaId
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
@@ -230,7 +229,7 @@
|
||||
background: transparent!important;
|
||||
box-shadow: none!important;
|
||||
margin: 0!important;
|
||||
padding: 12px 16px 12px!important;
|
||||
padding: 0 0 0!important;
|
||||
}
|
||||
}
|
||||
.statistics-top {
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
v-model="search.province"
|
||||
class="search-input"
|
||||
size="small"
|
||||
@keyup.enter.native="search.current = 1, getList()"
|
||||
v-throttle="() => {search.current = 1, getList()}"
|
||||
placeholder="省级名称/市级名称/区级名称"
|
||||
clearable
|
||||
@clear="search.current = 1, search.province = '', getList()"
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
size="small"
|
||||
placeholder="请输入标题/联系电话"
|
||||
clearable
|
||||
@keyup.enter.native="search.current = 1, getList()"
|
||||
v-throttle="() => {search.current = 1, getList()}"
|
||||
@clear="search.current = 1, search.title = '', getList()"
|
||||
suffix-icon="iconfont iconSearch">
|
||||
</el-input>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
size="small"
|
||||
placeholder="请输入专题名称"
|
||||
clearable
|
||||
@keyup.enter.native="search.current = 1, getList()"
|
||||
v-throttle="() => {search.current = 1, getList()}"
|
||||
@clear="search.current = 1, search.name = '', getList()"
|
||||
suffix-icon="iconfont iconSearch">
|
||||
</el-input>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
v-model="search.title"
|
||||
class="search-input"
|
||||
size="small"
|
||||
@keyup.enter.native="search.current = 1, getList()"
|
||||
v-throttle="() => {search.current = 1, getList()}"
|
||||
placeholder="请输入活动名称"
|
||||
clearable
|
||||
@change="getList"
|
||||
|
||||
@@ -153,7 +153,6 @@
|
||||
chart2: '',
|
||||
currIndex: -1,
|
||||
list: [],
|
||||
areaList: [],
|
||||
unitName: '',
|
||||
areaId: ''
|
||||
}
|
||||
@@ -175,7 +174,6 @@
|
||||
this.areaId = this.user.info.areaId
|
||||
this.areaName = this.user.info.areaName
|
||||
this.getTree()
|
||||
this.getAreaList()
|
||||
this.loading = true
|
||||
this.$nextTick(() => {
|
||||
this.chart1 = echarts.init(document.querySelector('.chart1'))
|
||||
@@ -245,14 +243,6 @@
|
||||
}
|
||||
},
|
||||
|
||||
getAreaList() {
|
||||
this.instance.post(`/admin/area/queryAreaByParentId?id=341021104000`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.areaList = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
getInfo () {
|
||||
this.loading = true
|
||||
this.instance.post(`/app/appvillageactivityinfo/statistic?areaId=${this.areaId}&time1=${this.time1 || ''}&time2=${this.time2 || '-'}`).then(res => {
|
||||
|
||||
@@ -63,14 +63,11 @@
|
||||
picture: [],
|
||||
isPublic: '1'
|
||||
},
|
||||
id: '',
|
||||
areaList: []
|
||||
id: ''
|
||||
}
|
||||
},
|
||||
|
||||
created () {
|
||||
this.getAreaList()
|
||||
|
||||
if (this.params && this.params.areaId && !this.params.id) {
|
||||
this.form.areaId = this.params.areaId
|
||||
this.form.areaName = this.params.areaName
|
||||
@@ -92,19 +89,6 @@
|
||||
})
|
||||
},
|
||||
|
||||
getAreaList() {
|
||||
this.instance.post(`/admin/area/queryAreaByParentId?id=341021104000`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.areaList = res.data.map(item => {
|
||||
item.dictName = item.name
|
||||
item.dictValue = item.id
|
||||
|
||||
return item
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onClose () {
|
||||
this.form.explain = ''
|
||||
},
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
v-model="search.name"
|
||||
class="search-input"
|
||||
size="small"
|
||||
@keyup.enter.native="search.current = 1, getList()"
|
||||
v-throttle="() => {search.current = 1, getList()}"
|
||||
placeholder="请输入姓名/电话"
|
||||
clearable
|
||||
@change="getList"
|
||||
@@ -110,7 +110,6 @@
|
||||
label: 'name'
|
||||
},
|
||||
currIndex: -1,
|
||||
areaList: [],
|
||||
total: 10,
|
||||
colConfigs: [
|
||||
{prop: 'name', label: '姓名', align: 'left'},
|
||||
@@ -140,7 +139,6 @@
|
||||
this.search.areaId = this.user.info.areaId
|
||||
this.areaName = this.user.info.areaName
|
||||
this.getTree()
|
||||
this.getAreaList()
|
||||
this.getList()
|
||||
|
||||
this.$nextTick(() => {
|
||||
@@ -219,14 +217,6 @@
|
||||
}
|
||||
},
|
||||
|
||||
getAreaList() {
|
||||
this.instance.post(`/admin/area/queryAreaByParentId?id=341021104000`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.areaList = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
remove(id) {
|
||||
this.$confirm('确定删除该数据?').then(() => {
|
||||
this.instance.post(`/app/appvillageauxiliarypolice/delete?ids=${id}`).then(res => {
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
v-model="search.title"
|
||||
class="search-input"
|
||||
size="small"
|
||||
@keyup.enter.native="search.current = 1, getList()"
|
||||
v-throttle="() => {search.current = 1, getList()}"
|
||||
placeholder="请输入标题"
|
||||
clearable
|
||||
@clear="search.current = 1, search.title = '', getList()"
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
v-model="search.title"
|
||||
class="search-input"
|
||||
size="small"
|
||||
@keyup.enter.native="search.current = 1, search.title, getList()"
|
||||
v-throttle="() => {search.current=1,getList()}"
|
||||
placeholder="请输入标题"
|
||||
clearable
|
||||
@clear="search.current = 1, search.title = '', getList()"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
v-model="search.title"
|
||||
class="search-input"
|
||||
size="small"
|
||||
@keyup.enter.native="search.current = 1, search.title, getList()"
|
||||
v-throttle="() => {search.current=1,getList()}"
|
||||
placeholder="请输入议事主题"
|
||||
clearable
|
||||
@clear="search.current = 1, search.title = '', getList()"
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
size="small"
|
||||
placeholder="请输入姓名"
|
||||
clearable
|
||||
@keyup.enter.native="search.current = 1, getList()"
|
||||
v-throttle="() => {search.current = 1, getList()}"
|
||||
@clear="search.current = 1, search.name = '', getList()"
|
||||
suffix-icon="iconfont iconSearch">
|
||||
</el-input>
|
||||
|
||||
@@ -461,7 +461,11 @@
|
||||
return this.$message.error('请上传图片')
|
||||
}
|
||||
|
||||
this.images.push(this.form.images)
|
||||
this.images = [
|
||||
...this.images,
|
||||
...this.form.images
|
||||
]
|
||||
|
||||
this.form.images = []
|
||||
this.isShowAddImg = false
|
||||
},
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
size="small"
|
||||
placeholder="请输入模板名称或创建人"
|
||||
clearable
|
||||
@keyup.enter.native="search.current = 1, getList()"
|
||||
v-throttle="() => {search.current = 1, getList()}"
|
||||
@clear="search.current = 1, search.title = '', getList()"
|
||||
suffix-icon="iconfont iconSearch">
|
||||
</el-input>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<el-input
|
||||
v-model="search.name"
|
||||
size="small"
|
||||
@keyup.enter.native="search.current = 1, getList()"
|
||||
v-throttle="() => {search.current = 1, getList()}"
|
||||
placeholder="请输入名字"
|
||||
clearable
|
||||
@clear="search.current = 1, search.name = '', getList()"
|
||||
|
||||
@@ -620,7 +620,7 @@ const components = [
|
||||
title: '',
|
||||
moniterId: '',
|
||||
monitorType: 'cmcc',
|
||||
api: '/app/appzyvideoequipment/list',
|
||||
api: '/app/appzyvideoequipment/list2',
|
||||
border: 'border2',
|
||||
sourceDataId: '',
|
||||
dataType: 'staticData',
|
||||
|
||||
@@ -100,13 +100,20 @@
|
||||
if (item.dataType !== 'staticData' && ((item.type.indexOf('Chart') > -1) || item.type === 'display' || item.type === 'table' || item.type === 'summary')) {
|
||||
this.getSourceData(item, index)
|
||||
}
|
||||
if (item.type === 'monitor' && item.monitorType !== 'hik' && item.monitorType !== 'dahua') {
|
||||
if (item.type === 'monitor' && item.monitorType === 'cmcc') {
|
||||
this.instance.post(`${this.urlPrefix}/appzyvideoequipment/getWebSdkUrl?deviceId=${item.moniterId}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$set(this.componentList[index], 'src', JSON.parse(res.data).url)
|
||||
}
|
||||
})
|
||||
}
|
||||
if (item.type === 'monitor' && item.monitorType === 'slw') {
|
||||
this.instance.post(`${this.urlPrefix}/appzyvideoequipment/getWebSdkUrl?deviceId=${item.moniterId}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$set(this.componentList[index], 'src', res.data)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
v-model="searchObj.con"
|
||||
size="small"
|
||||
placeholder="户主姓名"
|
||||
@keyup.enter.native="page.current = 1, getList()"
|
||||
@clear="search.current = 1, search.con = '', getList()"
|
||||
v-throttle="() => {page.current = 1, getList()}"
|
||||
@clear="page.current = 1, searchObj.con = '', getList()"
|
||||
clearable
|
||||
suffix-icon="iconfont iconSearch" />
|
||||
</template>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<ai-detail class="family_detail">
|
||||
<template slot="title">
|
||||
<ai-title title="余额明细" :isShowBack="true" :isShowBottomBorder="true" @onBackClick="$emit('goBack')" ></ai-title>
|
||||
<ai-title title="余额明细" :isShowBack="true" :isShowBottomBorder="true" @onBackClick="$emit('goBack')"></ai-title>
|
||||
</template>
|
||||
<template slot="content">
|
||||
<div class="detail-info">
|
||||
@@ -25,33 +25,33 @@
|
||||
<ai-card title="余额变动明细">
|
||||
<template slot="right">
|
||||
<ai-download
|
||||
:instance="instance"
|
||||
url="/app/appvillagerintegraldetail/export"
|
||||
:disabled="!Boolean(tableData.length)"
|
||||
:params="{familyName:detailInfo.name,doType:doType}"
|
||||
fileName="余额变动明细">
|
||||
:instance="instance"
|
||||
url="/app/appvillagerintegraldetail/export"
|
||||
:disabled="!Boolean(tableData.length)"
|
||||
:params="{familyId:detailInfo.id,bizType:doType}"
|
||||
fileName="余额变动明细">
|
||||
<span class="iconfont iconExported">导出</span>
|
||||
</ai-download>
|
||||
</template>
|
||||
<template #content>
|
||||
<el-select v-model="doType" placeholder="请选择类型" size='small' clearable @change="page.current=1,getList()">
|
||||
<el-select v-model="doType" placeholder="请选择类型" size='small' clearable @change="page.current=1,getList()">
|
||||
<el-option
|
||||
v-for="(item,i) in dict.getDict('integralDetailType')"
|
||||
:label="item.dictName"
|
||||
:key="i"
|
||||
:value="item.dictValue">
|
||||
v-for="(item,i) in dict.getDict('integralDetailType')"
|
||||
:label="item.dictName"
|
||||
:key="i"
|
||||
:value="item.dictValue">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<ai-table
|
||||
style="margin-top: 16px;"
|
||||
:tableData="tableData"
|
||||
:col-configs="colConfigs"
|
||||
:total="page.total"
|
||||
:border="true"
|
||||
:stripe="false"
|
||||
:current.sync="page.current"
|
||||
:size.sync="page.size"
|
||||
@getList="getList">
|
||||
style="margin-top: 16px;"
|
||||
:tableData="tableData"
|
||||
:col-configs="colConfigs"
|
||||
:total="page.total"
|
||||
:border="true"
|
||||
:stripe="false"
|
||||
:current.sync="page.current"
|
||||
:size.sync="page.size"
|
||||
@getList="getList">
|
||||
</ai-table>
|
||||
</template>
|
||||
</ai-card>
|
||||
@@ -60,153 +60,152 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'balance',
|
||||
export default {
|
||||
name: 'balance',
|
||||
|
||||
props: {
|
||||
detailInfo: {
|
||||
type: Object,
|
||||
require: true
|
||||
props: {
|
||||
detailInfo: {
|
||||
type: Object,
|
||||
require: true
|
||||
},
|
||||
instance: Function,
|
||||
dict: Object
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
page: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0
|
||||
},
|
||||
instance: Function,
|
||||
dict: Object
|
||||
},
|
||||
doType: '',
|
||||
tableData: []
|
||||
}
|
||||
},
|
||||
|
||||
data () {
|
||||
return {
|
||||
page: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
total: 0
|
||||
created() {
|
||||
this.dict.load('integralDetailType')
|
||||
this.getList()
|
||||
},
|
||||
|
||||
computed: {
|
||||
colConfigs() {
|
||||
const _this = this
|
||||
return [
|
||||
{
|
||||
prop: 'doTime',
|
||||
label: '时间'
|
||||
},
|
||||
doType: '',
|
||||
tableData: []
|
||||
}
|
||||
},
|
||||
|
||||
created () {
|
||||
this.dict.load('integralDetailType')
|
||||
this.getList()
|
||||
},
|
||||
|
||||
computed: {
|
||||
colConfigs () {
|
||||
const _this = this
|
||||
return [
|
||||
{
|
||||
prop: 'doTime',
|
||||
align: 'center',
|
||||
label: '时间',
|
||||
align:'left'
|
||||
},
|
||||
{
|
||||
prop: 'bizType',
|
||||
align: 'center',
|
||||
label: '类型',
|
||||
render (h, {row}) {
|
||||
return h('span',{}, _this.dict.getLabel('integralDetailType', row.bizType))
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'changeIntegral',
|
||||
align: 'center',
|
||||
label: '变动积分',
|
||||
formart: v => v > 0 ? `+${v}` : v
|
||||
},
|
||||
{
|
||||
prop: 'nowIntegral',
|
||||
align: 'center',
|
||||
label: '剩余积分'
|
||||
},
|
||||
{
|
||||
prop: 'description',
|
||||
align: 'center',
|
||||
label: '事件类型',
|
||||
align:'left'
|
||||
{
|
||||
prop: 'bizType',
|
||||
align: 'center',
|
||||
label: '类型',
|
||||
render(h, {row}) {
|
||||
return h('span', {}, _this.dict.getLabel('integralDetailType', row.bizType))
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
prop: 'changeIntegral',
|
||||
align: 'center',
|
||||
label: '变动积分',
|
||||
formart: v => v > 0 ? `+${v}` : v
|
||||
},
|
||||
{
|
||||
prop: 'nowIntegral',
|
||||
align: 'center',
|
||||
label: '剩余积分'
|
||||
},
|
||||
{
|
||||
prop: 'description',
|
||||
label: '事件类型',
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
getList () {
|
||||
this.instance.post('/app/appvillagerintegraldetail/list', null, {
|
||||
params: {
|
||||
...this.page,
|
||||
familyId:this.detailInfo.id,
|
||||
bizType:this.doType
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = res.data.records
|
||||
this.page.total = res.data.total
|
||||
}
|
||||
})
|
||||
}
|
||||
methods: {
|
||||
getList() {
|
||||
this.instance.post('/app/appvillagerintegraldetail/list', null, {
|
||||
params: {
|
||||
...this.page,
|
||||
familyId: this.detailInfo.id,
|
||||
bizType: this.doType
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = res.data.records
|
||||
this.page.total = res.data.total
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.family_detail{
|
||||
height: 100%;
|
||||
background-color: #fff;
|
||||
.family_detail {
|
||||
height: 100%;
|
||||
background-color: #fff;
|
||||
|
||||
::v-deep .ai-card__body {
|
||||
padding: 12px 16px 20px!important;
|
||||
}
|
||||
::v-deep .ai-card__body {
|
||||
padding: 12px 16px 20px !important;
|
||||
}
|
||||
|
||||
|
||||
.detail-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 20px;
|
||||
.detail-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 20px;
|
||||
|
||||
.detail-info__item {
|
||||
flex: 1;
|
||||
height: 96px;
|
||||
margin-right: 20px;
|
||||
padding: 16px 24px;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0px 4px 6px -2px rgba(15, 15, 21, 0.15);
|
||||
border-radius: 4px;
|
||||
.detail-info__item {
|
||||
flex: 1;
|
||||
height: 96px;
|
||||
margin-right: 20px;
|
||||
padding: 16px 24px;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0 4px 6px -2px rgba(15, 15, 21, 0.15);
|
||||
border-radius: 4px;
|
||||
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
h2 {
|
||||
margin-bottom: 8px;
|
||||
color: #888888;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
span {
|
||||
display: block;
|
||||
line-height: 32px;
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
color: #222;
|
||||
}
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.iconExported{
|
||||
color:#5088FF;
|
||||
font-size: 12px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.info{
|
||||
padding: 16px 0 16px 0;
|
||||
}
|
||||
.do_type{
|
||||
height: 56px;
|
||||
}
|
||||
.fs-14{
|
||||
::v-deep .el-table--small{
|
||||
font-size: 14px!important;
|
||||
h2 {
|
||||
margin-bottom: 8px;
|
||||
color: #888888;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
span {
|
||||
display: block;
|
||||
line-height: 32px;
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
color: #222;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
.iconExported {
|
||||
color: #5088FF;
|
||||
font-size: 12px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.info {
|
||||
padding: 16px 0 16px 0;
|
||||
}
|
||||
|
||||
.do_type {
|
||||
height: 56px;
|
||||
}
|
||||
|
||||
.fs-14 {
|
||||
::v-deep .el-table--small {
|
||||
font-size: 14px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
size="mini"
|
||||
placeholder="申诉人/申诉对象/..."
|
||||
clearable
|
||||
@keyup.enter.native="page.current = 1, getList()"
|
||||
v-throttle="() => {page.current = 1, getList()}"
|
||||
@clear="page.current = 1, getList()"
|
||||
suffix-icon="iconfont iconSearch" />
|
||||
</template>
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
size="mini"
|
||||
placeholder="申诉人/申诉对象/..."
|
||||
clearable
|
||||
@keyup.enter.native="page.current = 1, getList()"
|
||||
v-throttle="() => {page.current = 1, getList()}"
|
||||
@clear="page.current = 1, getList()"
|
||||
suffix-icon="iconfont iconSearch" />
|
||||
</template>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
size="small"
|
||||
placeholder="对象、户主、事件类型"
|
||||
clearable
|
||||
@keyup.enter.native="search.current = 1, getList()"
|
||||
v-throttle="() => {search.current = 1, getList()}"
|
||||
@clear="search.current = 1, getList()"
|
||||
suffix-icon="iconfont iconSearch" />
|
||||
</template>
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="选择人员" prop="residentId">
|
||||
<ai-person-select :instance="instance" :customClicker="true"
|
||||
:url="'/app/appresident/list?areaId=' + user.info.areaId"
|
||||
:url="'/app/appresident/list?auditType=1areaId=' + user.info.areaId"
|
||||
:isMultiple="false" dialogTitle="选择" @selectPerson="selectPerson">
|
||||
<template name="option" v-slot:option="{ item }">
|
||||
<span class="iconfont iconProlife">{{ item.name }}</span>
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
v-model="searchObj.con"
|
||||
size="small"
|
||||
placeholder="个人姓名"
|
||||
@keyup.enter.native="page.current = 1, getList()"
|
||||
v-throttle="() => {page.current = 1, getList()}"
|
||||
@clear="page.current = 1, searchObj.con = '', getList()"
|
||||
clearable
|
||||
suffix-icon="iconfont iconSearch" />
|
||||
|
||||
@@ -89,12 +89,14 @@
|
||||
</ai-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="事项" prop="ruleName">
|
||||
<el-input placeholder="请输入…" v-model="dialogInfo.ruleName"></el-input>
|
||||
<el-input placeholder="请输入…" maxlength="30" show-word-limit v-model="dialogInfo.ruleName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="规则说明" prop="ruleDescription">
|
||||
<el-input
|
||||
type="textarea"
|
||||
:rows="3"
|
||||
maxlength="500"
|
||||
show-word-limit
|
||||
placeholder="请输入…"
|
||||
v-model="dialogInfo.ruleDescription">
|
||||
</el-input>
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
v-model="searchObj.name"
|
||||
size="small"
|
||||
placeholder="订单号/商品名/兑换家庭"
|
||||
@keyup.enter.native="page.current = 1, getList()"
|
||||
v-throttle="() => {page.current = 1, getList()}"
|
||||
@clear="page.current = 1, searchObj.name = '', getList()"
|
||||
clearable
|
||||
suffix-icon="iconfont iconSearch"
|
||||
@@ -69,7 +69,7 @@
|
||||
<ai-download
|
||||
:instance="instance"
|
||||
url="/app/appvillagerintegralshoporder/listExport"
|
||||
:params="{ ...searchObj, areaId: areaId }"
|
||||
:params="{ ...searchObj, areaId: areaId, ids: ids.join(',') }"
|
||||
fileName="订单管理"
|
||||
v-if="$permissions('app_appvillagerintegralshoporder_export')">
|
||||
</ai-download>
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
<template #tabs>
|
||||
<el-tabs v-model="activeName">
|
||||
<el-tab-pane v-for="op in tabs" :key="op.value" :name="op.value" :label="op.label">
|
||||
<component v-if="op.value==activeName" :is="op.comp" :areaId="areaId" :active="activeName"/>
|
||||
<component v-if="op.value==activeName" :is="op.comp" :areaId="areaId" :active="activeName"
|
||||
:instance="instance" :dict="dict" :permissions="permissions"/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</template>
|
||||
@@ -20,6 +21,8 @@ import localResident from "./localResident";
|
||||
import ListTpl from "./listTpl";
|
||||
import MobileResident from "./mobileResident";
|
||||
import ResidentSta from "./residentSta";
|
||||
import auditList from "./auditList";
|
||||
import auditDetail from "./audtiDetail";
|
||||
|
||||
export default {
|
||||
name: "AppResident",
|
||||
@@ -34,7 +37,7 @@ export default {
|
||||
resident: this
|
||||
}
|
||||
},
|
||||
components: {ResidentSta, MobileResident, ListTpl, localResident},
|
||||
components: {ResidentSta, MobileResident, ListTpl, localResident, auditList, audtiDetail: auditDetail},
|
||||
computed: {
|
||||
...mapState(["user"]),
|
||||
tabs() {
|
||||
@@ -50,6 +53,7 @@ export default {
|
||||
detail: details[e.dictName]
|
||||
})),
|
||||
{label: "居民统计", value: "3", comp: ResidentSta},
|
||||
{label: "居民档案审核", value: "4", comp: auditList, detail: auditDetail}
|
||||
]
|
||||
},
|
||||
hideLevel() {
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
size="small"
|
||||
placeholder="姓名/身份证/联系方式"
|
||||
clearable
|
||||
@keyup.enter.native="search.current = 1, getList()"
|
||||
v-throttle="() => {search.current = 1, getList()}"
|
||||
@clear="search.current = 1, search.con = '', getList()"
|
||||
suffix-icon="iconfont iconSearch">
|
||||
</el-input>
|
||||
@@ -71,8 +71,8 @@
|
||||
<el-radio label="1">是</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="审核意见" prop="opinion" style="width: 100%;" :rules="[{ required: form.pass === '0' ? true : false, message: '请输入审核意见' }]">
|
||||
<el-input type="textarea" :rows="5" :maxlength="500" v-model="form.opinion" clearable placeholder="请输入审核意见" show-word-limit></el-input>
|
||||
<el-form-item label="审核意见" prop="opinion" style="width: 100%;" :rules="[{ required: form.pass === '0', message: '请输入审核意见' }]">
|
||||
<el-input type="textarea" :rows="5" :maxlength="200" v-model="form.opinion" clearable placeholder="请输入审核意见" show-word-limit></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ai-dialog>
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<section class="addAborigines">
|
||||
<ai-detail>
|
||||
<ai-title slot="title" title="详情" isShowBack @onBackClick="$router.push({query:{}})" isShowBottomBorder></ai-title>
|
||||
<ai-title slot="title" title="详情" isShowBack @onBackClick="$router.push({query:{}})" isShowBottomBorder/>
|
||||
<template #content>
|
||||
<ai-card title="基本信息">
|
||||
<div slot="content">
|
||||
@@ -193,8 +193,8 @@
|
||||
<el-radio label="1">是</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="审核意见" prop="opinion" style="width: 100%;" :rules="[{ required: form.pass === '0' ? true : false, message: '请输入审核意见' }]">
|
||||
<el-input type="textarea" :rows="5" :maxlength="500" v-model="form.opinion" clearable placeholder="请输入审核意见" show-word-limit></el-input>
|
||||
<el-form-item label="审核意见" prop="opinion" style="width: 100%;" :rules="[{ required: form.pass === '0', message: '请输入审核意见' }]">
|
||||
<el-input type="textarea" :rows="5" :maxlength="200" v-model="form.opinion" clearable placeholder="请输入审核意见" show-word-limit></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ai-dialog>
|
||||
@@ -87,7 +87,7 @@
|
||||
size="small"
|
||||
v-model="search.con"
|
||||
placeholder="姓名/身份证/联系方式"
|
||||
@keyup.enter.native="search.current = 1, refreshTable()"
|
||||
v-throttle="() => {search.current = 1, refreshTable()}"
|
||||
@clear="search.current = 1, refreshTable()"
|
||||
clearable
|
||||
suffix-icon="iconfont iconSearch"/>
|
||||
@@ -100,7 +100,7 @@
|
||||
type="primary"
|
||||
icon="iconfont iconAdd"
|
||||
@click="gotoAdd()"
|
||||
v-if="$permissions('app_appresident_edit')">
|
||||
v-if="permissions('app_appresident_edit')">
|
||||
添加
|
||||
</el-button>
|
||||
<el-button
|
||||
@@ -108,7 +108,7 @@
|
||||
icon="iconfont iconDelete"
|
||||
:disabled="multipleSelection.length<=0"
|
||||
@click="beforeDelete()"
|
||||
v-if="$permissions('app_appresident_del')">
|
||||
v-if="permissions('app_appresident_del')">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
@@ -117,8 +117,8 @@
|
||||
:importParams="{residentType: active}" @success="refreshTable()">
|
||||
<el-button icon="iconfont iconImport">导入</el-button>
|
||||
</ai-import>
|
||||
<ai-download :instance="resident.instance" :params="params" url="/app/appresident/export"
|
||||
fileName="居民档案"/>
|
||||
<!-- <ai-download :instance="resident.instance" :params="params" url="/app/appresident/export"
|
||||
fileName="居民档案" v-if="permissions('app_appresident_export')"/> -->
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
|
||||
@@ -164,7 +164,8 @@ export default {
|
||||
inject: ['resident'],
|
||||
props: {
|
||||
areaId: {default: ""},
|
||||
active: {default: ""},//人员类型
|
||||
active: {default: ""},//人员类型,
|
||||
permissions: Function
|
||||
},
|
||||
computed: {
|
||||
...mapState(["user"]),
|
||||
|
||||
@@ -44,6 +44,8 @@
|
||||
size="small"
|
||||
placeholder="请输入姓名"
|
||||
v-if="showEdit1"
|
||||
maxlength="20"
|
||||
show-word-limit
|
||||
:disabled="!!showDetail"
|
||||
></el-input>
|
||||
<!-- <p v-else>{{baseInfo.name||'-'}}</p> -->
|
||||
@@ -375,7 +377,7 @@
|
||||
<ai-area-select clearable always-show :instance="instance" :disabled-level="disabledLevel" v-model="baseInfo.currentAreaId"
|
||||
:valueLevel="4"/>
|
||||
<el-form-item>
|
||||
<el-input v-model="baseInfo.currentAddress" placeholder="详细地址" clearable/>
|
||||
<el-input v-model="baseInfo.currentAddress" placeholder="详细地址" maxlength="30" show-word-limit clearable/>
|
||||
</el-form-item>
|
||||
</el-form-item>
|
||||
</div>
|
||||
@@ -437,7 +439,7 @@
|
||||
<ai-area-select clearable always-show :instance="instance" v-if="showEdit3"
|
||||
v-model="baseInfo.householdAreaId" :disabled-level="disabledLevel" :valueLevel="4"/>
|
||||
<el-form-item v-if="baseInfo.householdAreaId">
|
||||
<el-input v-model="baseInfo.householdAddress" placeholder="详细地址" clearable/>
|
||||
<el-input v-model="baseInfo.householdAddress" placeholder="详细地址" maxlength="30" show-word-limit clearable/>
|
||||
</el-form-item>
|
||||
</el-form-item>
|
||||
</div>
|
||||
@@ -516,6 +518,20 @@
|
||||
</el-table>
|
||||
</div>
|
||||
</ai-card>
|
||||
<ai-card v-for="(item, index) in baseInfo.tsrqInfos" :key="index" :title="item.applicationName">
|
||||
<ai-wrapper
|
||||
slot="content"
|
||||
label-width="120px">
|
||||
<ai-info-item
|
||||
v-for="(filed, i) in item.tableInfos"
|
||||
:label="filed.fieldName"
|
||||
:key="i"
|
||||
:isLine="filed.grid === '1'">
|
||||
<ai-file-list :fileList="formData[item.fieldDbName]" v-if="item.type == 'upload'" :fileOps="{name: 'name', size: 'fileSizeStr'}"></ai-file-list>
|
||||
<div v-else>{{ filed.fieldValue || '-' }}</div>
|
||||
</ai-info-item>
|
||||
</ai-wrapper>
|
||||
</ai-card>
|
||||
</el-form>
|
||||
</template>
|
||||
<template v-if="!showDetail" #footer>
|
||||
@@ -694,7 +710,8 @@ export default {
|
||||
phone: "",
|
||||
photo: "",
|
||||
politicsStatus: "",
|
||||
sex: ""
|
||||
sex: "",
|
||||
tsrqInfos: []
|
||||
},
|
||||
family: [],
|
||||
familyDialog: false,
|
||||
|
||||
@@ -43,6 +43,8 @@
|
||||
size="small"
|
||||
placeholder="请输入姓名"
|
||||
v-if="showEdit1"
|
||||
maxlength="20"
|
||||
show-word-limit
|
||||
:disabled="!!showDetail"
|
||||
></el-input>
|
||||
<!-- <p v-else>{{baseInfo.name||'-'}}</p> -->
|
||||
@@ -373,7 +375,7 @@
|
||||
<ai-area-select clearable always-show :instance="instance" :disabled-level="disabledLevel" v-model="baseInfo.currentAreaId"
|
||||
:valueLevel="4"/>
|
||||
<el-form-item>
|
||||
<el-input v-model="baseInfo.currentAddress" placeholder="详细地址" clearable/>
|
||||
<el-input v-model="baseInfo.currentAddress" maxlength="30" show-word-limit placeholder="详细地址" clearable/>
|
||||
</el-form-item>
|
||||
</el-form-item>
|
||||
</div>
|
||||
@@ -434,7 +436,7 @@
|
||||
<ai-area-select clearable always-show :instance="instance" v-if="showEdit3"
|
||||
v-model="baseInfo.householdAreaId" :valueLevel="4"/>
|
||||
<el-form-item v-if="baseInfo.householdAreaId">
|
||||
<el-input v-model="baseInfo.householdAddress" placeholder="详细地址" clearable/>
|
||||
<el-input v-model="baseInfo.householdAddress" maxlength="30" show-word-limit placeholder="详细地址" clearable/>
|
||||
</el-form-item>
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
@@ -75,7 +75,8 @@
|
||||
placeholder="姓名/身份证号/联系方式"
|
||||
prefix-icon="iconfont iconSearch"
|
||||
clearable
|
||||
@change="page.current=1,getTableData()"
|
||||
@clear="page.current = 1,search.param = '', getTableData()"
|
||||
v-throttle="() => {page.current = 1, getTableData()}"
|
||||
/>
|
||||
<el-button
|
||||
type="primary"
|
||||
|
||||
@@ -6,9 +6,8 @@
|
||||
<ai-search-bar>
|
||||
<template #right>
|
||||
<el-input prefix-icon="iconfont iconSearch" v-model="search.title" placeholder="设备名、MAC号" clearable
|
||||
@change="page.current=1,getTableData()" size="small"/>
|
||||
<el-button type="primary" icon="iconfont iconSearch" @click="page.current=1,getTableData()">查询</el-button>
|
||||
<el-button icon="iconfont iconResetting" @click="search={},page.current=1,getTableData()">重置</el-button>
|
||||
@clear="page.current = 1,search.title = '', getTableData()"
|
||||
v-throttle="() => {page.current = 1, getTableData()}" size="small"/>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-table :tableData="tableData" :colConfigs="colConfigs" :total="page.total" :current.sync="page.current"
|
||||
|
||||
@@ -25,152 +25,169 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ai-dialog>
|
||||
<locate-dialog v-model="locate" :ins="instance" @confirm="v=>handleLocate(selected,v)"/>
|
||||
<ai-area custom-clicker :input-clicker="false" v-model="selected.areaId" :instance="instance" ref="BindArea"
|
||||
<locate-dialog v-model="locate" :ins="instance" :latlng="latlng" @confirm="v=>handleLocate(selected,v)"/>
|
||||
<ai-area custom-clicker :input-clicker="false" v-model="selected.areaId" :hideLevel="disabledLevel" :instance="instance" ref="BindArea"
|
||||
@change="handleSubmit(selected)"/>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import DeviceSlider from "../components/deviceSlider";
|
||||
import LocateDialog from "../components/locateDialog";
|
||||
import { mapState } from 'vuex'
|
||||
import DeviceSlider from "../components/deviceSlider";
|
||||
import LocateDialog from "../components/locateDialog";
|
||||
|
||||
export default {
|
||||
name: "AppMonitorManage",
|
||||
components: {LocateDialog, DeviceSlider},
|
||||
label: "监控实况",
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function
|
||||
},
|
||||
computed: {
|
||||
splitOps() {
|
||||
return [
|
||||
{label: "单分屏", value: 1, per: "100%"},
|
||||
{label: "四分屏", value: 4, per: "49%"},
|
||||
{label: "九分屏", value: 9, per: "32%"}
|
||||
]
|
||||
export default {
|
||||
name: "AppMonitorManage",
|
||||
components: {LocateDialog, DeviceSlider},
|
||||
label: "监控实况",
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function
|
||||
},
|
||||
currentSplitStyle() {
|
||||
let per = this.splitOps.find(e => e.value == this.splitScreen)?.per || "100%"
|
||||
return {width: per, height: per}
|
||||
computed: {
|
||||
splitOps() {
|
||||
return [
|
||||
{label: "单分屏", value: 1, per: "100%"},
|
||||
{label: "四分屏", value: 4, per: "49%"},
|
||||
{label: "九分屏", value: 9, per: "32%"}
|
||||
]
|
||||
},
|
||||
currentSplitStyle() {
|
||||
let per = this.splitOps.find(e => e.value == this.splitScreen)?.per || "100%"
|
||||
return {width: per, height: per}
|
||||
},
|
||||
...mapState(['user'])
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
slider: true,
|
||||
fullscreen: false,
|
||||
splitScreen: 1,
|
||||
monitors: [],
|
||||
dialog: false,
|
||||
locate: false,
|
||||
selected: {},
|
||||
rules: {
|
||||
name: [{required: true, message: "请填写 设备名称"}]
|
||||
|
||||
data() {
|
||||
return {
|
||||
slider: true,
|
||||
fullscreen: false,
|
||||
splitScreen: 1,
|
||||
monitors: [],
|
||||
dialog: false,
|
||||
locate: false,
|
||||
selected: {
|
||||
areaId: ''
|
||||
},
|
||||
latlng: null,
|
||||
disabledLevel: 0,
|
||||
rules: {
|
||||
name: [{required: true, message: "请填写 设备名称"}]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleFullscreen() {
|
||||
this.fullscreen = !this.fullscreen
|
||||
this.$fullscreen(this.fullscreen)
|
||||
},
|
||||
handleSelectMonitor(monitor) {
|
||||
let {id} = monitor,
|
||||
index = this.monitors.findIndex(e => e.id == id)
|
||||
if (index > -1) {
|
||||
this.monitors.splice(index, 1)
|
||||
this.monitors.map((e, i) => {
|
||||
if (i > index) {
|
||||
this.showMonitor(e, true)
|
||||
|
||||
created () {
|
||||
this.selected.areaId = this.user.info.areaId
|
||||
this.disabledLevel = this.user.info.areaList.length
|
||||
},
|
||||
|
||||
methods: {
|
||||
handleFullscreen() {
|
||||
this.fullscreen = !this.fullscreen
|
||||
this.$fullscreen(this.fullscreen)
|
||||
},
|
||||
handleSelectMonitor(monitor) {
|
||||
let {id} = monitor,
|
||||
index = this.monitors.findIndex(e => e.id == id)
|
||||
if (index > -1) {
|
||||
this.monitors.splice(index, 1)
|
||||
this.monitors.map((e, i) => {
|
||||
if (i > index) {
|
||||
this.showMonitor(e, true)
|
||||
}
|
||||
})
|
||||
} else if (this.monitors.length >= this.splitScreen && this.splitScreen > 1) {
|
||||
this.$message.warning("可分屏监控已满,请先取消其他的监控")
|
||||
} else {
|
||||
this.showMonitor(monitor)
|
||||
}
|
||||
},
|
||||
showMonitor(monitor, refresh = false) {
|
||||
let {id: deviceId} = monitor
|
||||
deviceId && this.instance.post("/app/appzyvideoequipment/getWebSdkUrl", null, {
|
||||
params: {deviceId}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
let data = JSON.parse(res.data)
|
||||
if (refresh) {
|
||||
monitor.url = data.url
|
||||
} else if (this.splitScreen == 1) {
|
||||
this.monitors = [{...monitor, ...data}]
|
||||
} else {
|
||||
this.monitors.push({...monitor, ...data})
|
||||
}
|
||||
}
|
||||
})
|
||||
} else if (this.monitors.length >= this.splitScreen && this.splitScreen > 1) {
|
||||
this.$message.warning("可分屏监控已满,请先取消其他的监控")
|
||||
} else {
|
||||
this.showMonitor(monitor)
|
||||
}
|
||||
},
|
||||
showMonitor(monitor, refresh = false) {
|
||||
let {id: deviceId} = monitor
|
||||
deviceId && this.instance.post("/app/appzyvideoequipment/getWebSdkUrl", null, {
|
||||
params: {deviceId}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
let data = JSON.parse(res.data)
|
||||
if (refresh) {
|
||||
monitor.url = data.url
|
||||
} else if (this.splitScreen == 1) {
|
||||
this.monitors = [{...monitor, ...data}]
|
||||
} else {
|
||||
this.monitors.push({...monitor, ...data})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
renderTreeItem: function (h, {node, data}) {
|
||||
let show = data.deviceStatus==1 ? 'show' : ''
|
||||
if (node.isLeaf) {
|
||||
return (
|
||||
},
|
||||
renderTreeItem: function (h, {node, data}) {
|
||||
let show = data.deviceStatus==1 ? 'show' : ''
|
||||
if (node.isLeaf) {
|
||||
return (
|
||||
<div class="flexRow">
|
||||
<i class={['iconfont', 'iconshipinjiankong', show]}/>
|
||||
<div>{node.label}</div>
|
||||
<el-dropdown class="menuBtn" onCommand={e => this.handleSliderOption(e, data)}>
|
||||
<i class="iconfont iconMore"/>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item command="edit">修改名称</el-dropdown-item>
|
||||
<el-dropdown-item command="area">行政地区</el-dropdown-item>
|
||||
<el-dropdown-item command="locate">地图标绘</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
)
|
||||
} else return (
|
||||
<div class="flexRow">
|
||||
<i class={['iconfont', 'iconshipinjiankong', show]}/>
|
||||
<div>{node.label}</div>
|
||||
<el-dropdown class="menuBtn" onCommand={e => this.handleSliderOption(e, data)}>
|
||||
<i class="iconfont iconMore"/>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item command="edit">修改名称</el-dropdown-item>
|
||||
<el-dropdown-item command="area">行政地区</el-dropdown-item>
|
||||
<el-dropdown-item command="locate">地图标绘</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
{data.id != 'no_area' ? <div class="sta">
|
||||
<p>{data.online || 0}</p>/{data.sum || 0}
|
||||
</div>
|
||||
: <div/>}
|
||||
</div>
|
||||
)
|
||||
} else return (
|
||||
<div class="flexRow">
|
||||
<div>{node.label}</div>
|
||||
{data.id != 'no_area' ? <div class="sta">
|
||||
<p>{data.online || 0}</p>/{data.sum || 0}
|
||||
</div>
|
||||
: <div/>}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
handleSliderOption(command, data) {
|
||||
this.selected = JSON.parse(JSON.stringify({...data, command}))
|
||||
if (command == "edit") {//修改名称
|
||||
this.dialog = true
|
||||
} else if (command == "area") {//绑定areaId
|
||||
this.$refs.BindArea?.chooseArea()
|
||||
} else if (command == "locate") {//地图标绘
|
||||
this.locate = true
|
||||
}
|
||||
},
|
||||
handleSubmit(row) {
|
||||
delete row.createTime
|
||||
return this.instance.post("/app/appzyvideoequipment/addOrUpdate", {
|
||||
...row
|
||||
}).then(res => {
|
||||
if (res?.code == 0) {
|
||||
this.$message.success("提交成功!")
|
||||
this.dialog = false
|
||||
this.$refs.DeviceSlider?.getDevices()
|
||||
},
|
||||
handleSliderOption(command, data) {
|
||||
this.selected = JSON.parse(JSON.stringify({...data, command}))
|
||||
if (command == "edit") {//修改名称
|
||||
this.dialog = true
|
||||
} else if (command == "area") {//绑定areaId
|
||||
this.$refs.BindArea?.chooseArea()
|
||||
} else if (command == "locate") {//地图标绘
|
||||
this.latlng = data.lat && data.lng ? {
|
||||
lat: data.lat,
|
||||
lng: data.lng
|
||||
} : ''
|
||||
this.locate = true
|
||||
}
|
||||
})
|
||||
},
|
||||
handleLocate(row, locate) {
|
||||
if (locate) {
|
||||
let {lat, lng} = locate.location
|
||||
this.handleSubmit({...row, lat, lng}).then(() => {
|
||||
this.locate = false
|
||||
},
|
||||
handleSubmit(row) {
|
||||
delete row.createTime
|
||||
return this.instance.post("/app/appzyvideoequipment/addOrUpdate", {
|
||||
...row
|
||||
}).then(res => {
|
||||
if (res?.code == 0) {
|
||||
this.$message.success("提交成功!")
|
||||
this.dialog = false
|
||||
this.$refs.DeviceSlider?.getDevices()
|
||||
}
|
||||
})
|
||||
},
|
||||
handleLocate(row, locate) {
|
||||
if (locate) {
|
||||
let {lat, lng} = locate.location
|
||||
this.handleSubmit({...row, lat, lng}).then(() => {
|
||||
this.locate = false
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.monitors = []
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.monitors = []
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -30,9 +30,7 @@ export default {
|
||||
prop: "visible",
|
||||
event: "visible",
|
||||
},
|
||||
props: {
|
||||
visible: Boolean
|
||||
},
|
||||
props: ['latlng', 'visible'],
|
||||
data() {
|
||||
return {
|
||||
dialog: false,
|
||||
@@ -59,11 +57,18 @@ export default {
|
||||
this.AMap = AMap
|
||||
this.map = new AMap.Map('amap', {
|
||||
zoom: 14,
|
||||
center: this.latlng ? [this.latlng.lng, this.latlng.lat] : ''
|
||||
}).on('click', res => {
|
||||
this.map.clearMap()
|
||||
this.selected = {location: res.lnglat}
|
||||
this.poi?.searchNearBy('', res.lnglat, 100)
|
||||
});
|
||||
if (this.latlng) {
|
||||
let marker = new AMap.Marker({
|
||||
position: [this.latlng.lng, this.latlng.lat]
|
||||
})
|
||||
this.map.add(marker)
|
||||
}
|
||||
this.poi = new AMap.PlaceSearch().on('complete', ({poiList}) => {
|
||||
this.map.clearMap()
|
||||
if (poiList?.length > 0) {
|
||||
|
||||
@@ -583,10 +583,19 @@ export default {
|
||||
margin-left: 1px;
|
||||
|
||||
.ai-list__content--right-wrapper {
|
||||
height: 100%;
|
||||
position: relative;
|
||||
// height: 100%;
|
||||
|
||||
.ai-empty {
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
z-index: 1;
|
||||
transform: translate(-50%, -50%);
|
||||
|
||||
.ai-empty__bg {
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
<el-input
|
||||
v-model="search.con"
|
||||
size="small"
|
||||
@keyup.enter.native="search.current = 1, getList()"
|
||||
v-throttle="() => {search.current = 1, getList()}"
|
||||
placeholder="请输入姓名或身份证"
|
||||
clearable
|
||||
@clear="search.current = 1, search.con = '', getList()"
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<section class="approval-manage">
|
||||
<section class="AppApprovalManage">
|
||||
<ai-list v-if="showList">
|
||||
<template slot="title">
|
||||
<ai-title title="审批管理" :isShowBottomBorder="false"></ai-title>
|
||||
<ai-title title="审批管理" :isShowBottomBorder="false"/>
|
||||
</template>
|
||||
<template slot="tabs">
|
||||
<el-tabs class="tabs-page" v-model="currIndex">
|
||||
@@ -86,7 +86,7 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.approval-manage {
|
||||
.AppApprovalManage {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #F3F6F9;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="app_detail detail-content details-page">
|
||||
<ai-detail>
|
||||
<ai-detail isHasSidebar>
|
||||
<ai-title slot="title" title="审批详情" isShowBack isShowBottomBorder @onBackClick="approval.goBack()">
|
||||
<template #rightBtn>
|
||||
<template v-if="listType==0&&$permissions('zwsp_oaapprovalapplyinfo_approve')">
|
||||
@@ -61,7 +61,7 @@
|
||||
</el-form-item>
|
||||
</div>
|
||||
<template v-if="applyForm=={}">
|
||||
<div class="no-data"></div>
|
||||
<div class="no-data"/>
|
||||
</template>
|
||||
</div>
|
||||
</el-form>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
v-model="search.param"
|
||||
size="small"
|
||||
placeholder="标题/发起人"
|
||||
@keyup.enter.native="search.current = 1, getList()"
|
||||
v-throttle="() => {search.current = 1, getList()}"
|
||||
@clear="reset"
|
||||
clearable
|
||||
suffix-icon="iconfont iconSearch"/>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user