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

提交事项管理

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