Commit 29b9e4a5 authored by 姬鋆屾's avatar 姬鋆屾

提交事项管理

parent 288a7f8a
#开发环境 #开发环境
NODE_ENV = "development" NODE_ENV = "development"
VUE_APP_BASE_API= http://192.168.0.98:11091/bill VUE_APP_BASE_API= http://192.168.0.252:21086/complex
#VUE_APP_BASE_API= /basics_api/m #VUE_APP_BASE_API= /basics_api/m
#图片地址拼接 #图片地址拼接
VUE_APP_API_IMG_URL=http://192.168.0.98:11078/ VUE_APP_API_IMG_URL=http://192.168.0.98:11078/
...@@ -53,7 +53,13 @@ export default { ...@@ -53,7 +53,13 @@ export default {
} catch (error) { } catch (error) {
return; return;
} }
console.log(this.tableConfig);
this.pageInfo.list.indexOf("/matter") == 0
? (this.pageInfo.list = "/apply/matter/list")
: "";
console.log(this.tableConfig);
this.tableData.loading = true; this.tableData.loading = true;
this.query.applyType = this.tableConfig.applyType;
this.$post(this.pageInfo.list, this.query, { this.$post(this.pageInfo.list, this.query, {
cancelToken: this.source.token, cancelToken: this.source.token,
}) })
...@@ -176,6 +182,7 @@ export default { ...@@ -176,6 +182,7 @@ export default {
// 格式化单元格数据 // 格式化单元格数据
formatter(row, column, val) { formatter(row, column, val) {
const content = formatter(this.tableData, column, val); const content = formatter(this.tableData, column, val);
return content ? ( return content ? (
<el-tag type={"info"} size="mini"> <el-tag type={"info"} size="mini">
{content} {content}
...@@ -302,21 +309,20 @@ export default { ...@@ -302,21 +309,20 @@ export default {
}, },
// 格式化单元格数据 // 格式化单元格数据
formatterDateSeconds(row, column,val) { formatterDateSeconds(row, column, val) {
let h = parseInt((val / 60 / 60) % 24);
let h = parseInt(val / 60 / 60 % 24) let m = parseInt((val / 60) % 60);
let m = parseInt(val / 60 % 60) let s = parseInt(val % 60);
let s = parseInt(val % 60)
//三元表达式 补零 如果小于10 则在前边进行补零 如果大于10 则不需要补零 //三元表达式 补零 如果小于10 则在前边进行补零 如果大于10 则不需要补零
h = h < 10 ? '0' + h : h h = h < 10 ? "0" + h : h;
m = m < 10 ? '0' + m : m m = m < 10 ? "0" + m : m;
s = s < 10 ? '0' + s : s s = s < 10 ? "0" + s : s;
if('00'===h&&'00'===m) return `${s}秒` if ("00" === h && "00" === m) return `${s}秒`;
if('00'===h) return `${m}分钟${s}秒` if ("00" === h) return `${m}分钟${s}秒`;
return `${h}小时${m}分钟${s}秒` return `${h}小时${m}分钟${s}秒`;
//return formatterDate(row, column); //return formatterDate(row, column);
}, },
...@@ -383,7 +389,9 @@ export default { ...@@ -383,7 +389,9 @@ export default {
if (!id) { if (!id) {
return this.$message.warning("请选中一条记录"); return this.$message.warning("请选中一条记录");
} }
this.pageInfo.list.indexOf("/matter") != -1
? (this.pageInfo.del = "/apply/matter/delete")
: "";
this.$get(this.pageInfo.del, { id: id }) this.$get(this.pageInfo.del, { id: id })
.then((res) => { .then((res) => {
this.$message.success(res.msg); this.$message.success(res.msg);
......
...@@ -3,9 +3,9 @@ import Qs from "qs"; ...@@ -3,9 +3,9 @@ import Qs from "qs";
const JSONbig = require("json-bigint")({ storeAsString: true }); const JSONbig = require("json-bigint")({ storeAsString: true });
import cookie from "./cookie"; import cookie from "./cookie";
import httpErrorHandler from "./httpErrorHandler"; import httpErrorHandler from "./httpErrorHandler";
console.log(window.location);
const instance = axios.create({ const instance = axios.create({
baseURL: "/bill", baseURL: "/complex",
//baseURL: process.env.VUE_APP_BASE_API, //baseURL: process.env.VUE_APP_BASE_API,
headers: { headers: {
post: { post: {
......
<template> <template>
<el-table <el-table
size='small' size="small"
:ref="tableName" :ref="tableName"
:data="tableData" :data="tableData"
:row-key="handleRowKeyMethod" :row-key="handleRowKeyMethod"
...@@ -10,12 +10,14 @@ ...@@ -10,12 +10,14 @@
@sort-change="handleSortChange" @sort-change="handleSortChange"
@row-click="handleRowClick" @row-click="handleRowClick"
:row-class-name="tableRowClassName" :row-class-name="tableRowClassName"
:empty-text='emptyText' :empty-text="emptyText"
max-height="636"
border border
style="width: 100%"> style="width: 100%"
>
<el-table-column <el-table-column
v-for='column in columns' v-for="column in columns"
:key='column.prop' :key="column.prop"
:type="column.type" :type="column.type"
:index="handleIndexMethod" :index="handleIndexMethod"
:selectable="handleSelectableMethod" :selectable="handleSelectableMethod"
...@@ -25,108 +27,108 @@ ...@@ -25,108 +27,108 @@
:sortable="column.sortable" :sortable="column.sortable"
:show-overflow-tooltip="column.tooltip" :show-overflow-tooltip="column.tooltip"
:align="column.align || 'left'" :align="column.align || 'left'"
:formatter='column.formatter' :formatter="column.formatter"
:reserve-selection='column.reserveSelection' :reserve-selection="column.reserveSelection"
:subColumns='column.subColumns' :subColumns="column.subColumns"
> >
<el-table-column <el-table-column
v-for='sunColumn in column.subColumns' v-for="sunColumn in column.subColumns"
:key='sunColumn.prop' :key="sunColumn.prop"
:type="sunColumn.type" :type="sunColumn.type"
:prop="sunColumn.prop" :prop="sunColumn.prop"
:label="sunColumn.label" :label="sunColumn.label"
:width="sunColumn.width" :width="sunColumn.width"
:sortable="sunColumn.sortable" :sortable="sunColumn.sortable"
:align="sunColumn.align || 'left'" :align="sunColumn.align || 'left'"
:formatter='sunColumn.formatter' :formatter="sunColumn.formatter"
/> />
</el-table-column> </el-table-column>
</el-table> </el-table>
</template> </template>
<script> <script>
export default { export default {
props: { props: {
handleRowKeyMethod: { handleRowKeyMethod: {
type: Function, type: Function,
required: false, required: false,
default: row => { return row.id } default: (row) => {
return row.id;
},
}, },
handleSelectableMethod: { handleSelectableMethod: {
type: Function, type: Function,
required: false, required: false,
default: () => {} default: () => {},
}, },
handleIndexMethod: { handleIndexMethod: {
type: Function, type: Function,
required: false, required: false,
default: () => {} default: () => {},
}, },
handleSpanMethod: { handleSpanMethod: {
type: Function, type: Function,
required: false, required: false,
default: () => {} default: () => {},
}, },
toggleRowSelection: { toggleRowSelection: {
type: Function, type: Function,
required: false, required: false,
default: () => {} default: () => {},
}, },
handleSelectionChange: { handleSelectionChange: {
type: Function, type: Function,
required: false, required: false,
default: () => {} default: () => {},
}, },
handleRowClick: { handleRowClick: {
type: Function, type: Function,
required: false, required: false,
default: () => {} default: () => {},
}, },
handleSortChange: { handleSortChange: {
type: Function, type: Function,
required: false, required: false,
default: () => {} default: () => {},
}, },
tableRowClassName: { tableRowClassName: {
type: Function, type: Function,
required: false, required: false,
default: () => {} default: () => {},
}, },
loading: { loading: {
type: Boolean, type: Boolean,
required: false, required: false,
default: true default: true,
}, },
tableData: { tableData: {
type: Array, type: Array,
required: false, required: false,
default: () => [] default: () => [],
}, },
columns: { columns: {
type: Array, type: Array,
required: false, required: false,
default: ()=> [], default: () => [],
}, },
tableName: { tableName: {
type: String, type: String,
required: false, required: false,
default: "table", default: "table",
} },
height: {
type: String,
required: false,
},
}, },
computed: { computed: {
emptyText() { emptyText() {
return (!this.loading && !this.tableData.length) ? '暂无数据' : '加载中...' return !this.loading && !this.tableData.length ? "暂无数据" : "加载中...";
},
}, },
methods:{
}, },
methods: {},
data() { data() {
return {} return {};
} },
} };
</script> </script>
...@@ -214,7 +214,7 @@ export default { ...@@ -214,7 +214,7 @@ export default {
} }
.title { .title {
font-size: 18px; font-size: 18px;
max-width: 200px; max-width: 260px;
color: #fff; color: #fff;
line-height: normal; line-height: normal;
} }
...@@ -257,7 +257,7 @@ export default { ...@@ -257,7 +257,7 @@ export default {
color: #fff; color: #fff;
list-style-type: none; list-style-type: none;
// border-bottom: 3px solid #fff; // border-bottom: 3px solid #fff;
padding-bottom: 2px; // padding-bottom: 2px;
background-color: #1890ff; background-color: #1890ff;
} }
} }
......
...@@ -199,7 +199,6 @@ export default { ...@@ -199,7 +199,6 @@ export default {
}, },
}, },
async created() { async created() {
console.log("1111")
this.initForm(this.$route.query); this.initForm(this.$route.query);
}, },
methods: { methods: {
......
...@@ -13,7 +13,8 @@ ...@@ -13,7 +13,8 @@
<slot name="table-head-center"> <slot name="table-head-center">
<el-button <el-button
v-if="isShowButton('notAdd')" v-if="isShowButton('notAdd')"
type="primary" class="addclass" type="primary"
class="addclass"
icon="el-icon-plus" icon="el-icon-plus"
plain plain
size="mini" size="mini"
...@@ -28,7 +29,8 @@ ...@@ -28,7 +29,8 @@
@click="config.methods.importView" @click="config.methods.importView"
class="el-icon-upload2" class="el-icon-upload2"
title="导入" title="导入"
>导入</el-button> >导入</el-button
>
<!-- <el-button <!-- <el-button
v-if="isShowButton('notDel')" v-if="isShowButton('notDel')"
...@@ -40,8 +42,19 @@ ...@@ -40,8 +42,19 @@
title="批量删除" title="批量删除"
>删除</el-button >删除</el-button
> --> > -->
<Confirm v-if='isShowButton("notDel")' @confirm='config.methods.del' message='确定要删除选中的多条记录吗?'> <Confirm
<el-button icon="el-icon-delete" type="danger" size='mini' plain title="删除">删除</el-button> v-if="isShowButton('notDel')"
@confirm="config.methods.del"
message="确定要删除选中的多条记录吗?"
>
<el-button
icon="el-icon-delete"
type="danger"
size="mini"
plain
title="删除"
>删除</el-button
>
</Confirm> </Confirm>
<el-button <el-button
@click="item.method" @click="item.method"
...@@ -165,6 +178,7 @@ ...@@ -165,6 +178,7 @@
:handleSelectableMethod="config.methods.handleSelectableMethod" :handleSelectableMethod="config.methods.handleSelectableMethod"
:handleSelectionChange="config.methods.handleSelectionChange" :handleSelectionChange="config.methods.handleSelectionChange"
:handleRowClick="config.methods.handleRowClick" :handleRowClick="config.methods.handleRowClick"
:height="config.height"
/> />
<DataTableFlow <DataTableFlow
...@@ -290,7 +304,7 @@ export default { ...@@ -290,7 +304,7 @@ export default {
</script> </script>
<style lang="less"> <style lang="less">
.table-body{ .table-body {
margin-left: 30px; margin-left: 30px;
} }
@media screen and (max-width: 800px) { @media screen and (max-width: 800px) {
......
...@@ -39,7 +39,9 @@ const router = new Router({ ...@@ -39,7 +39,9 @@ const router = new Router({
...restBuilder("user", "system/user"), // 用户管理 -- 管理用户 ...restBuilder("user", "system/user"), // 用户管理 -- 管理用户
...restBuilder("param", "system/param"), // 系统管理--参数管理 ...restBuilder("param", "system/param"), // 系统管理--参数管理
...restBuilder("task", "system/task"), // 系统管理--任务管理 ...restBuilder("task", "system/task"), // 系统管理--任务管理
...restBuilder("matter/mobile", "matter/mobile"), // 事项管理--移动端申报
...restBuilder("matter/salfhelp", "matter/salfHelp"), // 事项管理--自助申报
...restBuilder("matter/other", "matter/other"), // 事项管理--其他申报
//以下为基础路由配置 //以下为基础路由配置
builder("", "Home"), builder("", "Home"),
...@@ -91,7 +93,6 @@ function getComponent(fileName) { ...@@ -91,7 +93,6 @@ function getComponent(fileName) {
try { try {
return require("./views/" + fileName).default; return require("./views/" + fileName).default;
} catch (error) { } catch (error) {
//console.error(error) //console.error(error)
return fileNotFound; return fileNotFound;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<template>
<div>
<LayoutTable :data="tableData" notAdd :config="tableConfig" />
</div>
</template>
<script>
import table from "@/assets/mixins/table";
export default {
mixins: [table],
methods: {
delete(row) {},
},
data() {
return {
config: {
name: "yitihua",
downloadUrl: "",
columns: [
{ type: "selection", reserveSelection: true },
{ type: "index", label: "序号", align: "center", width: 50 },
{
prop: "eventObjectType",
label: "申报类型",
align: "center",
formatter: (row) => {
if (row.eventObjectType.indexOf("/") == -1) {
return this.tableData.dict.eventObjectType[row.eventObjectType];
} else {
let str = row.eventObjectType.split("/");
let arr = str
.map((v) => {
return (v = this.tableData.dict.eventObjectType[v]);
})
.join("/");
return arr;
}
},
},
{
prop: "implementName",
label: "事项名称",
align: "center",
},
{
label: "操作",
align: "center",
formatter: (row) => {
return (
<div>
<el-button
size="mini"
type="danger"
onClick={() => this.delete(row)}
>
移除
</el-button>
</div>
);
},
},
],
search: [
{
name: "eventObjectType",
type: "select",
label: "申报类型",
},
{
name: "implementName",
type: "text",
label: "事项名称搜索",
},
],
},
};
},
};
</script>
<style lang="less" scoped>
.page {
display: flex;
.left_box {
width: 50%;
height: 100%;
border-right: 1px solid #ededed;
padding: 20px;
}
.right_box {
flex: 1;
height: 100%;
padding: 20px;
}
}
</style>
...@@ -8,8 +8,8 @@ module.exports = { ...@@ -8,8 +8,8 @@ module.exports = {
port: 8085, port: 8085,
hot: true, //自动保存 hot: true, //自动保存
proxy: { proxy: {
"/bill": { "/complex": {
target: "http://192.168.0.98:11019", target: "http://192.168.0.252:21086",
//target: 'http://127.0.0.1:18222', //target: 'http://127.0.0.1:18222',
changeOrigin: true, changeOrigin: true,
secure: false secure: false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment