删除仓库

This commit is contained in:
hanchaobo
2024-02-29 14:16:54 +08:00
parent 53ca46a5f5
commit 20c062fcef
348 changed files with 0 additions and 33742 deletions
-737
View File
@@ -1,737 +0,0 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true">
<el-form-item label="案件状态" prop="caseFlowId">
<el-select v-model="queryParams.caseFlowId" placeholder="请选择" clearable>
<el-option v-for="dict in caseStausArr" :key="dict.id" :label="dict.caseStatusName" :value="dict.id"
@keyup.enter.native="handleQuery"></el-option>
</el-select>
</el-form-item>
<!-- <el-form-item label="申请机构" prop="applicationOrganId">
<el-select v-model="queryParams.applicationOrganId" placeholder="请选择" clearable>
<el-option v-for="dict in deptList" :key="dict.deptId" :label="dict.deptName" :value="dict.deptId"
@keyup.enter.native="handleQuery"></el-option>
</el-select>
</el-form-item> -->
<!-- <el-form-item label="批号" prop="batchNumber">
<el-input v-model="queryParams.batchNumber" placeholder="请输入案件批号" clearable style="width: 240px"
@keyup.enter.native="handleQuery" />
</el-form-item> -->
<el-form-item label="案件编号" prop="caseNum">
<el-input v-model="queryParams.caseNum" placeholder="请输入案件编号" clearable style="width: 240px"
@keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="创建时间" prop="caseTime">
<el-date-picker v-model="caseTime" type="daterange" align="right" unlink-panels range-separator="至"
start-placeholder="开始日期" end-placeholder="结束日期" clearable style="width: 240px" @change="caseTimeChange">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<!-- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> -->
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" v-hasPermi="['caseManagement:list:add']" size="mini"
@click="addCase()">新增案件</el-button>
</el-col>
<!-- TODO 后期可能加上-->
<!-- <el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini"
@click="compressedPackages">案件压缩包上传</el-button>
</el-col> -->
</el-row>
<el-table v-loading="loading" :data="dataList" style="width: 100%">
<el-table-column label="序号" type="index" align="center">
<template slot-scope="scope">
<span>{{
(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1
}}</span>
</template>
</el-table-column>
<!-- <el-table-column label="批号" align="center" prop="batchNumber" :show-overflow-tooltip="true" /> -->
<el-table-column label="案件编号" align="center" prop="caseNum" :show-overflow-tooltip="true" />
<el-table-column label="申请人" align="center" prop="applicationName" :show-overflow-tooltip="true" />
<el-table-column label="被申请人" align="center" prop="respondentName" :show-overflow-tooltip="true" />
<!-- <el-table-column label="案件标的" align="center" prop="caseSubjectAmount" :show-overflow-tooltip="true" /> -->
<el-table-column label="调解员" align="center" prop="mediatorName" :show-overflow-tooltip="true" />
<el-table-column label="调解方式" align="center" prop="mediationMethodName" :show-overflow-tooltip="true" />
<el-table-column label="调解时间" align="center" prop="hearDate" :show-overflow-tooltip="true" />
<el-table-column label="案件状态" align="center" prop="caseStatusName" :show-overflow-tooltip="true" />
<el-table-column label="创建时间" align="center" prop="createTime" :show-overflow-tooltip="true" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" @click="eidtNodeprocess(scope.row)" type="text" icon="el-icon-edit"
v-hasPermi="['caseManagement:list:edit']" v-if="scope.row.caseFlowId <= 1">修改</el-button>
<el-button size="mini" @click="checkDetail(scope.row)" type="text" icon="el-icon-view">查看详情</el-button>
<el-button size="mini" @click="caseFlow(scope.row)" type="text" icon="el-icon-zoom-in">查看流程</el-button>
<el-button size="mini" @click="caseLog(scope.row)" type="text"
icon="el-icon-edit-outline">案件日志</el-button>
<el-button size="mini" @click="viewpaymentformRow(scope.row)" type="text"
icon="el-icon-edit">查看缴费单</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="evidenceUpload(scope.row)"
v-hasPermi="['caseManagement:list:evidenceEdit']" v-if="scope.row.caseFlowId <= 9">上传证据</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" v-if="scope.row.caseFlowId == 15 ||
scope.row.caseFlowId == 16 ||
scope.row.caseFlowId == 17
" @click="caseFilingDetails(scope.row)">归档详情</el-button>
<div class="btnList" v-for="item in buttonList" :key="item.id">
<el-button size="mini" type="text" icon="el-icon-tickets" @click="caseClick(scope.row, item.id)"
v-if="item.id == scope.row.caseFlowId &&
checkPermi([item.buttonAuthFlag]) &&
scope.row.signButtonFlag != 1
">{{ item.nodeName }}</el-button>
</div>
</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList(queryParams)" />
<!-- 新增编辑详情 -->
<addCase :addVisable="addVisable" :queryParams="queryParams" @cancelCaseAdd="cancelCaseAdd" @getList="getList"
:caseData="caseData" :caseDisabled="caseDisabled" :tabFlag="tabFlag" :addModifyData="addModifyData"></addCase>
<!-- 压缩包导入 -->
<caseCompressionPackage :openCompressedPackages="openCompressedPackages" :queryParams="queryParams"
@cancelCompreess="cancelCompreess" :getList="getList">
</caseCompressionPackage>
<!-- 案件详情 -->
<mediationCaseDetails :processVisable="processVisable" @cancelViewProcess="cancelViewProcess"
:caseFlowNumber="caseFlowNumber">
</mediationCaseDetails>
<!-- 案件日志 -->
<mediationCaseLog :showcaseLog="showcaseLog" @cancelcaseLog="cancelcaseLog" :caselogDataArr="caselogDataArr"
:flagLoading="flagLoading"></mediationCaseLog>
<!-- 证据修改 -->
<evidenceDialog :evidenceVisable="evidenceVisable" @cancelEvidence="cancelEvidence" :evidenceData="evidenceData">
</evidenceDialog>
<!-- 缴费 -->
<payDialog :openPay="openPay" :payTitle="payTitle" :formPayDetail="formPayDetail" :payId="payId" :payForm="payForm"
:queryParams="queryParams" @getList="getList" @paycancelRow="paycancelRow"
:formPayDetailAffiliate="formPayDetailAffiliate"></payDialog>
<!-- 缴费确认查看详情 -->
<paymentdetailsDialog :openDialog="openDialog" @cancelpaymentdetails="cancelpaymentdetails" :title="payTitle"
:detailform="detailform" :queryParams="queryParams" :flag="flag" :paymentConfirma="paymentConfirma"
:isapplicant="isapplicant" @getList="getList">
</paymentdetailsDialog>
<!-- 案件受理 -->
<caseAcceptance :showAcceptance="showAcceptance" @cancelAcceptance="cancelAcceptance"
:caseAcceptanceData="caseAcceptanceData" @getList="getList"></caseAcceptance>
<!-- 被申请人缴费 -->
<respondentPay :openResPay="openResPay" :resPayTitle="resPayTitle" :formResPayDetail="formResPayDetail"
:resPayId="resPayId" :resPayForm="resPayForm" :queryParams="queryParams" @getList="getList"
@paycancelRes="paycancelRes" :formResPay="formResPay"></respondentPay>
<!-- 调解员弹窗 -->
<selectMediator @cancelMediator="cancelMediator" :mediatorVisable="mediatorVisable" :mediatorData="mediatorData"
@getList="getList" :queryParams="queryParams"></selectMediator>
<!-- 秘书确认 -->
<confirmMediator @cancelConfirm="cancelConfirm" :confirmVisable="confirmVisable" :confirmData="confirmData"
@getList="getList" :queryParams="queryParams"></confirmMediator>
<!-- 部门长确认 -->
<departmentMediator @cancelDepartment="cancelDepartment" :departmentVisable="departmentVisable"
:departmentData="departmentData" @getList="getList" :queryParams="queryParams"></departmentMediator>
<!-- 秘书确认时间 -->
<timeConfirm @cancelTimeConfirm="cancelTimeConfirm" :timeConfirmVisable="timeConfirmVisable"
:timeConfirmData="timeConfirmData" @getList="getList" :queryParams="queryParams"></timeConfirm>
<!-- 待调解 -->
<mediation @cancelMediation="cancelMediation" :mediationVisable="mediationVisable" :mediationData="mediationData"
@getList="getList" :queryParams="queryParams"></mediation>
<confirmMediation @cancelConfirmTion="cancelConfirmTion" :confirmTionVisable="confirmTionVisable"
:confirmTionData="confirmTionData" @getList="getList" :queryParams="queryParams"></confirmMediation>
<!-- 归档详情 -->
<caseFilingDetailsPage :showarchiveDetails="showarchiveDetails" :caseFilingData="caseFilingData"
@cancelDetail="cancelDetail" :detailsAwardNum="detailsAwardNum" :flagLoadingS="flagLoadingS">
</caseFilingDetailsPage>
</div>
</template>
<script>
import {
caseApplicationList,
caseApplicationSelectById,
submitCaseApply,
selectPaymentDetail,
sealApply,
selectSealUrl,
listCaseLogRecord,
msCaseFile,
msCaseSign,
listDeptApplied,
msCaseSignUrlApplyPC,
} from "@/api/caseManagement/caseManagement.js";
import { listDept } from "@/api/system/dept.js";
import { queryCaseFlowInfo } from "@/api/caseprocessManagement/caseprocessManagement.js";
import moment from "moment";
import addCase from "./components/addCase.vue";
import evidenceDialog from "./components/evidenceDialog.vue";
import caseCompressionPackage from "./components/caseCompressionPackage.vue";
import mediationCaseDetails from "./components/mediationCaseDetails.vue";
import mediationCaseLog from "./components/mediationCaseLog.vue";
import payDialog from "./components/payDialog.vue";
import respondentPay from "./components/respondentPay.vue";
import paymentdetailsDialog from "./components/paymentdetailsDialog.vue";
import caseAcceptance from "./components/caseAcceptance.vue";
import selectMediator from "./components/selectMediator.vue";
import confirmMediator from "./components/confirmMediator.vue";
import departmentMediator from "./components/departmentMediator.vue";
import timeConfirm from "./components/timeConfirm.vue";
import mediation from "./components/mediation.vue";
import confirmMediation from "./components/confirmMediation.vue";
import caseFilingDetailsPage from "./components/caseFilingDetailsPage.vue";
export default {
name: "caseList",
dicts: ["case_flow_node"],
components: {
addCase,
caseCompressionPackage,
mediationCaseDetails,
mediationCaseLog,
evidenceDialog,
payDialog,
paymentdetailsDialog,
caseAcceptance,
selectMediator, //调解员弹窗
confirmMediator,
departmentMediator,
timeConfirm,
mediation,
confirmMediation,
caseFilingDetailsPage,
respondentPay,
},
data() {
return {
queryParams: {
pageNum: 1,
pageSize: 10,
},
// 遮罩层
loading: false,
// 总条数
total: 0,
// 表格数据
form: {},
// 校验表单
rules: {},
dataList: [],
addVisable: false, //新增弹窗
openPay: false, //缴费弹框
openResPay: false, //被申请人缴费弹窗
formPayDetail: {},
formResPayDetail: {},
payId: null,
resPayId: null,
payForm: {},
resPayForm: {},
openCompressedPackages: false, //压缩包导入弹窗
processVisable: false, //案件详情
showcaseLog: false, //案件日志
openDialog: false, //确认缴费和缴费详情
detailform: {}, //缴费详情数据
evidenceVisable: false, //证据修改弹窗
mediationVisable: false, //待调解弹窗
mediationData: {},
payTitle: "", //缴费标题
resPayTitle: "", //被申请人缴费标题
paymentConfirma: {}, //缴费确认
showAcceptance: false, //案件受理弹框
caseAcceptanceData: {}, //案件受理数据
mediatorVisable: false, //选择调解员弹窗
timeVisable: false, //预约时间弹窗
confirmVisable: false, //确认时间/调解员
caseFlowNumber: {}, //案件流程数据
caselogDataArr: [], //案件日志数据
flagLoading: true, //案件日志弹框loading
confirmTionVisable: false, //确认调解书弹窗
addModifyData: null, //新增修改传的参数
showarchiveDetails: false, //归档详情弹窗
detailsAwardNum: {},
flagLoadingS: true,
formPayDetailAffiliate: {},
formResPay: {},
mediatorData: {},
flag: null,
caseData: {},
evidenceData: {},
caseDisabled: false,
caseTime: "",
deptList: [],
payTitle: "",
tabFlag: false,
confirmData: {},
departmentVisable: false,
departmentData: {},
timeConfirmVisable: false,
timeConfirmData: {},
confirmTionData: {},
buttonList: [],
caseStausArr: [], //案件状态
isapplicant: true, //判断角色申请人或非申请人
caseFilingData: {},
};
},
created() {
// this.getList(this.queryParams);
this.listDeptFn();
// this.getButtonList()
queryCaseFlowInfo({
pageNum: 1,
pageSize: 100000,
}).then((res) => {
res.rows.forEach((item) => {
if (item.id != 17) {
this.buttonList.push(item);
}
this.caseStausArr.push(item);
});
if (this.$route.query.caseFlowId) {
let querydata = Number(this.$route.query.caseFlowId);
if (querydata > 0) {
this.$set(this.queryParams, 'caseFlowId', querydata)
}
}
this.getList(this.queryParams);
});
},
methods: {
/**所有按钮事件 */
caseClick(val, type) {
if (type == 1) {
// 提交案件
this.onsubmitRow(val);
} else if (type == 2) {
// 缴费
this.payStatus(val);
} else if (type == 3 || type == 45) {
// 确认缴费
this.paymentconfirmationRow(val, type);
} else if (type == 4) {
// 受理分配
this.caseAccep(val);
} else if (type == 5) {
// 选择调解员
this.selectMediator(val);
} else if (type == 6) {
// 核实调解员
this.secretaryConfirm(val);
} else if (type == 7) {
// 确认调解员
this.department(val);
} else if (type == 8) {
// 确定调解时间
this.timeConfirm(val);
} else if (type == 9) {
// 调解
this.mediationClick(val);
} else if (type == 10) {
// 确认调解书
this.confirmMediation(val);
} else if (type == 11) {
// 签名
this.msCaseSignUrlApplyPCFn(val);
} else if (type == 12) {
// 用印申请
this.consultantApplica(val);
} else if (type == 13) {
// 用印
this.departmentApplica(val);
} else if (type == 14) {
// 归档
this.caseFiling(val);
} else if (type == 15) {
// 申请人签收
this.signMediation(val);
} else if (type == 16) {
// 被申请人签收
this.receivedMediation(val);
} else if (type == 17) {
//结束
} else if (type == 44) {
// 被申请人缴费
this.resPayStatus(val);
}
},
/**查询按钮列表 */
getButtonList() { },
/** 新增案件 */
addCase() {
this.addModifyData = 1;
this.addVisable = true;
this.caseData = {};
this.caseDisabled = false;
this.tabFlag = false;
},
/** 查看详情 */
checkDetail(val) {
this.addModifyData = 2;
this.addVisable = true;
this.caseData = val;
this.caseDisabled = true;
this.tabFlag = true;
},
/** 修改案件 */
eidtNodeprocess(row) {
this.addModifyData = 3;
this.addVisable = true;
this.caseData = row;
this.$set(this.caseData, "flag", 2);
this.caseDisabled = false;
this.tabFlag = false;
},
/** 案件导入压缩包 */
compressedPackages() {
this.openCompressedPackages = true;
},
/** 缴费 */
payStatus(val) {
this.getDetail({ id: val.id });
this.payTitle = "申请人缴费";
this.payId = val.id;
this.openPay = true;
},
/** 被申请人缴费 */
resPayStatus(val) {
this.getResDetail({ id: val.id });
this.resPayTitle = "被申请人缴费";
this.resPayId = val.id;
this.openResPay = true;
},
/** 列表提交立案 */
onsubmitRow(row) {
this.$modal
.confirm("是否提交调解申请?")
.then(function () {
return submitCaseApply({ id: row.id, caseFlowId: row.caseFlowId });
})
.then(() => {
this.getList(this.queryParams);
this.$modal.msgSuccess("调解申请成功");
})
.catch(() => { });
},
/** 签名 */
msCaseSignUrlApplyPCFn(row) {
// this.$modal
// .confirm("是否")
// .then(function () {
// return msCaseSignUrlApplyPC({ caseId: row.id });
// })
// .then(() => {
// this.getList(this.queryParams);
// this.$modal.msgSuccess("立案申请成功");
// })
// .catch(() => { });
msCaseSignUrlApplyPC({ caseId: row.id }).then((res) => {
console.log(res, "PPPPPPPPPPPPPPPPPPPP");
window.open(res.data.sealUrl);
});
},
/** 选择调解员 */
selectMediator(val) {
this.mediatorVisable = true;
this.mediatorData = val;
},
/** 预约时间 */
selectTime(val) {
this.timeVisable = true;
},
/** 调解 */
mediationClick(val) {
this.mediationVisable = true;
this.mediationData = val;
},
/** 确认调解书 */
confirmMediation(val) {
this.confirmTionVisable = true;
this.confirmTionData = val;
},
getDetail(parms) {
caseApplicationSelectById(parms).then((res) => {
this.formPayDetail = res.data;
this.formPayDetailAffiliate = res.data.affiliate;
this.payForm.feePayable = res.data.feePayable;
this.payForm.caseId = res.data.id;
});
},
getResDetail(parms) {
caseApplicationSelectById(parms).then((res) => {
this.formResPayDetail = res.data;
this.formResPay = res.data.affiliate;
this.resPayForm.feePayable = res.data.feePayable;
this.resPayForm.caseId = res.data.id;
});
},
/** 确认调解员 */
secretaryConfirm(val) {
this.confirmVisable = true;
this.confirmData = val;
},
/** 部门长确认调解员 */
department(val) {
this.departmentVisable = true;
this.departmentData = val;
},
/**确认时间 */
timeConfirm(val) {
this.timeConfirmVisable = true;
this.timeConfirmData = val;
},
/** 时间改变处理 */
caseTimeChange() {
if (this.caseTime) {
this.queryParams.startTime = moment(this.caseTime[0]).format(
"YYYY-MM-DD HH:mm:ss"
);
this.queryParams.endTime = moment(this.caseTime[1]).format(
"YYYY-MM-DD HH:mm:ss"
);
} else {
this.queryParams.startTime = "";
this.queryParams.endTime = "";
}
},
/** 获取所有部门 */
listDeptFn() {
listDeptApplied().then((res) => {
this.deptList = res.data;
});
},
/** 修改证据 */
evidenceUpload(row) {
this.evidenceData = row;
this.evidenceVisable = true;
},
/** 取消弹窗(证据弹窗) */
cancelEvidence() {
this.evidenceVisable = false;
},
/** 关闭新增弹窗 */
cancelCaseAdd() {
this.addVisable = false;
},
/** 关闭压缩包导入弹窗 */
cancelCompreess() {
this.openCompressedPackages = false;
},
/**取消缴费*/
paycancelRow(row) {
this.openPay = false;
},
/**被申请人取消缴费*/
paycancelRes(row) {
this.openResPay = false;
},
/** 取消调解员弹窗 */
cancelMediator() {
this.mediatorVisable = false;
},
/** 取消预约时间弹窗 */
cancelTime() {
this.timeVisable = false;
},
/**取消调解 */
cancelMediation() {
this.timeConfirmVisable = false;
},
/** 取消确认调解弹窗 */
cancelConfirmTion() {
this.confirmTionVisable = false;
},
cancelMediation() {
this.mediationVisable = false;
},
cancelConfirm() {
this.confirmVisable = false;
},
cancelDepartment() {
this.departmentVisable = false;
},
cancelTimeConfirm() {
this.timeConfirmVisable = false;
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList(this.queryParams);
},
/** 重置按钮操作 */
// resetQuery() {
// this.resetForm("queryForm");
// this.handleQuery();
// },
// 查询列表数据
getList(parms) {
this.loading = true;
caseApplicationList(parms).then((response) => {
this.dataList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 法律顾问用印申请
consultantApplica(row) {
let paramsValue = {
caseId: row.id,
batchNumber: "",
caseFlowId: row.caseFlowId,
};
this.$modal
.confirm("你确定要用印申请吗?")
.then((res) => {
sealApply(paramsValue).then((res) => {
this.getList(this.queryParams);
this.$modal.msgSuccess("用印申请成功");
});
})
.catch(() => { });
},
// 部门长用印申请
departmentApplica(row) {
this.$modal
.confirm("你确定要用印确认吗?")
.then((res) => {
let paramsValue = {
caseId: row.id,
};
selectSealUrl(paramsValue).then((res) => {
window.open(res.data.sealUrl);
this.$modal
.confirm("你确认用印了吗?")
.then((res) => {
this.getList(this.queryParams);
})
.catch(() => { });
});
})
.catch(() => { });
},
// 案件受理
caseAccep(row) {
this.caseAcceptanceData = row;
this.showAcceptance = true;
},
cancelAcceptance() {
this.showAcceptance = false;
},
// 缴费确认
paymentconfirmationRow(row, type) {
this.paymentConfirma = row;
console.log(this.paymentConfirma);
this.paymentDetails({
id: row.id,
});
this.openDialog = true;
this.payTitle = "缴费确认";
this.flag = 0;
this.detailform = {};
if (type == 3) {
// 申请人
this.isapplicant = true;
} else {
this.isapplicant = false;
}
},
cancelpaymentdetails() {
this.openDialog = false;
},
// 查看缴费确认
viewpaymentformRow(row) {
this.paymentDetails({
id: row.id,
});
this.payTitle = "缴费单详情";
this.flag = 1;
this.detailform = {};
this.openDialog = true;
},
// 缴费详情
paymentDetails(val) {
selectPaymentDetail(val).then((res) => {
this.detailform = res.data;
});
},
//案件流程
caseFlow(row) {
this.caseFlowNumber = row;
this.processVisable = true;
},
cancelViewProcess() {
this.processVisable = false;
},
//案件日志
caseLog(row) {
this.caseLogNumber = row;
this.showcaseLog = true;
this.flagLoading = true;
listCaseLogRecord({ caseId: row.id }).then((res) => {
this.caselogDataArr = res.data;
this.flagLoading = false;
});
},
cancelcaseLog() {
this.showcaseLog = false;
},
// 案件送达
caseFiling(row) {
console.log(row.id);
let paramValues = {
ids: [row.id],
};
this.$modal
.confirm("你确定要案件送达吗?")
.then((res) => {
msCaseFile(paramValues).then((res) => {
this.$modal.msgSuccess("案件送达成功");
this.getList(this.queryParams);
});
})
.catch(() => { });
},
//申请人签收调解书
signMediation(row) {
this.$modal
.confirm("你确定要签收调解书吗?")
.then((res) => {
this.signingMediationAgreement({ caseId: row.id, isSignApply: 1 });
})
.catch(() => { });
},
//被申请人签收调解书
receivedMediation(row) {
this.$modal
.confirm("你确定要签收调解书吗?")
.then((res) => {
this.signingMediationAgreement({ caseId: row.id, isSignRespon: 1 });
})
.catch(() => { });
},
// 申请人和被申请人签收调解书接口
signingMediationAgreement(val) {
console.log(val);
msCaseSign(val).then((res) => {
this.$modal.msgSuccess("签收成功");
this.getList(this.queryParams);
});
},
//归档详情
caseFilingDetails(val) {
this.showarchiveDetails = true;
this.caseFilingData = val;
let vals = { id: val.id };
caseApplicationSelectById(vals).then((res) => {
res.data.affiliate.respondentSex = Number(
res.data.affiliate.respondentSex
);
this.detailsAwardNum = res.data;
console.log(this.detailsAwardNum);
this.flagLoadingS = false;
});
},
cancelDetail() {
this.showarchiveDetails = false;
},
},
};
</script>
<style lang="scss" scoped></style>
@@ -1,713 +0,0 @@
<template>
<div>
<el-dialog :title="title" :visible="addVisable" v-if="addVisable" @close="cancel" width="1000px" center
:distroy-on-close="true">
<el-tabs v-model="activeName">
<el-tab-pane label="案件信息" name="first"> </el-tab-pane>
<el-tab-pane label="证据清单" name="second" v-if="tabFlag">
</el-tab-pane>
</el-tabs>
<el-form v-if="activeName == 'first'" :disabled="caseDisabled" :model="formData" ref="ruleForm" label-width="130px"
class="demo-ruleForm">
<el-row>
<div style="display: inline-flex">
<div class="infoIcon"></div>
<div class="caseInfo">案件信息:</div>
</div>
<el-divider></el-divider>
<el-col :span="24">
<el-form-item label="申请人调解请求" prop="arbitratClaims" :rules="[
{
required: true,
message: '申请人调解请求不能为空',
trigger: 'blur',
},
]">
<el-input v-model="formData.arbitratClaims" placeholder="请输入申请人调解诉求" type="textarea"
:autosize="{ minRows: 4, maxRows: 8 }" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="事实和理由" prop="facts" :rules="[
{
required: true,
message: '事实和理由不能为空',
trigger: 'blur',
},
]">
<el-input v-model="formData.facts" placeholder="请输入事实和理由" type="textarea"
:autosize="{ minRows: 4, maxRows: 8 }" />
</el-form-item>
</el-col>
<!-- <el-col :span="24">
<el-form-item label="申请人请求仲裁庭裁决" prop="requestRule">
<el-input v-model="formData.requestRule" placeholder="请输入申请人请求仲裁庭裁决" type="textarea"
:autosize="{ minRows: 4, maxRows: 8 }" />
</el-form-item>
</el-col> -->
<!-- <el-col :span="24">
<el-form-item label="案件描述" prop="caseDescribe">
<el-input v-model="formData.caseDescribe" placeholder="请输入案件描述" type="textarea"
:autosize="{ minRows: 4, maxRows: 8 }" />
</el-form-item>
</el-col> -->
<!-- <el-col :span="12">
<el-form-item label="案件标的" prop="caseSubjectAmount" :rules="[
{
required: true,
message: '案件标的不能为空',
trigger: 'blur',
},
]">
<el-input v-model="formData.caseSubjectAmount" placeholder="请输入案件标的" />
</el-form-item>
</el-col> -->
<!-- <el-col :span="24">
<el-form-item label="调解模板" prop="templateId" :rules="[
{
required: true,
message: '调解模板',
trigger: 'blur',
},
]">
<el-select placeholder="请选择调解模板" v-model="formData.templateId">
<el-option v-for="item in templateList" :label="item.temName" :key="item.id" :value="item.id"></el-option>
</el-select>
</el-form-item>
</el-col> -->
<el-col :span="12">
<el-form-item label="申请人案件证据资料上传:" prop="applicantEvidence">
<el-upload class="upload-demo" ref="fileupload" accept=".png,.jpg,.doc,.docx,.txt,.pdf"
:action="UploadUrl()" :on-success="handlSuccess" :on-remove="handleRemove" :on-preview="handlePreview"
:before-remove="beforeRemove" :data="filedata" :headers="headers" multiple :limit="50"
:on-exceed="handleExceed" :file-list="fileList">
<el-button size="small" type="primary">点击上传</el-button>
<div slot="tip" class="el-upload__tip">
文件支持上传.jpg,png,.doc,docx,.txt,.pdf文件
</div>
</el-upload>
</el-form-item>
</el-col>
<el-col :span="24" v-if="modelFlag">
<el-form-item label="证据:">
<div v-for="(item, index) in formData.caseAttachList" :key="index" v-if="item.annexType == 2">
<div style="color: blue; cursor: pointer" @click="fileDetil(item.annexPath)">
{{ item.annexName }}
</div>
</div>
</el-form-item>
</el-col>
<el-col :span="24" v-if="modelFlag">
<el-form-item label="调解申请书:">
<div v-for="(item, index) in formData.caseAttachList" :key="index" v-if="item.annexType == 3">
<div style="color: blue; cursor: pointer" @click="fileDetil(item.annexPath)">
{{ item.annexName }}
</div>
</div>
</el-form-item>
</el-col>
<el-col :span="24" v-if="modelFlag && showmediate">
<el-form-item label="调解书:">
<div v-for="(item, index) in formData.caseAttachList" :key="index" v-if="item.annexType == 7">
<div style="color: blue; cursor: pointer" @click="fileDetil(item.annexPath)">
{{ item.annexName }}
</div>
</div>
</el-form-item>
</el-col>
<el-col :span="24">
<div style="display: inline-flex">
<div class="infoIcon"></div>
<div class="caseInfo">双方信息:</div>
</div>
<el-divider></el-divider>
</el-col>
<el-col :span="24">
<el-form-item label="选择机构或自然人" prop="affiliate.organizeFlag">
<el-radio-group v-model="formData.affiliate.organizeFlag" :disabled="modelFlag" @change="clearValidate">
<el-radio :label="0">自然人</el-radio>
<el-radio :label="1">机构</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12" v-if="formData.affiliate.organizeFlag == 1">
<el-form-item label="申请机构名称" prop="affiliate.applicationName" :rules="[
{
required: true,
message: '申请机构名称不能为空',
trigger: 'blur',
},
]">
<el-input v-model="formData.affiliate.applicationName" placeholder="请输入申请机构名称" />
</el-form-item>
</el-col>
<el-col :span="12" v-if="formData.affiliate.organizeFlag == 0">
<el-form-item label="申请人" prop="affiliate.applicationName" :rules="[
{
required: true,
message: '申请人名称不能为空',
trigger: 'blur',
},
]">
<el-input v-model="formData.affiliate.applicationName" disabled placeholder="请输入申请人姓名" />
</el-form-item>
</el-col>
<el-col :span="12" v-if="formData.affiliate.organizeFlag == 1">
<el-form-item label="统一社会信用代码" prop="affiliate.code" :rules="[
{
required: true,
message: '统一社会信用代码不能为空',
trigger: 'blur',
},
]">
<el-input v-model="formData.affiliate.code" placeholder="请输入统一社会信用代码" />
</el-form-item>
</el-col>
<el-col :span="12" v-if="formData.affiliate.organizeFlag == 0">
<el-form-item label="申请人身份证号码" prop="affiliate.code" :rules="[
{
required: true,
message: '申请人身份证号不能为空',
trigger: 'blur',
},
{
pattern:
/^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,
message: '请输入正确的身份证号码',
trigger: 'blur',
},
]">
<el-input v-model="formData.affiliate.code" disabled placeholder="请输入申请人的身份证号" />
</el-form-item>
</el-col>
<el-col :span="12" v-if="formData.affiliate.organizeFlag == 0">
<el-form-item label="申请人邮箱" prop="affiliate.applicationEmail" :rules="[
{
required: true,
message: '申请人邮箱不能为空',
trigger: 'blur',
},
{
pattern:
/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/,
message: '请输入正确的邮箱地址',
trigger: 'blur',
},
]">
<el-input v-model="formData.affiliate.applicationEmail" disabled placeholder="请输入申请人邮箱" />
</el-form-item>
</el-col>
<el-col :span="12" v-if="formData.affiliate.organizeFlag == 0">
<el-form-item label="申请人电话" prop="affiliate.applicationPhone" :rules="[
{
required: true,
message: '申请人联系电话不能为空',
trigger: 'blur',
},
{
pattern: /^[1][3,4,5,6,7,8,9][0-9]{9}$/,
message: '请输入正确的手机号码',
trigger: 'blur',
},
]">
<el-input v-model="formData.affiliate.applicationPhone" disabled placeholder="请输入申请人联系电话" />
</el-form-item>
</el-col>
<!-- <el-col :span="12" v-if="formData.affiliate.organizeFlag == 1">
<el-form-item label="申请人电话" prop="affiliate.applicationPhone" :rules="[
{
required: true,
message: '申请人联系电话不能为空',
trigger: 'blur',
},
{
pattern: /^[1][3,4,5,6,7,8,9][0-9]{9}$/,
message: '请输入正确的手机号码',
trigger: 'blur',
},
]">
<el-input v-model="formData.affiliate.applicationPhone" placeholder="请输入申请人联系电话" />
</el-form-item>
</el-col> -->
<el-col :span="12" v-if="formData.affiliate.organizeFlag == 1">
<el-form-item label="法定代表人" prop="affiliate.compLegalPerson" :rules="[
{
required: true,
message: '法定代表人不能为空',
trigger: 'blur',
},
]">
<el-input v-model="formData.affiliate.compLegalPerson" placeholder="请输入法定代表人" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="申请人住所" prop="affiliate.applicantHome" :rules="[
{
required: true,
message: '申请人住所不能为空',
trigger: 'blur',
},
]">
<el-input v-model="formData.affiliate.applicantHome" placeholder="请输入申请人住所" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="申请人联系地址" prop="affiliate.applicantAddress" :rules="[
{
required: true,
message: '申请人联系地址不能为空',
trigger: 'blur',
},
]">
<el-input v-model="formData.affiliate.applicantAddress" placeholder="请输入申请人联系地址" />
</el-form-item>
</el-col>
<el-col :span="12" v-if="formData.affiliate.organizeFlag == 1">
<el-form-item label="代理人联系电话" prop="affiliate.contactTelphoneAgent" :rules="[
{
required: true,
message: '代理人联系电话不能为空',
trigger: 'blur',
},
{
pattern: /^[1][3,4,5,6,7,8,9][0-9]{9}$/,
message: '请输入正确的手机号码',
trigger: 'blur',
},
]">
<el-input v-model="formData.affiliate.contactTelphoneAgent" disabled placeholder="请输入代理人联系电话" />
</el-form-item>
</el-col>
<el-col :span="12" v-if="formData.affiliate.organizeFlag == 0">
<el-form-item label="代理人联系电话" prop="affiliate.contactTelphoneAgent">
<el-input v-model="formData.affiliate.contactTelphoneAgent" placeholder="请输入代理人联系电话" />
</el-form-item>
</el-col>
<el-col :span="12" v-if="formData.affiliate.organizeFlag == 1">
<el-form-item label="代理人姓名" prop="affiliate.nameAgent" :rules="[
{
required: true,
message: '代理人姓名不能为空',
trigger: 'blur',
},
]">
<el-input v-model="formData.affiliate.nameAgent" disabled placeholder="请输入代理人姓名" />
</el-form-item>
</el-col>
<el-col :span="12" v-if="formData.affiliate.organizeFlag == 0">
<el-form-item label="代理人姓名" prop="affiliate.nameAgent">
<el-input v-model="formData.affiliate.nameAgent" placeholder="请输入代理人姓名" />
</el-form-item>
</el-col>
<el-col :span="12" v-if="formData.affiliate.organizeFlag == 1">
<el-form-item label="代理人邮箱" prop="affiliate.agentEmail" :rules="[
{
required: true,
message: '代理人邮箱不能为空',
trigger: 'blur',
},
{
pattern:
/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/,
message: '请输入正确的邮箱地址',
trigger: 'blur',
},
]">
<el-input v-model="formData.affiliate.agentEmail" disabled placeholder="请输入代理人邮箱" />
</el-form-item>
</el-col>
<el-col :span="12" v-if="formData.affiliate.organizeFlag == 0">
<el-form-item label="代理人邮箱" prop="affiliate.agentEmail" :rules="[
{
pattern:
/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/,
message: '请输入正确的邮箱地址',
trigger: 'blur',
},
]">
<el-input v-model="formData.affiliate.agentEmail" placeholder="请输入代理人邮箱" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="被申请人姓名" prop="affiliate.respondentName" :rules="[
{
required: true,
message: '被申请人姓名不能为空',
trigger: 'blur',
},
]">
<el-input v-model="formData.affiliate.respondentName" placeholder="请输入被申请人姓名" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="被申请人联系电话" prop="affiliate.respondentPhone" :rules="[
{
required: true,
message: '被申请人联系电话不能为空',
trigger: 'blur',
},
{
pattern: /^[1][3,4,5,6,7,8,9][0-9]{9}$/,
message: '请输入正确的手机号码',
trigger: 'blur',
},
]">
<el-input v-model="formData.affiliate.respondentPhone" placeholder="请输入被申请人联系电话" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="被申请人身份证号" prop="affiliate.respondentIdentityNum" :rules="[
{
required: true,
message: '被申请人身份证号不能为空',
trigger: 'blur',
},
{
pattern:
/^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,
message: '请输入正确的身份证号码',
trigger: 'blur',
},
]">
<el-input v-model="formData.affiliate.respondentIdentityNum" @blur="handleBlur" placeholder="请输入被申请人身份证号" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="被申请人性别:" prop="affiliate.respondentSex" :rules="[
{
required: true,
message: '请选择性别',
},
]">
<el-radio-group v-model="formData.affiliate.respondentSex" disabled>
<el-radio :label="0">男</el-radio>
<el-radio :label="1">女</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="被申请人出生年月日:" prop="affiliate.respondentBirth">
<el-date-picker disabled v-model="formData.affiliate.respondentBirth" type="date" placeholder="被申请人出生年月日">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="被申请人申请人住所" prop="affiliate.respondentHome" :rules="[
{
required: true,
message: '被申请人申请人住所不能为空',
trigger: 'blur',
},
]">
<el-input v-model="formData.affiliate.respondentHome" placeholder="请输入被申请人申请人住所" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="被申请人邮箱" prop="affiliate.respondentEmail" :rules="[
{
required: true,
message: '代理人邮箱不能为空',
trigger: 'blur',
},
{
pattern:
/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/,
message: '请输入正确的邮箱地址',
trigger: 'blur',
},
]">
<el-input v-model="formData.affiliate.respondentEmail" placeholder="请输入被申请人邮箱" />
</el-form-item>
</el-col>
</el-row>
<el-col :span="24" v-if="modelFlag">
<el-form-item v-for="item in formData.columnValueList" :label="item.name" :key="item.id">
<el-input type="textarea" v-model="item.value"></el-input>
</el-form-item>
</el-col>
</el-form>
<div v-if="activeName == 'second'">
<el-card class="box-card" style="margin-bottom: 30px" v-if="applicantEvidence.length">
<div slot="header" class="clearfix">
<span>申请人证据清单</span>
</div>
<div v-for="(item, index) in applicantEvidence" :key="index" class="text item"
style="color: blue; cursor: pointer" @click="toPreview(item.annexPath)">
{{ item.annexName }}
</div>
</el-card>
<el-card class="box-card" v-if="respondentEvidence.length">
<div slot="header" class="clearfix">
<span>被申请人证据清单</span>
</div>
<div v-for="(item, index) in respondentEvidence" :key="index" class="text item"
style="color: blue; cursor: pointer" @click="toPreview(item.annexPath)">
{{ item.annexName }}
</div>
</el-card>
</div>
<div slot="footer" class="dialog-footer" v-if="buttonFlag">
<el-button @click="cancel" class="endbutton"><span>取 消</span></el-button>
<el-button type="primary" @click="submitForm" class="endbutton"><span>确认</span></el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {
caseApplicationInsert,
caseApplicationSelectById,
updateComfire,
getInfoByIdCard,
getUserInfo
} from "@/api/caseManagement/caseManagement.js";
import { getTemplate } from "@/api/officialSeal/officialSeal.js";
import { getToken } from "@/utils/auth";
export default {
props: [
"addVisable",
"queryParams",
"caseData",
"caseDisabled",
"tabFlag",
"addModifyData",
],
dicts: ["case_built_type"],
data() {
return {
activeName: "first",
title: "新增案件",
// organizeFlag:0,//选择机构和自然人
formData: {
affiliate: {
organizeFlag: 0,
respondentSex: 0,
},
columnValueList: [],
caseAttachList: [],
},
templateList: [],
modelFlag: false,
fileURL: window.location.origin + "/API",
fileList: [],
filedata: {
annexType: 2,
},
headers: {
Authorization: "Bearer " + getToken(),
},
applicantEvidence: [], //申请人证据
respondentEvidence: [], //被申请人证据
buttonFlag: true,
getUserInfoList: {},
applicationFlag: null,
showmediate: false
};
},
watch: {
addModifyData(val) {
if (val == 1) {
this.title = "新增案件";
this.getUserInfoFn();
this.modelFlag = false;
this.buttonFlag = true;
this.formData = {
affiliate: {
organizeFlag: 0,
respondentSex: 0,
},
columnValueList: [],
caseAttachList: [],
};
} else if (val == 3) {
this.title = "修改案件";
this.modelFlag = true;
this.buttonFlag = true;
} else if (val == 2) {
this.title = "案件详情";
this.modelFlag = true;
this.buttonFlag = false;
}
},
addVisable(val) {
if (val) {
this.activeName = "first";
this.showmediate = false;
this.getTemplateFn();
if (this.addModifyData != 1) {
this.caseApplicationSelectByIdFn(this.caseData.id);
}
}
},
},
created() {
console.log(this.formData, "000000000000000000")
// this.getUserInfoFn();
},
methods: {
/** 切换申请类型 */
changeApplyType(val) {
console.log(val, "变化");
// this.$refs["ruleForm"].resetFields();
},
/**获取申请人信息 */
getUserInfoFn() {
getUserInfo().then(res => {
this.getUserInfoList = res.data;
this.$set(this.formData.affiliate, "applicationName", this.getUserInfoList.nickName);
this.$set(this.formData.affiliate, "code", this.getUserInfoList.idCard);
this.$set(this.formData.affiliate, "applicationEmail", this.getUserInfoList.email);
this.$set(this.formData.affiliate, "applicationPhone", this.getUserInfoList.phonenumber);
})
},
/** 根据案件id获取对应信息 */
caseApplicationSelectByIdFn(data) {
this.applicantEvidence = [];
this.respondentEvidence = [];
caseApplicationSelectById({ id: data }).then((res) => {
res.data.affiliate.respondentSex = Number(res.data.affiliate.respondentSex)
this.formData = res.data;
this.formData.caseAttachList.forEach((item) => {
if (item.annexType == 2) {
this.applicantEvidence.push(item);
} else if (item.annexType == 6) {
this.respondentEvidence.push(item);
} else if (item.annexType == 7) {
this.showmediate = true
}
});
});
},
// 新增案件
insertFn(data) {
caseApplicationInsert(data).then((res) => {
this.$modal.msgSuccess("新增成功!");
this.$emit("cancelCaseAdd");
this.$emit("getList", this.queryParams);
});
},
// 修改确定
modifyData(data) {
updateComfire(data).then((res) => {
this.$modal.msgSuccess("修改成功!");
this.$emit("cancelCaseAdd");
this.$emit("getList", this.queryParams);
});
},
/** 获取裁决书模板 */
getTemplateFn(data) {
getTemplate(data).then((res) => {
this.templateList = res.rows;
});
},
/** 查看证据 */
fileDetil(val) {
window.open(this.fileURL + val);
},
/** 查看证据 */
toPreview(val) {
window.open(this.fileURL + val);
},
/** 文件上传地址 */
UploadUrl() {
return window.location.origin + "/API/common/upload";
},
/**文件上传成功*/
handlSuccess(res, file) {
this.formData.caseAttachList.push({
annexId: res.annexId,
});
},
/**文件超出个数限制时的钩子*/
handleExceed(files, fileList) {
this.$message.warning(
`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length
} 个文件`
);
},
// 删除文件之前的钩子,参数为上传的文件和文件列表,若返回 false 或者返回 Promise 且被 reject,则停止删除。
beforeRemove(file, fileList) {
return this.$confirm(`确定移除 ${file.name}?`);
},
handleRemove(file, fileList) {
this.caseAttachListArr = this.caseAttachListArr.filter(
(item) => item.annexId != file.annexId
);
},
handlePreview(file) {
window.open(
window.location.origin + "/API" + file.certificatePath,
"_blank"
);
},
// 提交form表单
submitForm() {
this.$refs["ruleForm"].validate((valid) => {
if (valid) {
if (this.addModifyData == 3) {
this.modifyData(this.formData);
} else if (this.addModifyData == 1) {
this.insertFn(this.formData);
}
}
});
},
clearValidate(val) {
if (val == 0) {
this.$set(this.formData.affiliate, "applicationName", this.getUserInfoList.nickName);
this.$set(this.formData.affiliate, "code", this.getUserInfoList.idCard);
this.$set(this.formData.affiliate, "applicationEmail", this.getUserInfoList.email);
this.$set(this.formData.affiliate, "applicationPhone", this.getUserInfoList.phonenumber);
this.formData.affiliate.nameAgent = null;
this.formData.affiliate.agentEmail = null;
this.formData.affiliate.contactTelphoneAgent = null;
} else if (val == 1) {
this.$set(this.formData.affiliate, "nameAgent", this.getUserInfoList.nickName);
this.$set(this.formData.affiliate, "agentEmail", this.getUserInfoList.email);
this.$set(this.formData.affiliate, "contactTelphoneAgent", this.getUserInfoList.phonenumber);
this.formData.affiliate.applicationName = null;
this.formData.affiliate.code = null;
this.formData.affiliate.applicationEmail = null;
this.formData.affiliate.applicationPhone = null;
}
this.$refs["ruleForm"].clearValidate()
},
cancel() {
this.$emit("cancelCaseAdd");
},
institutionalNatural() {
console.log(this.formData.affiliate.organizeFlag);
},
handleBlur() {
console.log(this.formData.affiliate.respondentIdentityNum);
let idCards = {
idCard: this.formData.affiliate.respondentIdentityNum,
};
getInfoByIdCard(idCards).then((res) => {
this.formData.affiliate.respondentSex = Number(res.respondentSex);
console.log(res.respondentBirth);
this.formData.affiliate.respondentBirth = res.respondentBirth;
});
},
},
};
</script>
<style lang="scss" scoped>
.infoIcon {
width: 4px;
// height: 17px;
background-color: #0072ff;
margin-right: 5px;
}
.caseInfo {
font-size: 17px;
font-weight: 600;
}
::v-deep .el-dialog__body {
height: 700px !important;
overflow: auto !important;
}
</style>
@@ -1,148 +0,0 @@
<template>
<div>
<!-- 案件受理 -->
<el-dialog title="案件受理" :visible="showAcceptance" @close="cancel" :destroy-on-close="true" center>
<el-form ref="courtReviewform" :model="courtReviewform">
<el-form-item label="被申请人是否同意调解:">
<el-radio-group v-model="courtReviewform.agreeFlag">
<el-radio :label="1">是</el-radio>
<el-radio :label="0">否</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="调解方式:" v-if="courtReviewform.agreeFlag == 1">
<el-radio-group v-model="courtReviewform.mediationMethod">
<el-radio :label="1">线上调解</el-radio>
<el-radio :label="2">线下调解</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="是否纸质送达:" v-if="courtReviewform.agreeFlag == 1">
<el-radio-group v-model="courtReviewform.paperFlag">
<el-radio :label="1">是</el-radio>
<el-radio :label="0">否</el-radio>
</el-radio-group>
</el-form-item>
<!-- <el-form-item label="是否仲裁确认:" v-if="courtReviewform.agreeFlag == 1" >
<el-radio-group v-model="courtReviewform.arbitrateConfirm">
<el-radio :label="1">是</el-radio>
<el-radio :label="0">否</el-radio>
</el-radio-group>
</el-form-item> -->
<el-form-item v-if="courtReviewform.agreeFlag == 0" label="拒绝理由:" prop="rejectReason" :rules="[
{
required: true,
message: '拒绝理由不能为空',
trigger: 'blur',
},
]">
<el-input v-model="courtReviewform.rejectReason" type="textarea" :rows="8" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm" class="endbutton"><span>确 定</span></el-button>
<el-button @click="cancel" class="endbutton1"><span> 取 消</span></el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { accept } from '@/api/caseManagement/caseManagement.js'
export default {
name: "caseAcceptance",
props: ["showAcceptance", "caseAcceptanceData", "getList", "queryParams"],
data() {
return {
courtReviewform: {
mediationMethod: 2,
paperFlag: 0,
arbitrateConfirm: 0,
agreeFlag: 1
},
};
},
watch: {
showAcceptance(val) {
if (val) {
console.log(this.caseAcceptanceData)
}
},
},
methods: {
submitForm() {
this.$refs["courtReviewform"].validate((valid) => {
if (valid) {
let paramsdata = {
id: this.caseAcceptanceData.id,
caseFlowId: this.caseAcceptanceData.caseFlowId,
batchNumber: ""
}
let mergeValue = Object.assign({}, this.courtReviewform, paramsdata)
accept(mergeValue).then((res) => {
this.$modal.msgSuccess("确认成功");
this.$emit("getList", this.queryParams)
this.cancel();
})
.catch((err) => { });
}
});
},
cancel() {
this.$emit("cancelAcceptance");
},
},
};
</script>
<style lang="scss" scoped>
::v-deep .el-dialog {
background: #ffffff;
border-radius: 20px;
}
.el-form-item {
margin-left: 10%;
}
.endbutton {
width: 124px;
height: 37px;
background: #0072ff;
border-radius: 19px;
span {
width: 32px;
height: 15px;
font-size: 16px;
font-family: Microsoft YaHei;
font-weight: 400;
color: #ffffff;
// line-height: 48px;
}
}
.endbutton1 {
width: 124px;
height: 37px;
background: #ffffff;
border: 1px solid #d0d0d0;
border-radius: 19px;
span {
width: 31px;
height: 13px;
font-size: 16px;
font-family: Microsoft YaHei;
font-weight: 400;
color: #959595;
// line-height: 48px;
}
}
.nowarbitrator {
margin-left: 10%;
}
::v-deep .el-form-item__error {
left: 90px;
}
</style>
@@ -1,206 +0,0 @@
<template>
<div>
<el-dialog title="案件压缩包导入" :visible="openCompressedPackages" width="600px" append-to-body @close="cancel" center>
<el-form ref="form" :model="form" :rules="rules" label-width="150px">
<el-row>
<el-form-item :span="24" label="案件压缩包上传:" prop="upload">
<el-upload class="upload-demo" ref="uploadZipBatch" :limit="1" accept=".zip" :headers="upload.headers"
:action="upload.url" :disabled="upload.isUploading" :on-progress="handleFileUploadProgress"
:on-success="handleFileSuccess" :auto-upload="false" :data="paramsData" drag>
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
<!-- <el-button size="small" type="primary">点击上传</el-button> -->
<div slot="tip" class="el-upload__tip">
支持zip格式文件
</div>
</el-upload>
</el-form-item>
<el-form-item :span="24" label="调解书模板" prop="templateId">
<el-select v-model="form.templateId" placeholder="请选择">
<el-option v-for="dict in templateList" :key="dict.id" :label="dict.temName" :value="dict.id"></el-option>
</el-select>
</el-form-item>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm" class="endbutton"><span>确 定</span></el-button>
<el-button @click="cancel" class="endbutton1"><span>取 消</span></el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {
getTemplate,
} from "@/api/officialSeal/officialSeal.js";
import { getToken } from "@/utils/auth";
export default {
props: ["openCompressedPackages", "getList", "queryParams"],
data() {
return {
// key: value,
form: {},
fileList: [],
templateList: [],
rules: {
// upload: [
// { required: true, message: "案件压缩包不能为空", trigger: "blur" },
// ],
templateId: [
{ required: true, message: "调解书模板不能为空", trigger: "blur" },
],
},
paramsData:{
// templateId:this.form.templateId
},
// 案件压缩导入
upload: {
// 是否显示弹出层(用户导入)
open: false,
// 弹出层标题(用户导入)
title: "",
// 是否禁用上传
isUploading: false,
// 是否更新已经存在的用户数据
// updateSupport: 0,
// 设置上传的请求头部
headers: { Authorization: "Bearer " + getToken() },
// 上传的地址
url: process.env.VUE_APP_BASE_API + "/caseApplication/uploadCaseZipFile",
},
};
},
watch: {
openCompressedPackages(val) {
if (val) {
this.form = {}
this.getTemplateFn({
pageNum: 1,
pageSize: 10000000,
})
}
},
},
methods: {
submitForm() {
this.paramsData.templateId = this.form.templateId;
this.$refs["form"].validate((valid) => {
if (valid) {
this.$refs.uploadZipBatch.submit();
}
})
},
// 获取裁决书模板
getTemplateFn(data) {
getTemplate(data).then(res => {
console.log(res.rows, "KKKKKKKKKKKKKKKKKKKKKKK");
this.templateList = res.rows;
})
},
// 取消
cancel() {
this.$emit("cancelCompreess");
},
handleRemove(file, fileList) { },
handlePreview(file) { },
handleExceed(files, fileList) {
this.$message.warning(
`当前限制选择 1个文件,本次选择了 ${files.length} `
);
},
beforeRemove(file, fileList) {
return this.$confirm(`确定移除 ${file.name}?`);
},
// 下载模板 importTemplate
downloadTemplate() {
// console.log("下载模板");
this.download(
"caseApplication/uploadCaseZipFile",
{},
`case_batch_${new Date().getTime()}.xlsx`
);
},
// 文件上传中处理
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true;
},
// 文件上传成功处理
handleFileSuccess(response, file, fileList) {
// this.upload.open = false;
this.$emit("cancelCompreess");
this.upload.isUploading = false;
this.$refs.uploadZipBatch.clearFiles();
if (response.code == 200) {
this.$alert(
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
response.msg +
"</div>",
"导入结果",
{ dangerouslyUseHTMLString: true }
)
} else {
this.$alert(
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
"导入压缩失败" +
"</div>",
"导入结果",
{ dangerouslyUseHTMLString: true }
)
}
this.getList(this.queryParams);
},
},
};
</script>
<style lang="scss" scoped>
.download {
a {
.uploadlink {
border: none;
color: #2092c7;
}
}
}
::v-deep .el-dialog {
width: 800px;
background: #ffffff;
border-radius: 20px;
}
.endbutton {
width: 154px;
height: 37px;
background: #0072ff;
border-radius: 19px;
span {
width: 96px;
height: 15px;
font-size: 16px;
font-family: Microsoft YaHei;
font-weight: 400;
color: #ffffff;
}
}
.endbutton1 {
width: 154px;
height: 37px;
background: #ffffff;
border: 1px solid #d0d0d0;
border-radius: 19px;
span {
width: 31px;
height: 13px;
font-size: 16px;
font-family: Microsoft YaHei;
font-weight: 400;
color: #959595;
}
}
</style>
@@ -1,366 +0,0 @@
<template>
<div>
<el-dialog title="归档详情" :visible="showarchiveDetails" @close="cancel" :destroy-on-close="true" center>
<div class="loading" v-if="flagLoadingS">
<i class="el-icon-loading"></i>
</div>
<div v-else>
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="案件信息" name="five"></el-tab-pane>
<el-tab-pane label="申请人案件证据资料" name="first"></el-tab-pane>
<!-- <el-tab-pane label="被申请人案件证据资料" name="second"></el-tab-pane> -->
<el-tab-pane label="调解书" name="third"></el-tab-pane>
<el-tab-pane label="案件视频" name="fourth" v-if="caseFilingData.mediationMethod == '1'"></el-tab-pane>
<el-tab-pane label="庭审笔录" name="six" v-if="caseFilingData.mediationMethod == '1'"></el-tab-pane>
</el-tabs>
<div v-show="activeName=='first'">
<div v-for="(item,index) in detailsAwardNum.caseAttachList" :key="index" v-if="item.annexType==2" style="margin-top:10px;">
<el-link target="_blank" type="primary" :href="fileURL+item.annexPath">{{item.annexName}}</el-link>
</div>
<el-empty v-if="isNoData(detailsAwardNum.caseAttachList,2) == 0" description="暂无数据"></el-empty>
</div>
<!-- <div v-show="activeName=='second'">
<div v-for="item in detailsAwardNum.caseAttachList" v-if="item.annexType==6" style="margin-top:10px;">
<el-link target="_blank" type="primary" :href="fileURL+item.annexPath">{{item.annexName}}</el-link>
</div>
<el-empty v-if="isNoData(detailsAwardNum.caseAttachList,6) == 0" description="暂无数据"></el-empty>
</div> -->
<div v-show="activeName=='third'">
<div v-for="item in detailsAwardNum.caseAttachList" v-if="item.annexType==7" style="margin-top:10px;">
<el-link target="_blank" type="primary" :href="fileURL+item.annexPath">{{item.annexName}}</el-link>
</div>
<el-empty v-if="isNoData(detailsAwardNum.caseAttachList,7) == 0" description="暂无数据"></el-empty>
</div>
<div v-show="activeName=='fourth'">
<div style="margin-top:10px;" v-for="(item,index) in detailsAwardNum.caseAttachList" v-if="item.annexType==5">
<video style="background-color: #181717;width: 350px;height: 200px;margin: 10px;" :key="index" :src="fileURL+item.annexPath" controls="controls"></video>
</div>
<el-empty v-if="isNoData(detailsAwardNum.caseAttachList,5) == 0" description="暂无数据"></el-empty>
</div>
<div v-show="activeName=='six'">
<div v-for="item in detailsAwardNum.caseAttachList" v-if="item.annexType==6" style="margin-top:10px;">
<el-link target="_blank" type="primary" :href="fileURL+item.annexPath">{{item.annexName}}</el-link>
</div>
<el-empty v-if="isNoData(detailsAwardNum.caseAttachList,6) == 0" description="暂无数据"></el-empty>
</div>
<div v-show="activeName=='five'">
<el-form :disabled="true" :model="detailsAwardNum" label-width="130px"
class="demo-ruleForm">
<el-row>
<div style="display: inline-flex">
<div class="infoIcon"></div>
<div class="caseInfo">案件信息:</div>
</div>
<el-divider></el-divider>
<el-col :span="24">
<el-form-item label="申请人调解请求">
<el-input v-model="detailsAwardNum.arbitratClaims" placeholder="请输入申请人调解诉求" type="textarea"
:autosize="{ minRows: 4, maxRows: 8 }" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="事实和理由">
<el-input v-model="detailsAwardNum.facts" placeholder="请输入事实和理由" type="textarea"
:autosize="{ minRows: 4, maxRows: 8 }" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="申请人案件证据资料上传:" prop="applicantEvidence">
<el-upload class="upload-demo" ref="fileupload" accept=".png,.jpg,.doc,.docx,.txt,.pdf"
:action="UploadUrl()" :on-success="handlSuccess" :on-remove="handleRemove" :on-preview="handlePreview"
:before-remove="beforeRemove" :data="filedata" :headers="headers" multiple :limit="50"
:on-exceed="handleExceed" :file-list="fileList">
<el-button size="small" type="primary">点击上传</el-button>
<div slot="tip" class="el-upload__tip">
文件支持上传.jpg,png,.doc,docx,.txt,.pdf文件
</div>
</el-upload>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="证据:">
<div v-for="(item, index) in detailsAwardNum.caseAttachList" :key="index" v-if="item.annexType == 2">
<div style="color: blue; cursor: pointer" @click="fileDetil(item.annexPath)">
{{ item.annexName }}
</div>
</div>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="调解申请书:">
<div v-for="(item, index) in detailsAwardNum.caseAttachList" :key="index" v-if="item.annexType == 3">
<div style="color: blue; cursor: pointer" @click="fileDetil(item.annexPath)">
{{ item.annexName }}
</div>
</div>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="调解书:">
<div v-for="(item, index) in detailsAwardNum.caseAttachList" :key="index" v-if="item.annexType == 7">
<div style="color: blue; cursor: pointer" @click="fileDetil(item.annexPath)">
{{ item.annexName }}
</div>
</div>
</el-form-item>
</el-col>
<el-col :span="24">
<div style="display: inline-flex">
<div class="infoIcon"></div>
<div class="caseInfo">双方信息:</div>
</div>
<el-divider></el-divider>
</el-col>
<el-col :span="24">
<el-form-item label="选择机构或自然人" prop="affiliate.organizeFlag">
<el-radio-group v-model="detailsAwardNum.affiliate.organizeFlag">
<el-radio :label="0">自然人</el-radio>
<el-radio :label="1">机构</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12" v-if="detailsAwardNum.affiliate.organizeFlag == 1">
<el-form-item label="申请机构名称">
<el-input v-model="detailsAwardNum.affiliate.applicationName" placeholder="请输入申请机构名称" />
</el-form-item>
</el-col>
<el-col :span="12" v-if="detailsAwardNum.affiliate.organizeFlag == 0">
<el-form-item label="申请人">
<el-input v-model="detailsAwardNum.affiliate.applicationName" placeholder="请输入申请人姓名" />
</el-form-item>
</el-col>
<el-col :span="12" v-if="detailsAwardNum.affiliate.organizeFlag == 1">
<el-form-item label="统一社会信用代码">
<el-input v-model="detailsAwardNum.affiliate.code" placeholder="请输入统一社会信用代码" />
</el-form-item>
</el-col>
<el-col :span="12" v-if="detailsAwardNum.affiliate.organizeFlag == 0">
<el-form-item label="申请人身份证号码">
<el-input v-model="detailsAwardNum.affiliate.code" placeholder="请输入申请人的身份证号" />
</el-form-item>
</el-col>
<el-col :span="12" v-if="detailsAwardNum.affiliate.organizeFlag == 0">
<el-form-item label="申请人邮箱">
<el-input v-model="detailsAwardNum.affiliate.applicationEmail" placeholder="请输入申请人邮箱" />
</el-form-item>
</el-col>
<el-col :span="12" v-if="detailsAwardNum.affiliate.organizeFlag == 0">
<el-form-item label="申请人电话">
<el-input v-model="detailsAwardNum.affiliate.applicationPhone" placeholder="请输入申请人联系电话" />
</el-form-item>
</el-col>
<el-col :span="12" v-if="detailsAwardNum.affiliate.organizeFlag == 1">
<el-form-item label="法定代表人">
<el-input v-model="detailsAwardNum.affiliate.compLegalPerson" placeholder="请输入法定代表人" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="申请人住所">
<el-input v-model="detailsAwardNum.affiliate.applicantHome" placeholder="请输入申请人住所" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="申请人联系地址">
<el-input v-model="detailsAwardNum.affiliate.applicantAddress" placeholder="请输入申请人联系地址" />
</el-form-item>
</el-col>
<el-col :span="12" v-if="detailsAwardNum.affiliate.organizeFlag == 1">
<el-form-item label="代理人联系电话">
<el-input v-model="detailsAwardNum.affiliate.contactTelphoneAgent" placeholder="请输入代理人联系电话" />
</el-form-item>
</el-col>
<el-col :span="12" v-if="detailsAwardNum.affiliate.organizeFlag == 0">
<el-form-item label="代理人联系电话" prop="affiliate.contactTelphoneAgent">
<el-input v-model="detailsAwardNum.affiliate.contactTelphoneAgent" placeholder="请输入代理人联系电话" />
</el-form-item>
</el-col>
<el-col :span="12" v-if="detailsAwardNum.affiliate.organizeFlag == 1">
<el-form-item label="代理人姓名" prop="affiliate.nameAgent">
<el-input v-model="detailsAwardNum.affiliate.nameAgent" placeholder="请输入代理人姓名" />
</el-form-item>
</el-col>
<el-col :span="12" v-if="detailsAwardNum.affiliate.organizeFlag == 0">
<el-form-item label="代理人姓名" prop="affiliate.nameAgent">
<el-input v-model="detailsAwardNum.affiliate.nameAgent" placeholder="请输入代理人姓名" />
</el-form-item>
</el-col>
<el-col :span="12" v-if="detailsAwardNum.affiliate.organizeFlag == 1">
<el-form-item label="代理人邮箱">
<el-input v-model="detailsAwardNum.affiliate.agentEmail" placeholder="请输入代理人邮箱" />
</el-form-item>
</el-col>
<el-col :span="12" v-if="detailsAwardNum.affiliate.organizeFlag == 0">
<el-form-item label="代理人邮箱">
<el-input v-model="detailsAwardNum.affiliate.agentEmail" placeholder="请输入代理人邮箱" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="被申请人姓名">
<el-input v-model="detailsAwardNum.affiliate.respondentName" placeholder="请输入被申请人姓名" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="被申请人联系电话" >
<el-input v-model="detailsAwardNum.affiliate.respondentPhone" placeholder="请输入被申请人联系电话" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="被申请人身份证号">
<el-input v-model="detailsAwardNum.affiliate.respondentIdentityNum" placeholder="请输入被申请人身份证号" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="被申请人性别:">
<el-radio-group v-model="detailsAwardNum.affiliate.respondentSex">
<el-radio :label="0">男</el-radio>
<el-radio :label="1">女</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="被申请人出生年月日:" prop="affiliate.respondentBirth">
<el-date-picker v-model="detailsAwardNum.affiliate.respondentBirth" type="date" placeholder="被申请人出生年月日">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="被申请人申请人住所">
<el-input v-model="detailsAwardNum.affiliate.respondentHome" placeholder="请输入被申请人申请人住所" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="被申请人邮箱">
<el-input v-model="detailsAwardNum.affiliate.respondentEmail" placeholder="请输入被申请人邮箱" />
</el-form-item>
</el-col>
</el-row>
<el-col :span="24">
<el-form-item v-for="item in detailsAwardNum.columnValueList" :label="item.name" :key="item.id">
<el-input type="textarea" v-model="item.value"></el-input>
</el-form-item>
</el-col>
</el-form>
</div>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { getToken } from "@/utils/auth";
export default {
props: ["showarchiveDetails","detailsAwardNum","videoList","flagLoadingS","trialTranscripts","caseFilingData"],
components: {
},
data() {
return {
activeName: 'five',
fileURL: window.location.origin + "/API",
noData: false,
filedata: {
annexType: 2,
},
fileList: [],
headers: {
Authorization: "Bearer " + getToken(),
},
};
},
watch: {
showarchiveDetails: {
handler(val) {
if (val) {
this.activeName = 'five'
// this.detailsAwardNum.affiliate.respondentSex = Number(this.detailsAwardNum.affiliate.respondentSex)
console.log(this.detailsAwardNum)
}
},
},
},
created(){
},
methods: {
isNoData(data,type){
let resNumber = 0
if(data){
let list = data.filter(item => item.annexType == type)
if(list){
resNumber = list.length
}
}
return resNumber
},
/** 查看证据 */
fileDetil(val) {
window.open(this.fileURL + val);
},
/** 文件上传地址 */
UploadUrl() {
return window.location.origin + "/API/common/upload";
},
/**文件上传成功*/
handlSuccess(res, file) {
this.detailsAwardNum.caseAttachList.push({
annexId: res.annexId,
});
},
/**文件超出个数限制时的钩子*/
handleExceed(files, fileList) {
this.$message.warning(
`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length
} 个文件`
);
},
// 删除文件之前的钩子,参数为上传的文件和文件列表,若返回 false 或者返回 Promise 且被 reject,则停止删除。
beforeRemove(file, fileList) {
return this.$confirm(`确定移除 ${file.name}?`);
},
handleRemove(file, fileList) {
this.caseAttachListArr = this.caseAttachListArr.filter(
(item) => item.annexId != file.annexId
);
},
handlePreview(file) {
window.open(
window.location.origin + "/API" + file.certificatePath,
"_blank"
);
},
handleClick(tab, event) {
},
cancel() {
this.$emit("cancelDetail");
},
},
}
</script>
<style lang="scss" scoped>
::v-deep .el-dialog__body {
height: 500px !important;
overflow: auto !important;
}
::v-deep .el-dialog {
width: 850px;
background: #ffffff;
border-radius: 20px;
}
.loading {
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
.el-icon-loading {
font-size: 50px;
}
}
</style>
@@ -1,242 +0,0 @@
<template>
<div>
<el-dialog
title="确认调解书"
v-if="confirmTionVisable"
:visible="confirmTionVisable"
@close="cancel"
width="800px"
append-to-body
:destroy-on-close="true"
center
>
<el-form ref="form" :model="formData" label-width="180px">
<div class="caseInfo">案件信息:</div>
<el-row>
<el-col :span="12">
<el-form-item label="案件编号:" prop="caseNum">
<el-input v-model="formData.caseNum" placeholder="请输入案件编号" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="申请人:" prop="affiliate.applicationName">
<el-input v-model="formData.affiliate.applicationName" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="被申请人:" prop="respondentName">
<el-input v-model="formData.affiliate.respondentName" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="案件标的:" prop="caseSubjectAmount">
<el-input
v-model="formData.caseSubjectAmount"
placeholder="请输入案件标的"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="调解费用:" prop="feePayable">
<el-input v-model="formData.feePayable" placeholder="请输入仲裁费用" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="调解员:" prop="mediatorName">
<el-input v-model="formData.mediatorName" placeholder="请输入" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="调解书:">
<div v-for="(item, index) in formData.caseAttachList" :key="index" v-if="item.annexType==7">
<div style="color: blue;cursor: pointer;" @click="fileDetil(item.annexPath)">{{
item.annexName }}</div>
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否和解:" prop="isReconci">
<el-radio-group v-model="isReconci">
<el-radio :label="1">是</el-radio>
<el-radio :label="0">否</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<div class="payupload">
<span>上传修改后调解书</span>
<div class="uploadBtn">
<el-upload
class="upload-demo"
ref="upload"
:action="UploadUrl()"
:headers="headers"
:data="filedata"
:on-preview="handlePreview"
:on-remove="handleRemove"
:on-change="beforeUpload"
:on-success="handlSuccess"
:file-list="fileList"
>
<el-button slot="trigger" size="small" type="primary">选取文件</el-button>
<!-- <el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传到服务器</el-button> -->
<div slot="tip" class="el-upload__tip">只能上传word文件</div>
</el-upload>
</div>
</div>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel" class="endbutton1" round>
<span>取 消</span>
</el-button>
<el-button @click="submitMediator" type="primary" class="endbutton1" round>
<span>确 认</span>
</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { casePay, confirmPayDig } from "@/api/pay/pay";
import { caseApplicationSelectById,confirmMediation } from "@/api/caseManagement/caseManagement.js";
import { getToken } from "@/utils/auth";
export default {
props: ["confirmTionVisable", "queryParams", "confirmTionData"],
data() {
return {
fileList: [],
formData: {
affiliate: {},
},
isReconci:0,
fileURL: window.location.origin + "/API",
annexId:null,
headers: {
Authorization: "Bearer " + getToken()
},
filedata: {
annexType: 7
}
};
},
methods: {
/** 获取案件详情信息 */
caseApplicationSelectByIdFn(data) {
caseApplicationSelectById(data).then(res => {
this.formData = res.data;
});
},
/** 查看申请书 */
fileDetil(val) {
window.open(this.fileURL + val)
},
UploadUrl() {
return window.location.origin + "/API/common/upload";
},
beforeUpload(flie, fileList) {
this.fileList = fileList;
},
// 文件上传成功
handlSuccess(res, file) {
this.annexId = res.annexId;
},
submitMediator() {
confirmMediation({
caseAppliId: this.confirmTionData.id,
caseFlowId: this.confirmTionData.caseFlowId,
annexId: this.annexId,
isReconci:this.isReconci,
}).then(res => {
this.$modal.msgSuccess("成功");
this.cancel();
this.$emit("getList", this.queryParams);
});
},
handleRemove(file, fileList) {},
handlePreview(file) {},
cancel() {
this.$emit("cancelConfirmTion");
}
},
watch: {
confirmTionVisable(val) {
if (val) {
this.annexId = '';
this.caseApplicationSelectByIdFn({
id: this.confirmTionData.id
});
}
}
}
};
</script>
<style lang="scss" scoped>
.payType {
height: 80px;
line-height: 80px;
display: flex;
.icon-weixinzhifu {
font-size: 24px;
color: #27a56f;
margin-right: 15px;
}
.icon-zhifubao {
font-size: 24px;
color: #1d76cc;
}
}
.paySelectType {
margin-top: 20px;
margin-bottom: 20px;
}
.payupload {
display: flex;
.uploadBtn {
margin-left: 20px;
}
}
.payImg {
width: 100%;
display: flex;
justify-content: center;
}
.payTitle {
margin-top: 20px;
width: 100%;
text-align: center;
}
::v-deep .el-dialog {
width: 800px;
background: #ffffff;
border-radius: 20px;
}
.endbutton {
width: 154px;
height: 37px;
background: #ffffff;
border: 1px solid #d0d0d0;
border-radius: 19px;
span {
width: 31px;
height: 13px;
font-size: 16px;
font-family: Microsoft YaHei;
font-weight: 400;
color: #959595;
}
}
</style>
@@ -1,217 +0,0 @@
<template>
<div>
<el-dialog title="核实调解员" :visible="confirmVisable" v-if="confirmVisable" @close="cancel" center
:distroy-on-close="true">
<div>
<div v-if="tableDataFlag">
<div style="margin-bottom: 20px;">选择调解员</div>
</div>
<el-table v-if="tableDataFlag" ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 100%"
@selection-change="handleSelectionChange">
<el-table-column type="selection" width="55">
</el-table-column>
<el-table-column prop="mediatorName" label="调解员">
</el-table-column>
<el-table-column prop="specialty" label="专业">
</el-table-column>
<el-table-column prop="todoAmount" label="待办数量">
</el-table-column>
<el-table-column prop="completeAmount" label="已办数量">
</el-table-column>
</el-table>
<div>
<div style="margin-bottom: 20px;margin-top: 20px;">当前调解员</div>
</div>
<el-table ref="multipleTable" :data="tableDataNow" tooltip-effect="dark" style="width: 100%">
<el-table-column prop="mediatorName" label="调解员">
</el-table-column>
<!-- <el-table-column prop="specialty" label="专业">
</el-table-column>
<el-table-column prop="todoAmount" label="待办数量">
</el-table-column>
<el-table-column prop="completeAmount" label="已办数量">
</el-table-column> -->
</el-table>
<div>
<div style="margin-bottom: 20px;margin-top: 20px;">申请人调解员</div>
</div>
<el-table ref="multipleTable" :data="applicantTable" tooltip-effect="dark" style="width: 100%">
<el-table-column prop="mediatorName" label="调解员">
</el-table-column>
<!-- <el-table-column prop="specialty" label="专业">
</el-table-column>
<el-table-column prop="todoAmount" label="待办数量">
</el-table-column>
<el-table-column prop="completeAmount" label="已办数量">
</el-table-column> -->
</el-table>
<div>
<div style="margin-bottom: 20px;margin-top: 20px;">被申请人调解员</div>
</div>
<el-table ref="multipleTable" :data="respondentTable" tooltip-effect="dark" style="width: 100%">
<el-table-column prop="mediatorName" label="调解员">
</el-table-column>
<!-- <el-table-column prop="specialty" label="专业">
</el-table-column>
<el-table-column prop="todoAmount" label="待办数量">
</el-table-column>
<el-table-column prop="completeAmount" label="已办数量">
</el-table-column> -->
</el-table>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel" class="endbutton1"><span>取 消</span></el-button>
<el-button @click="submitMediator" class="endbutton1"><span>确 认</span></el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { Message } from 'element-ui'
import { listMediator, updateBooking, selectReservation, verifyMediator } from '@/api/caseManagement/caseManagement.js'
import moment from "moment";
export default {
props: ["confirmVisable", "confirmData", "queryParams"],
data() {
return {
tableData: [],
tableDataNow: [],
applicantTable: [],
respondentTable: [],
multipleSelection: [],
tableDataFlag: true,
formLabelAlign: {
time: []
},
mediatorArr: [],
};
},
watch: {
confirmVisable(val) {
if (val) {
this.mediatorArr = [];
this.selectReservationFn({ id: this.confirmData.id })
listMediator().then(res => {
this.tableData = res.data;
})
}
},
},
methods: {
cancel() {
this.$emit("cancelConfirm");
},
selectReservationFn(data) {
selectReservation(data).then(res => {
this.applicantTable = res.data.mediatorList;
this.respondentTable = res.data.resMediatorList;
this.tableDataNow = [{ mediatorId: res.data.mediatorId, mediatorName: res.data.mediatorName }];
if (this.tableDataNow[0].mediatorId) {
this.tableDataFlag = false;
} else {
this.tableDataFlag = true;
}
})
},
/**核实调解员 */
verifyMediatorFn(data) {
verifyMediator(data).then(res => {
this.$modal.msgSuccess("成功");
this.$emit("cancelConfirm");
this.$emit('getList', this.queryParams);
})
},
/**提交选择结果*/
async submitMediator() {
if (this.multipleSelection.length == 0 && this.tableDataNow.length > 0) {
this.verifyMediatorFn({
id: this.confirmData.id,
caseFlowId: this.confirmData.caseFlowId,
mediatorId: this.tableDataNow[0].mediatorId,
mediatorName: this.tableDataNow[0].mediatorName,
})
} else if (this.multipleSelection.length > 0 && !this.tableDataNow[0].mediatorId) {
this.verifyMediatorFn({
id: this.confirmData.id,
caseFlowId: this.confirmData.caseFlowId,
mediatorId: this.multipleSelection[0].mediatorId,
mediatorName: this.multipleSelection[0].mediatorName,
})
} else if (this.multipleSelection.length > 1 && !this.tableDataNow[0].mediatorId) {
Message.error('最多选择一名调解员');
return
}
// if (this.confirmFlag == 1) {
// let userArr = [];
// this.tableData.forEach(item => {
// userArr.push({
// userId: item.mediatorId,
// userName: item.mediatorName
// })
// })
// this.verifyMediatorFn({
// id: this.confirmData.id,
// caseFlowId: this.confirmData.caseFlowId,
// userList: userArr,
// // herDates: this.formLabelAlign.time
// })
// } else {
// if (this.multipleSelection.length > 1) {
// Message.error('最多选择一名调解员');
// return
// } else if (this.multipleSelection.length < 1) {
// Message.error('至少选择一名调解员');
// return
// }
// this.multipleSelection.forEach(item => {
// this.mediatorArr.push({
// userId: item.mediatorId,
// userName: item.mediatorName
// })
// })
// this.verifyMediatorFn({
// id: this.confirmData.id,
// caseFlowId: this.confirmData.caseFlowId,
// userList: this.mediatorArr,
// })
// }
},
handleSelectionChange(val) {
this.multipleSelection = val;
console.log(val, "PPPPPPPPPPPPPPPPPPPP");
}
},
};
</script>
<style lang="scss" scoped>
.steps {
display: flex;
flex-wrap: wrap;
}
::v-deep .el-step {
// width: 150px;
flex-basis: 25% !important;
margin-right: 20px;
margin-bottom: 20px;
}
::v-deep .el-dialog__body {
height: 500px !important;
overflow: auto !important;
}
::v-deep .el-dialog {
width: 800px;
background: #ffffff;
border-radius: 20px;
}
.timeTitle {
width: 1000%;
text-align: center;
}
</style>
@@ -1,182 +0,0 @@
<template>
<div>
<el-dialog title="部门长确认调解员" :visible="departmentVisable" v-if="departmentVisable" @close="cancel" center
:distroy-on-close="true">
<div>
<div v-if="tableDataFlag">
<div style="margin-bottom: 20px;">选择调解员</div>
</div>
<el-table v-if="tableDataFlag" ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 100%"
@selection-change="handleSelectionChange">
<el-table-column type="selection" width="55">
</el-table-column>
<el-table-column prop="mediatorName" label="调解员">
</el-table-column>
<el-table-column prop="specialty" label="专业">
</el-table-column>
<el-table-column prop="todoAmount" label="待办数量">
</el-table-column>
<el-table-column prop="completeAmount" label="已办数量">
</el-table-column>
</el-table>
<div>
<div style="margin-bottom: 20px;margin-top: 20px;">当前调解员</div>
</div>
<el-table ref="multipleTable" :data="tableDataNow" tooltip-effect="dark" style="width: 100%">
<el-table-column prop="mediatorName" label="调解员">
</el-table-column>
<!-- <el-table-column prop="specialty" label="专业">
</el-table-column>
<el-table-column prop="todoAmount" label="待办数量">
</el-table-column>
<el-table-column prop="completeAmount" label="已办数量">
</el-table-column> -->
</el-table>
<div>
<div style="margin-bottom: 20px;margin-top: 20px;">申请人调解员</div>
</div>
<el-table ref="multipleTable" :data="applicantTable" tooltip-effect="dark" style="width: 100%">
<el-table-column prop="mediatorName" label="调解员">
</el-table-column>
<!-- <el-table-column prop="specialty" label="专业">
</el-table-column>
<el-table-column prop="todoAmount" label="待办数量">
</el-table-column>
<el-table-column prop="completeAmount" label="已办数量">
</el-table-column> -->
</el-table>
<div>
<div style="margin-bottom: 20px;margin-top: 20px;">被申请人调解员</div>
</div>
<el-table ref="multipleTable" :data="respondentTable" tooltip-effect="dark" style="width: 100%">
<el-table-column prop="mediatorName" label="调解员">
</el-table-column>
<!-- <el-table-column prop="specialty" label="专业">
</el-table-column>
<el-table-column prop="todoAmount" label="待办数量">
</el-table-column>
<el-table-column prop="completeAmount" label="已办数量">
</el-table-column> -->
</el-table>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel" class="endbutton1"><span>取 消</span></el-button>
<el-button @click="submitMediator" class="endbutton1"><span>确 认</span></el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { Message } from 'element-ui'
import { listMediator, updateBooking, selectReservation, verifyMediator } from '@/api/caseManagement/caseManagement.js'
import moment from "moment";
export default {
props: ["departmentVisable", "departmentData", "queryParams"],
data() {
return {
tableData: [],
tableDataNow: [],
applicantTable: [],
respondentTable: [],
multipleSelection: [],
tableDataFlag: false,
formLabelAlign: {
time: []
},
mediatorArr: [],
};
},
watch: {
departmentVisable(val) {
if (val) {
this.mediatorArr = [];
this.selectReservationFn({ id: this.departmentData.id })
listMediator().then(res => {
this.tableData = res.data;
})
}
},
},
methods: {
cancel() {
this.$emit("cancelDepartment");
},
selectReservationFn(data) {
selectReservation(data).then(res => {
this.applicantTable = res.data.mediatorList;
this.respondentTable = res.data.resMediatorList;
this.tableDataNow = [{ mediatorId: res.data.mediatorId, mediatorName: res.data.mediatorName }];
if (this.tableDataNow.length > 0) {
this.tableDataFlag = false;
} else {
this.tableDataFlag = true;
}
})
},
/**核实调解员 */
verifyMediatorFn(data) {
verifyMediator(data).then(res => {
this.$modal.msgSuccess("成功");
this.$emit("cancelDepartment");
this.$emit('getList', this.queryParams);
})
},
/**提交选择结果*/
async submitMediator() {
if (this.multipleSelection.length == 0 && this.tableDataNow.length > 0) {
this.verifyMediatorFn({
id: this.departmentData.id,
caseFlowId: this.departmentData.caseFlowId,
mediatorId: this.tableDataNow[0].mediatorId,
mediatorName: this.tableDataNow[0].mediatorName,
})
} else if (this.multipleSelection.length > 0 && this.tableDataNow.length == 0) {
this.verifyMediatorFn({
id: this.departmentData.id,
caseFlowId: this.departmentData.caseFlowId,
mediatorId: this.multipleSelection[0].mediatorId,
mediatorName: this.multipleSelection[0].mediatorName,
})
} else if (this.multipleSelection.length > 1 && this.tableDataNow.length == 0) {
Message.error('最多选择一名调解员');
return
}
},
handleSelectionChange(val) {
this.multipleSelection = val;
console.log(val, "PPPPPPPPPPPPPPPPPPPP");
}
},
};
</script>
<style lang="scss" scoped>
.steps {
display: flex;
flex-wrap: wrap;
}
::v-deep .el-step {
// width: 150px;
flex-basis: 25% !important;
margin-right: 20px;
margin-bottom: 20px;
}
::v-deep .el-dialog__body {
height: 500px !important;
overflow: auto !important;
}
::v-deep .el-dialog {
width: 800px;
background: #ffffff;
border-radius: 20px;
}
.timeTitle {
width: 1000%;
text-align: center;
}
</style>
@@ -1,139 +0,0 @@
<template>
<div>
<el-dialog title="上传证据" :visible="evidenceVisable" @close="cancel" center :distroy-on-close="true">
<el-descriptions title="案件内容" :column="2" border>
<el-descriptions-item label="案件编号">{{ evidenceData.caseNum }}</el-descriptions-item>
<el-descriptions-item label="申请人">{{ evidenceData.applicationName }}</el-descriptions-item>
<!-- <el-descriptions-item label="案件标的">{{ evidenceData.caseSubjectAmount }}</el-descriptions-item> -->
<el-descriptions-item label="案件状态">
<el-tag size="small">{{ evidenceData.caseStatusName }}</el-tag>
</el-descriptions-item>
<!-- <el-descriptions-item label="仲裁方式">{{ evidenceData.arbitratMethodName }}</el-descriptions-item> -->
<el-descriptions-item label="申请人证据">
<div style="color: #104fad;cursor:pointer" v-for="(item, index) in fileListData"
@click="preview(item.annexPath)" :key="index">
{{ item.annexName }}</div>
</el-descriptions-item>
</el-descriptions>
<div style="margin-top: 30px;">
<el-upload class="upload-demo" ref="upload" action="" :file-list="fileList" accept=".png,.jpg,.doc,.docx,.txt,.pdf"
:auto-upload="false" :http-request="uploadFile" :on-change="beforeAvatarUpload" :before-remove="beforeRemove" multiple>
<el-button type="primary"><span>选择证据</span></el-button>
</el-upload>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel" class="endbutton1" round><span>取 消</span></el-button>
<el-button @click="upload" class="endbutton1" type="primary" round><span>点击上传</span></el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { getFileList, batchUpload } from '@/api/caseManagement/caseManagement'
import { getToken } from "@/utils/auth";
export default {
props: ["evidenceVisable", "evidenceData"],
data() {
return {
fileListData: [],
// 上传文件的列表
uploadFiles: [],
// 上传文件的个数
filesLength: 0,
info: {
annexType: 2,
},
fileList:[]
// headers: {
// Authorization: "Bearer " + getToken(),
// },
};
},
watch: {
evidenceVisable(val) {
this.fileList = []
if (val) {
this.getEvidenceList({ caseAppliId: this.evidenceData.id, annexTypeList: "2" })
}
}
},
created() {
this.info.id = this.evidenceData.id;
},
methods: {
preview(data) {
window.open(
window.location.origin + "/API" + data,
"_blank"
);
},
UploadUrl() {
return window.location.origin + "/API/evidence/upload";
},
cancel() {
this.$emit("cancelEvidence");
},
// 修改当前文件列表长度
// changeFileLength(file, fileList) {
// this.uploadFiles.push(file)
// },
// 删除文件
beforeRemove(file, fileList){
this.uploadFiles = fileList
},
// 文件上传之前处理
beforeAvatarUpload(file,fileList) {
console.log(file,fileList,"before");
this.uploadFiles = [];
// this.uploadFiles.push(file)
this.uploadFiles = fileList
},
// 用户点击上传调用
async upload() {
// 触发上传 调用配置 :http-request="uploadFile"
// 即触发 uploadFile函数
this.uploadFile()
// await this.$refs.upload.submit();
// 上传完成后执行的操作 ...
},
// 该函数还是会被调用多次
// 每次param参数传入一个文件
uploadFile() {
// 将文件加入需要上传的文件列表
// 当uploadFiles长度等于用户需要上传的文件数时进行上传
// 创建FormData上传
if (this.uploadFiles.length === 0) {
this.$message.warning('请选取文件')
return
}
let fd = new FormData()
// 将全部文件添加至FormData中
this.uploadFiles.forEach(file => {
fd.append('file', file.raw)
})
// // 将附加信息添加至FormData
fd.append("id", this.evidenceData.id)
fd.append("annexType", this.info.annexType)
// 上传文件
batchUpload(fd).then(res => {
this.$modal.msgSuccess("上传成功");
this.cancel()
})
},
// 获取案件申请人证据列表
getEvidenceList(data) {
getFileList(data).then(res => {
this.fileListData = res.data;
})
}
},
};
</script>
<style lang="scss" scoped>
.steps {
display: flex;
flex-wrap: wrap;
}
</style>
@@ -1,342 +0,0 @@
<template>
<div>
<el-dialog :title="title" :visible="mediationVisable" @close="cancel" center :distroy-on-close="true" width="1000px">
<el-form ref="form" :model="formData" label-width="180px">
<div class="caseInfo">案件信息:</div>
<el-divider></el-divider>
<el-row>
<el-col :span="12">
<el-form-item label="案件编号:" prop="caseNum">
<el-input v-model="formData.caseNum" placeholder="请输入案件编号" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="申请人:" prop="affiliate.applicationName">
<el-input v-model="formData.affiliate.applicationName" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="被申请人:" prop="respondentName">
<el-input v-model="mediationData.respondentName" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="案件标的:" prop="caseSubjectAmount">
<el-input v-model="formData.caseSubjectAmount" placeholder="请输入案件标的" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="调解费用:" prop="feePayable">
<el-input v-model="formData.feePayable" placeholder="请输入仲裁费用" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="调解员:" prop="mediatorName">
<el-input v-model="formData.mediatorName" placeholder="请输入" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
<el-col :span="24">
<el-form-item label="申请人案件证据:">
<div v-if="applicateArr.length == 0">申请人暂未提供证据!</div>
<div v-for="(item, index) in applicateArr" :key="index" v-if="item.annexType == 2">
<a href="#" @click="toFile(item, index)" style="color: blue">{{ item.annexName }}</a>
</div>
</el-form-item>
</el-col>
<el-col :span="24" v-if="mediationType">
<el-form-item label="调解结果:">
<el-radio-group v-model="mediaResult" :disabled="!isSecretaryRole" @change="resultsMediation">
<el-radio :label="1">达成调解</el-radio>
<el-radio :label="2">未达成调解</el-radio>
<el-radio :label="3">未达成调解但不在争议</el-radio>
<el-radio :label="4">未达成调解但同意引入仲裁</el-radio>
<el-radio :label="5">达成和解</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<!-- <el-col :span="24">
<el-form-item label="是否和解" v-if="mediaResult==1">
<el-radio-group v-model="isReconci">
<el-radio :label="1">是</el-radio>
<el-radio :label="0">否</el-radio>
</el-radio-group>
</el-form-item>
</el-col> -->
<!-- <el-col :span="24">
<el-form-item label="被申请人案件证据:">
<div v-if="quiltArr.length == 0">被申请人暂未提供证据!</div>
<div v-for="(item, index) in quiltArr" :key="index">
<a href="#" @click="toFile1(item, index)" style="color: blue">{{ item.annexName }}</a>
</div>
</el-form-item>
</el-col> -->
<el-col :span="24" v-if="recordArr.length > 0">
<el-form-item label="庭审笔录:">
<div v-for="(item, index) in recordArr" :key="index" style="color: blue">
<a href="#" @click="toFile2(item.annexPath)">{{ item.annexName }}</a>
</div>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="调解书:" v-if="recordArrMediate.length > 0">
<div v-for="(item, index) in recordArrMediate" :key="index" style="color: blue">
<a href="#" @click="toFileMediate(item.annexPath)">{{ item.annexName }}</a>
</div>
</el-form-item>
</el-col>
<el-col :span="24" v-if="mediationType">
<el-form-item label="预约会议房间号:">
<div>{{ formData.roomId }}</div>
</el-form-item>
</el-col>
<el-col :span="24" v-if="mediationType">
<el-form-item label="调解时间:">
<div>{{ formData.hearDate }}</div>
</el-form-item>
</el-col>
<!-- v-if="!mediationType" -->
<el-col :span="24">
<el-form-item label="上传调解书">
<el-upload class="upload-demo" accept=".png,.jpg,.doc,.docx,.txt,.pdf" ref="upload" :action="UploadUrl()"
:headers="headers" :data="filedata" :on-preview="handlePreview" :on-remove="handleRemove" :limit="1"
:on-change="beforeUpload" :on-success="handlSuccess" :file-list="fileList">
<el-button slot="trigger" size="small" :disabled="!isSecretaryRole" type="primary">选取文件</el-button>
<!-- <el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传到服务器</el-button> -->
<div slot="tip" class="el-upload__tip">只能上传.jpg,png,.doc,docx,.txt,.pdf文件</div>
</el-upload>
</el-form-item>
</el-col>
<!-- </el-form> -->
</el-form>
<el-button @click="openmeeting" type="primary" v-if="mediationType">{{ isSecretaryRole ? '发起会议' :
'进入会议' }}</el-button>
<!-- v-if="this.recordArr.length <= 0 && mediationData.mediationMethod == '1'" -->
<el-button @click="openArbitrationresults" type="primary"
v-if="this.recordArrMediate.length <= 0 && mediationData.mediationMethod == '1' && isSecretaryRole">确认会议结果</el-button>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel" class="endbutton1" round>
<span>取 消</span>
</el-button>
<el-button v-if="isSecretaryRole" :loading="loadingSubmit" @click="submitMediation"
:disabled="this.recordArrMediate.length <= 0 && mediationData.mediationMethod == '1'" class="endbutton1"
type="primary" round>
提 交
</el-button>
</div>
</el-dialog>
</div>
</template>
<!-- hearDate -->
<script>
import _ from 'lodash'
import {
caseApplicationSelectById,
mediation,
confirmMeetingResult,
secretaryRoleByUserId
} from "@/api/caseManagement/caseManagement.js";
import { getUserProfile } from "@/api/system/user";
import { reserveConferenceList } from "@/api/metting/metting.js";
import { getToken } from "@/utils/auth";
export default {
props: ["mediationVisable", "mediationData", "queryParams"],
data() {
return {
loanStartDate: "",
codes: null,
title: "线上调解",
applicateArr: [],
quiltArr: [],
recordArr: [],
recordArrMediate: [],
roomId: null,
startTime: null,
mediaResult: 1,
// isReconci:0,
formData: {
affiliate: {}
},
user: "",
userId: null,
flieList: [],
mediationType: true,
headers: {
Authorization: "Bearer " + getToken(),
},
filedata: {
annexType: 7,
},
fileList: [],
attachList: [],
isSecretaryRole: true,
loadingSubmit: false
};
},
watch: {
mediationVisable(val) {
this.recordArr = [];
this.recordArrMediate = [];
if (this.mediationData.mediationMethod == "1") {
this.title = "线上调解";
this.mediationType = true;
} else if (this.mediationData.mediationMethod == "2") {
this.title = "线下调解";
this.mediationType = false;
}
if (val) {
this.caseApplicationSelectByIdFn({
id: this.mediationData.id
});
this.getUser();
}
}
},
created() { },
methods: {
// 根据用户id查询是否为调解员
secretaryRoleByUserIdFn() {
secretaryRoleByUserId({
userId: this.userId
}).then(res => {
this.isSecretaryRole = res.data.isSecretaryRole;
if(this.recordArrMediate){
this.isSecretaryRole = false
}
})
},
/**上传地址*/
UploadUrl() {
return window.location.origin + "/API/common/upload";
},
handlePreview(file) {
},
handleRemove(file, fileList) {
},
beforeUpload(flie, fileList) {
this.fileList = fileList;
},
handlSuccess(res, file) {
this.codes = res.code
this.attachList = [{ annexId: res.annexId }];
// this.$set(this.mediationData, "attachList", {annexId:res.annexId});
},
/** 获取案件详情信息 */
caseApplicationSelectByIdFn(data) {
caseApplicationSelectById(data).then(res => {
this.formData = res.data;
this.applicateArr = res.data.caseAttachList;
res.data.caseAttachList.forEach(item => {
if (item.annexType == 6) {
this.recordArr.push(item);
} else if (item.annexType == 7) {
this.recordArrMediate.push(item);
}
});
});
},
/** 获取用户信息 */
getUser() {
getUserProfile().then(response => {
this.user = response.data.userName;
this.userId = response.data.userId;
this.secretaryRoleByUserIdFn();
});
},
/** 发起会议 */
openmeeting() {
window.open(
// `http://localhost:8080/#/home?name=${this.user}&id=${this.formData.id}&userId=${this.userId}&roomId=${this.formData.roomId}&type=tiaojie`
`https://txroom.xayunmei.com/#/home?name=${this.user}&id=${this.formData.id}&userId=${this.userId}&roomId=${this.formData.roomId}&type=tiaojie`
);
},
/**提交仲裁结果 */
openArbitrationresults() {
this.recordArr = [];
caseApplicationSelectById({
id: this.mediationData.id
}).then(res => {
console.log(res)
res.data.caseAttachList.forEach(item => {
if (item.annexType == 6) {
this.recordArr.push(item);
}
});
});
confirmMeetingResult({
id: this.mediationData.id,
caseFlowId: this.mediationData.caseFlowId,
batchNumber: "",
mediaResult: this.mediaResult,
}).then(res => {
caseApplicationSelectById({
id: this.mediationData.id
}).then(res => {
res.data.caseAttachList.forEach(item => {
if (item.annexType == 7) {
this.recordArrMediate.push(item);
}
});
});
})
this.isSecretaryRole = false
},
/** 庭审笔录附件 */
toFile2(annexPath) {
window.open(window.location.origin + "/API" + annexPath, "_black");
},
toFileMediate(annexPath) {
window.open(window.location.origin + "/API" + annexPath, "_black");
},
/** 生成调解书 */
mediationFn(data) {
mediation(data).then(res => {
this.$modal.msgSuccess("成功");
this.$emit("cancelMediation");
this.$emit("getList", this.queryParams);
this.loadingSubmit = false;
});
},
cancel() {
this.$emit("cancelMediation");
},
submitMediation() {
if (this.fileList.length < 1 && !this.mediationType && this.mediationData.mediationMethod == "2") {
this.$modal.msgError("请上传调解书");
return
} else {
this.loadingSubmit = true;
}
let mediationVal = {}
if (this.codes == 200) {
mediationVal = {
id: this.mediationData.id,
caseFlowId: this.mediationData.caseFlowId,
attachList: this.attachList,
// isReconci:this.isReconci,
mediaResult: this.mediaResult,
}
} else {
mediationVal = {
id: this.mediationData.id,
caseFlowId: this.mediationData.caseFlowId,
mediaResult: this.mediaResult,
}
}
this.mediationFn(mediationVal);
},
resultsMediation() {
}
}
};
</script>
<style lang="scss" scoped>
.steps {
display: flex;
flex-wrap: wrap;
}
</style>
@@ -1,93 +0,0 @@
<template>
<div>
<el-dialog title="案件流程" :visible="processVisable" @close="cancel" center :distroy-on-close="true">
<div class="loading" v-if="flagLoading">
<i class="el-icon-loading"></i>
</div>
<div v-else>
<el-steps class="steps" :active="finishCasenode.length">
<el-step :title="item.content" :description="(item.createNickName || '') + (item.caseNodeTime || '')+(item.nextRoleName || '')" v-for="(item,index) in stepNumber" :key="index"></el-step>
</el-steps>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel" class="endbutton1"><span>取 消</span></el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {selectCaseProgress} from '@/api/caseManagement/caseManagement.js'
export default {
props: ["processVisable","processData","caseFlowNumber"],
data() {
return {
processId:null,
pageData:{},
caseStatus:0,
finishCasenode:[],
stepNumber:[],
flagLoading:true
};
},
watch: {
processVisable(val){
if(val){
this.processId = this.caseFlowNumber.id;
this.selectCaseProgressFn({caseId:this.processId});
}
}
},
methods: {
cancel() {
this.$emit("cancelViewProcess");
},
selectCaseProgressFn(data){
selectCaseProgress(data).then(res=>{
let finishCasenode = res.data.data.finishCasenode;;
this.finishCasenode = finishCasenode;
let inCasenode = res.data.data.inCasenode;
let nextCasenode = res.data.data.nextCasenode;
this.stepNumber= [...finishCasenode,...inCasenode,...nextCasenode];
this.flagLoading =false
})
}
},
};
</script>
<style lang="scss" scoped>
.steps{
display: flex;
flex-wrap: wrap;
}
::v-deep .el-step{
// width: 150px;
flex-basis:25% !important;
margin-right: 20px;
margin-bottom: 20px;
}
::v-deep .el-dialog__body {
height: 500px !important;
overflow: auto !important;
}
::v-deep .el-dialog {
width: 800px;
background: #ffffff;
border-radius: 20px;
}
.loading {
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
.el-icon-loading {
font-size: 50px;
}
}
</style>
@@ -1,113 +0,0 @@
<template>
<div>
<el-dialog
title="案件日志"
:visible="showcaseLog"
@close="cancel"
center
:distroy-on-close="true"
>
<div class="loading" v-if="flagLoading">
<i class="el-icon-loading"></i>
</div>
<div v-else>
<div class="noData" v-if="noData">暂无数据!</div>
<el-timeline v-else>
<el-timeline-item
v-for="(activity, index) in activities"
:key="index"
:timestamp="(index + 1).toString()"
placement="top"
>
<p>{{ activity.content }}</p>
</el-timeline-item>
</el-timeline>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel" class="endbutton1"
><span>取 消</span></el-button
>
</div>
</el-dialog>
</div>
</template>
<script>
export default {
props: ["showcaseLog", "flagLoading", "caselogDataArr"],
data() {
return {
reverse: true,
activities: [],
noData: false,
};
},
watch: {
caselogDataArr: {
handler(val) {
if (val && val.length > 0) {
this.noData = false;
this.activities = val;
this.activities.forEach((item) => {
item.content = item.content;
});
} else {
this.noData = true;
}
},
},
},
methods: {
cancel() {
this.$emit("cancelcaseLog");
},
},
};
</script>
<style lang="scss" scoped>
::v-deep .el-dialog__body {
height: 500px !important;
overflow: auto !important;
}
::v-deep .el-dialog {
width: 800px;
background: #ffffff;
border-radius: 20px;
}
.endbutton1 {
width: 154px;
height: 37px;
background: #ffffff;
border: 1px solid #d0d0d0;
border-radius: 19px;
span {
width: 31px;
height: 13px;
font-size: 16px;
font-family: Microsoft YaHei;
font-weight: 400;
color: #959595;
}
}
.loading {
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
.el-icon-loading {
font-size: 50px;
}
}
.noData {
width: 100%;
height: 400px;
font-size: 30px;
font-weight: 700;
color: #959595;
display: flex;
justify-content: center;
align-items: center;
}
</style>
@@ -1,259 +0,0 @@
<template>
<div>
<el-dialog :title="payTitle" v-if="openPay" :visible="openPay" @close="payCancel" width="800px" append-to-body
:destroy-on-close="true" center>
<el-descriptions title="订单信息">
<el-descriptions-item label="案件编号">{{
formPayDetail.caseNum
}}</el-descriptions-item>
<el-descriptions-item label="申请人">{{
formPayDetailAffiliate.applicationName || ''
}}</el-descriptions-item>
<!-- <el-descriptions-item label="案件标的">{{
formPayDetail.caseSubjectAmount
}}</el-descriptions-item> -->
<el-descriptions-item label="申请人应缴费用">{{
formPayDetail.feePayable
}}</el-descriptions-item>
<el-descriptions-item label="被申请人">{{
formPayDetailAffiliate.respondentName
}}</el-descriptions-item>
<el-descriptions-item label="案件状态">
<el-tag size="mini" type='danger' effect="dark">
{{ formPayDetail.caseStatusName }}
</el-tag>
</el-descriptions-item>
<el-descriptions-item label="驳回原因" v-if="formPayDetail.reason">
<el-tag size="mini" type='danger' effect="dark">
{{ formPayDetail.reason }}
</el-tag>
</el-descriptions-item>
</el-descriptions>
<div class="paySelectType">
<el-radio-group v-model="paySelect" @input="changPayType">
<el-radio :label="0">线上支付</el-radio>
<el-radio :label="1">线下支付</el-radio>
</el-radio-group>
</div>
<div class="payupload">
<span>上传支付凭证:</span>
<div class="uploadBtn">
<el-upload class="upload-demo" ref="upload" :action="UploadUrl()" :headers="headers" :data="filedata"
:on-preview="handlePreview" :on-remove="handleRemove" :on-change="beforeUpload" :on-success="handlSuccess" :file-list="fileList"
>
<el-button slot="trigger" size="small" type="primary">选取文件</el-button>
<!-- <el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传到服务器</el-button> -->
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>
</el-upload>
</div>
</div>
<div class="payType" v-if="paySelect == 0">
<span>请选择支付方式:</span>
<i class="iconfont icon-weixinzhifu" @click="pay(0)"></i>
<i class="iconfont icon-zhifubao" @click="pay(1)"></i>
</div>
<div class="payImg">
<div id="qrcodeImg"></div>
</div>
<div class="payTitle">{{ payMain }}</div>
<div slot="footer" class="dialog-footer">
<el-button @click="payCancel" round><span>取 消</span></el-button>
<el-button @click="submitUpload" type="primary" :disabled="payFlagSubmit" round><span>确认缴费</span></el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { casePay, confirmPayDig } from "@/api/pay/pay";
import QRCode from "qrcodejs2";
import { getToken } from "@/utils/auth";
export default {
props: ["openPay", "payTitle", "formPayDetail", "payForm", "queryParams","payId","formPayDetailAffiliate"],
data() {
return {
// key: value
// 支付文字
payMain: "",
timer: null,
paySelect: 1,//支付线上/线下
fileList: [],
headers: {
Authorization: "Bearer " + getToken(),
},
filedata: {
annexType: 4,
},
submitForm:{
payType:1,
payOrderList:[],
caseId:null
},
payFlagSubmit:true
};
},
methods: {
UploadUrl() {
return window.location.origin + "/API/common/upload";
},
//选择支付方式(线上,线下)
changPayType(data) {
if(data == 1){
document.getElementById("qrcodeImg").innerHTML = "";
this.payMain = ""
}
this.submitForm.payType = data;
},
beforeUpload(flie, fileList) {
this.fileList = fileList;
},
// 文件上传成功
handlSuccess(res, file) {
this.submitForm.payOrderList.push({
annexId: res.annexId,
annexName:res.annexName
});
this.payFlagSubmit = false;
},
submitUpload() {
if (this.fileList.length < 1) {
this.$modal.msgError("请上传缴费凭证");
return
}
this.submitForm.caseFlowId = this.formPayDetail.caseFlowId;
confirmPayDig(this.submitForm).then(res=>{
this.$modal.msgSuccess("成功");
this.payCancel()
this.$emit("getList", this.queryParams);
})
},
handleRemove(file, fileList) {
(this.submitForm.payOrderList = []),
fileList.forEach((item) => {
this.submitForm.payOrderList.push({ annexId:item.response.data.annexId,annexName:item.response.data.annexName });
});
},
handlePreview(file) {
},
// 生成二维码
qrcode(url) {
// 前端根据 URL 生成微信支付二维码
document.getElementById("qrcodeImg").innerHTML = "";
return new QRCode("qrcodeImg", {
width: 200,
height: 200,
text: url,
colorDark: "#000",
colorLight: "#fff",
});
},
// 支付
pay(val) {
if (this.payForm.feePayable == 0 || !this.payForm.feePayable) {
this.$message({
message: "此案件无需缴费",
type: "error",
});
return;
}
let payType = "";
if (val == 0) {
payType = "wxpay";
this.payMain = "请使用微信扫二维码支付";
} else if (val == 1) {
payType = "alipay";
this.payMain = "请使用支付宝扫二维码支付";
}
casePay({
totalFee: this.payForm.feePayable * 100,
caseId: this.payForm.caseId,
tradeType: "native",
platform: payType,
}).then((res) => {
this.paySrc = res.data.code_url;
this.qrcode(this.paySrc);
});
},
payCancel() {
this.$emit("paycancelRow");
this.payMain = "";
},
},
watch:{
openPay(val){
if(val){
this.submitForm.payOrderList = []
this.paySelect = 1;
this.fileList = [];
this.filedata.id = this.payId;
this.submitForm.caseId = this.payId;
}
}
}
};
</script>
<style lang="scss" scoped>
.payType {
height: 80px;
line-height: 80px;
display: flex;
.icon-weixinzhifu {
font-size: 24px;
color: #27a56f;
margin-right: 15px;
}
.icon-zhifubao {
font-size: 24px;
color: #1d76cc;
}
}
.paySelectType {
margin-top: 20px;
margin-bottom: 20px;
}
.payupload {
display: flex;
.uploadBtn {}
}
.payImg {
width: 100%;
display: flex;
justify-content: center;
}
.payTitle {
margin-top: 20px;
width: 100%;
text-align: center;
}
::v-deep .el-dialog {
width: 800px;
background: #ffffff;
border-radius: 20px;
}
.endbutton {
width: 154px;
height: 37px;
background: #ffffff;
border: 1px solid #d0d0d0;
border-radius: 19px;
span {
width: 31px;
height: 13px;
font-size: 16px;
font-family: Microsoft YaHei;
font-weight: 400;
color: #959595;
}
}
</style>
@@ -1,169 +0,0 @@
<template>
<div>
<el-dialog :title="title" :visible="openDialog" @close="cancel" :destroy-on-close="true" center>
<el-form ref="form" :model="form" label-width="180px">
<el-form-item label="案件编号:" prop="caseNum">
<el-input v-model="form.caseNum" placeholder="" :disabled="true"/>
</el-form-item>
<!-- <el-form-item label="案件标的:" prop="caseSubjectAmount">
<el-input v-model="form.caseSubjectAmount" :disabled="true"/>
</el-form-item> -->
<!-- <el-form-item label="缴费人:" prop="applicantName">
<el-input v-model="form.applicationName" placeholder="" />
</el-form-item> -->
<el-form-item label="缴费金额:" prop="feePayable">
<el-input v-model="form.feePayable" :disabled="true"/>
</el-form-item>
<el-form-item label="申请人缴费凭证:" v-if="form.caseAttachList.length > 0">
<div style="color: #104fad;cursor:pointer" v-for="(item, index) in form.caseAttachList" :key="index"
@click="preview(item.annexPath)">
{{ item.annexName }}
</div>
</el-form-item>
<el-form-item label="被申请人缴费凭证:" v-if="form.resCaseAttachList.length > 0">
<div style="color: #104fad;cursor:pointer" v-for="(item, index) in form.resCaseAttachList" :key="index"
@click="preview(item.annexPath)">
{{ item.annexName }}
</div>
</el-form-item>
<!-- 判断缴费是否通过 -->
<el-form-item label="是否缴费通过:" v-if="flag == 0">
<el-radio-group v-model="yesOrNo">
<el-radio :label="1">通过</el-radio>
<el-radio :label="0">驳回</el-radio>
</el-radio-group>
</el-form-item>
<!-- 缴费驳回原因-->
<el-form-item label="驳回原因:" v-if="yesOrNo == 0" prop="reason" :rules="[{ required: true, message: '请输入驳回原因',trigger: 'blur',},]">
<el-input type="textarea" :rows="2" placeholder="请输入驳回原因" v-model="form.reason"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<!-- <el-button type="primary" @click="submitForm" v-if="flag == 0" class="endbutton">确认已缴费</el-button> -->
<el-button type="primary" @click="submitForm" v-if="flag == 0" class="endbutton">确 认</el-button>
<el-button @click="cancel" class="endbutton1">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { confirmPaid, resConfirmPaid } from '@/api/caseManagement/caseManagement.js'
export default {
props: ["openDialog", "title", "flag", "detailform", "getList", "paymentConfirma", "queryParams",'isapplicant'],
data() {
return {
form: {
reason: '',//驳回原因
},
yesOrNo: 1,
srcList: [],
};
},
watch: {
detailform: {
handler(val) {
if (val) {
this.form = val;
}
},
},
openDialog: {
handler(val) {
if (val) {
this.yesOrNo = 1
}
}
}
},
methods: {
preview(data) {
window.open(
window.location.origin + "/API" + data,
"_blank"
);
},
// 确认缴费
submitForm() {
let paramsVal = {
caseId: this.paymentConfirma.id,
batchNumber: "",
caseFlowId: this.paymentConfirma.caseFlowId,
yesOrNo: this.yesOrNo,
reason: this.form.reason
}
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.isapplicant) {
confirmPaid(paramsVal).then((res) => {
this.$message({
message: "确认成功",
type: "success",
});
this.cancel();
this.$emit("getList", this.queryParams);
})
console.log('申请人');
} else {
// 被申请人 resConfirmPaid
resConfirmPaid(paramsVal).then((res) => {
this.$message({
message: "确认成功",
type: "success",
});
this.cancel();
this.$emit("getList", this.queryParams);
})
console.log('被申请人');
}
}
})
},
cancel() {
this.$emit("cancelpaymentdetails");
},
},
};
</script>
<style lang="scss" scoped>
::v-deep .el-dialog {
width: 50%;
background: #ffffff;
border-radius: 20px;
}
.endbutton {
width: 124px;
height: 37px;
background: #0072ff;
border-radius: 19px;
span {
width: 32px;
height: 15px;
font-size: 16px;
font-family: Microsoft YaHei;
font-weight: 400;
color: #ffffff;
// line-height: 48px;
}
}
.endbutton1 {
width: 124px;
height: 37px;
background: #ffffff;
border: 1px solid #d0d0d0;
border-radius: 19px;
span {
width: 31px;
height: 13px;
font-size: 16px;
font-family: Microsoft YaHei;
font-weight: 400;
color: #959595;
}
}
</style>
@@ -1,259 +0,0 @@
<template>
<div>
<el-dialog :title="resPayTitle" v-if="openResPay" :visible="openResPay" @close="payCancel" width="800px" append-to-body
:destroy-on-close="true" center>
<el-descriptions title="订单信息">
<el-descriptions-item label="案件编号">{{
formResPayDetail.caseNum
}}</el-descriptions-item>
<el-descriptions-item label="申请人">{{
formResPay.applicationName || ''
}}</el-descriptions-item>
<!-- <el-descriptions-item label="案件标的">{{
formResPayDetail.caseSubjectAmount
}}</el-descriptions-item> -->
<el-descriptions-item label="被申请人应缴费用">{{
formResPayDetail.feePayable
}}</el-descriptions-item>
<el-descriptions-item label="被申请人">{{
formResPay.respondentName
}}</el-descriptions-item>
<el-descriptions-item label="案件状态">
<el-tag size="mini" type='danger' effect="dark">
{{ formResPayDetail.caseStatusName }}
</el-tag>
</el-descriptions-item>
<el-descriptions-item label="驳回原因" v-if="formResPayDetail.reason">
<el-tag size="mini" type='danger' effect="dark">
{{ formResPayDetail.reason }}
</el-tag>
</el-descriptions-item>
</el-descriptions>
<div class="paySelectType">
<el-radio-group v-model="paySelect" @input="changPayType">
<el-radio :label="0">线上支付</el-radio>
<el-radio :label="1">线下支付</el-radio>
</el-radio-group>
</div>
<div class="payupload">
<span>上传支付凭证:</span>
<div class="uploadBtn">
<el-upload class="upload-demo" ref="upload" :action="UploadUrl()" :headers="headers" :data="filedata"
:on-preview="handlePreview" :on-remove="handleRemove" :on-change="beforeUpload" :on-success="handlSuccess" :file-list="fileList"
>
<el-button slot="trigger" size="small" type="primary">选取文件</el-button>
<!-- <el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传到服务器</el-button> -->
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>
</el-upload>
</div>
</div>
<div class="payType" v-if="paySelect == 0">
<span>请选择支付方式:</span>
<i class="iconfont icon-weixinzhifu" @click="pay(0)"></i>
<i class="iconfont icon-zhifubao" @click="pay(1)"></i>
</div>
<div class="payImg">
<div id="qrcodeImg"></div>
</div>
<div class="resPayTitle">{{ payMain }}</div>
<div slot="footer" class="dialog-footer">
<el-button @click="payCancel" round><span>取 消</span></el-button>
<el-button @click="submitUpload" type="primary" :disabled="payFlagSubmit" round><span>确认缴费</span></el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { casePay, confirmPayDig } from "@/api/pay/pay";
import QRCode from "qrcodejs2";
import { getToken } from "@/utils/auth";
export default {
props: ["openResPay", "resPayTitle", "formResPayDetail", "resPayForm", "queryParams","resPayId","formResPay"],
data() {
return {
// key: value
// 支付文字
payMain: "",
timer: null,
paySelect: 1,//支付线上/线下
fileList: [],
headers: {
Authorization: "Bearer " + getToken(),
},
filedata: {
annexType: 9,
},
submitForm:{
payType:1,
payOrderList:[],
caseId:null
},
payFlagSubmit:true
};
},
methods: {
UploadUrl() {
return window.location.origin + "/API/common/upload";
},
//选择支付方式(线上,线下)
changPayType(data) {
if(data == 1){
document.getElementById("qrcodeImg").innerHTML = "";
this.payMain = ""
}
this.submitForm.payType = data;
},
beforeUpload(flie, fileList) {
this.fileList = fileList;
},
// 文件上传成功
handlSuccess(res, file) {
this.submitForm.payOrderList.push({
annexId: res.annexId,
annexName:res.annexName
});
this.payFlagSubmit = false;
},
submitUpload() {
if (this.fileList.length < 1) {
this.$modal.msgError("请上传缴费凭证");
return
}
this.submitForm.caseFlowId = this.formResPayDetail.caseFlowId;
confirmPayDig(this.submitForm).then(res=>{
this.$modal.msgSuccess("成功");
this.payCancel()
this.$emit("getList", this.queryParams);
})
},
handleRemove(file, fileList) {
(this.submitForm.payOrderList = []),
fileList.forEach((item) => {
this.submitForm.payOrderList.push({ annexId:item.response.data.annexId,annexName:item.response.data.annexName });
});
},
handlePreview(file) {
},
// 生成二维码
qrcode(url) {
// 前端根据 URL 生成微信支付二维码
document.getElementById("qrcodeImg").innerHTML = "";
return new QRCode("qrcodeImg", {
width: 200,
height: 200,
text: url,
colorDark: "#000",
colorLight: "#fff",
});
},
// 支付
pay(val) {
if (this.resPayForm.feePayable == 0 || !this.resPayForm.feePayable) {
this.$message({
message: "此案件无需缴费",
type: "error",
});
return;
}
let payType = "";
if (val == 0) {
payType = "wxpay";
this.payMain = "请使用微信扫二维码支付";
} else if (val == 1) {
payType = "alipay";
this.payMain = "请使用支付宝扫二维码支付";
}
casePay({
totalFee: this.resPayForm.feePayable * 100,
caseId: this.resPayForm.caseId,
tradeType: "native",
platform: payType,
}).then((res) => {
this.paySrc = res.data.code_url;
this.qrcode(this.paySrc);
});
},
payCancel() {
this.$emit("paycancelRes");
this.payMain = "";
},
},
watch:{
openResPay(val){
if(val){
this.submitForm.payOrderList = []
this.paySelect = 1;
this.fileList = [];
this.filedata.id = this.resPayId;
this.submitForm.caseId = this.resPayId;
}
}
}
};
</script>
<style lang="scss" scoped>
.payType {
height: 80px;
line-height: 80px;
display: flex;
.icon-weixinzhifu {
font-size: 24px;
color: #27a56f;
margin-right: 15px;
}
.icon-zhifubao {
font-size: 24px;
color: #1d76cc;
}
}
.paySelectType {
margin-top: 20px;
margin-bottom: 20px;
}
.payupload {
display: flex;
.uploadBtn {}
}
.payImg {
width: 100%;
display: flex;
justify-content: center;
}
.resPayTitle {
margin-top: 20px;
width: 100%;
text-align: center;
}
::v-deep .el-dialog {
width: 800px;
background: #ffffff;
border-radius: 20px;
}
.endbutton {
width: 154px;
height: 37px;
background: #ffffff;
border: 1px solid #d0d0d0;
border-radius: 19px;
span {
width: 31px;
height: 13px;
font-size: 16px;
font-family: Microsoft YaHei;
font-weight: 400;
color: #959595;
}
}
</style>
@@ -1,125 +0,0 @@
<template>
<div>
<el-dialog title="预约调解员" :visible="mediatorVisable" v-if="mediatorVisable" @close="cancel" center :distroy-on-close="true">
<div>
<div>
<div style="margin-bottom: 20px;">预约调解员</div>
</div>
<el-table ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 100%"
@selection-change="handleSelectionChange">
<el-table-column type="selection" width="55">
</el-table-column>
<el-table-column prop="mediatorName" label="调解员">
</el-table-column>
<el-table-column prop="specialty" label="专业">
</el-table-column>
<el-table-column prop="todoAmount" label="待办数量">
</el-table-column>
<el-table-column prop="completeAmount" label="已办数量">
</el-table-column>
</el-table>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel" class="endbutton1" round><span>取 消</span></el-button>
<el-button @click="submitMediator" class="endbutton1" type="primary" round><span>确 认</span></el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { Message } from 'element-ui'
import { listMediator,updateBooking } from '@/api/caseManagement/caseManagement.js'
import { createRoomId } from '@/api/metting/metting.js'
import moment from "moment";
export default {
props: ["mediatorVisable", "mediatorData","queryParams"],
data() {
return {
tableData: [],
multipleSelection: [],
formLabelAlign: {
time:[]
},
mediatorArr:[]
};
},
watch: {
mediatorVisable(val) {
if (val) {
listMediator().then(res=>{
this.tableData = res.data;
})
}
}
},
methods: {
cancel() {
this.$emit("cancelMediator");
},
/**提交选择结果*/
async submitMediator() {
if (this.multipleSelection.length > 3) {
Message.error('最多选择三名调解员');
return
}else if(this.multipleSelection.length < 1){
Message.error('请选择调解员');
return
}
this.mediatorArr = [];
this.multipleSelection.forEach(item=>{
this.mediatorArr.push({
mediatorId:item.mediatorId,
mediatorName:item.mediatorName
})
})
await this.updateBookingFn({
id:this.mediatorData.id,
caseFlowId:this.mediatorData.caseFlowId,
mediatorList:this.mediatorArr,
})
},
async updateBookingFn(data){
await updateBooking(data).then(res=>{
this.$modal.msgSuccess("成功");
this.$emit("cancelMediator");
this.$emit('getList', this.queryParams);
})
},
handleSelectionChange(val) {
this.multipleSelection = val;
// console.log(this.multipleSelection,"LLLLLLLLLLLLLLLLL");
}
},
};
</script>
<style lang="scss" scoped>
.steps {
display: flex;
flex-wrap: wrap;
}
::v-deep .el-step {
// width: 150px;
flex-basis: 25% !important;
margin-right: 20px;
margin-bottom: 20px;
}
::v-deep .el-dialog__body {
height: 500px !important;
overflow: auto !important;
}
::v-deep .el-dialog {
width: 800px;
background: #ffffff;
border-radius: 20px;
}
.timeTitle {
width: 1000%;
text-align: center;
}
</style>
@@ -1,123 +0,0 @@
<template>
<div>
<el-dialog title="确认时间" :visible="timeConfirmVisable" v-if="timeConfirmVisable" @close="cancel" center
:distroy-on-close="true">
<!-- <div style="margin-bottom: 20px;">
<el-radio-group v-model="confirmFlag">
<el-radio :label="1">同意</el-radio>
<el-radio :label="2">拒绝</el-radio>
</el-radio-group>
</div> -->
<div>
<div>
<!-- <div style="margin-top: 20px;margin-bottom: 20px;">时间</div> -->
<el-form label-position="right" label-width="80px" :model="formLabelAlign">
<el-form-item label="时间">
<el-date-picker v-model="formLabelAlign.name" type="datetime" :picker-options="pickerOptions" placeholder="选择日期时间">
</el-date-picker>
<!-- <el-input v-else v-model="formLabelAlign.name"></el-input> -->
</el-form-item>
</el-form>
</div>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel" class="endbutton1" round><span>取 消</span></el-button>
<el-button @click="submitMediator" class="endbutton1" type="primary" round><span>确 认</span></el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { Message } from 'element-ui'
import { listMediator, selectReservation, confirmDate } from '@/api/caseManagement/caseManagement.js'
import { createRoomId } from '@/api/metting/metting.js'
import moment from "moment";
export default {
props: ["timeConfirmVisable", "timeConfirmData", "queryParams"],
data() {
return {
tableData: [],
multipleSelection: [],
formLabelAlign: {
time: [],
name: ""
},
pickerOptions: {
disabledDate(time) {
return time.getTime() <= Date.now() -1 * 24 * 3600 * 1000; // 禁用超过当前时间的日期
},
selectableRange: `${new Date()}- 23:59:59`,//这
},
};
},
watch: {
timeConfirmVisable(val) {
if (val) {
this.formLabelAlign.name = null;
}
},
},
methods: {
cancel() {
this.$emit("cancelTimeConfirm");
},
selectReservationFn(data) {
selectReservation(data).then(res => {
this.tableData = res.data.mediatorList;
this.formLabelAlign.name = res.data.herDates[0]
})
},
/**核实时间 */
verifyMediatorFn(data) {
confirmDate(data).then(res => {
this.$modal.msgSuccess("成功");
this.$emit("cancelTimeConfirm");
this.$emit('getList', this.queryParams);
})
},
// 生成会议房间号
createRoomIdFn(data) {
createRoomId(data).then(res => {
console.log(res, "房间号");
})
},
/**提交选择结果*/
async submitMediator() {
this.createRoomIdFn({
caseId: this.timeConfirmData.id
})
if (this.formLabelAlign.name == '') {
Message.error('请选择时间');
return
}
this.formLabelAlign.name = moment(
this.formLabelAlign.name
).format("YYYY-MM-DD HH:mm:ss");
this.verifyMediatorFn({
id: this.timeConfirmData.id,
caseFlowId: this.timeConfirmData.caseFlowId,
herDates: [this.formLabelAlign.name]
})
},
},
};
</script>
<style lang="scss" scoped>
.steps {
display: flex;
flex-wrap: wrap;
}
::v-deep .el-step {
// width: 150px;
flex-basis: 25% !important;
margin-right: 20px;
margin-bottom: 20px;
}
.timeTitle {
width: 1000%;
text-align: center;
}
</style>
@@ -1,163 +0,0 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true">
<el-form-item label="案件状态" prop="caseStatusName">
<el-input v-model="queryParams.caseStatusName" placeholder="请输入案件状态" clearable style="width: 240px"
@keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="节点名称" prop="nodeName">
<el-select v-model="queryParams.nodeName" placeholder="节点名称" clearable style="width: 240px">
<el-option v-for="dict in dict.type.case_flow_node" :key="dict.value" :label="dict.label"
:value="dict.value" />
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="addnodeprocess">新增流程节点</el-button>
</el-col>
</el-row>
<el-table v-loading="loading" :data="dataList" style="width: 100%">
<el-table-column label="序号" type="index" align="center">
<template slot-scope="scope">
<span>{{
(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1
}}</span>
</template>
</el-table-column>
<el-table-column label="节点名称" align="center" prop="nodeName" :show-overflow-tooltip="true" />
<el-table-column label="案件状态" align="center" prop="caseStatusName" :show-overflow-tooltip="true" />
<el-table-column label="驳回节点" align="center" prop="backFlowName" :show-overflow-tooltip="true" />
<el-table-column label="关联角色" align="center" prop="roleNames" :show-overflow-tooltip="true" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" @click="moveDown(scope.row)" type="text" icon="el-icon-arrow-down"></el-button>
<el-button size="mini" @click="moveUp(scope.row)" type="text" icon="el-icon-arrow-up"></el-button>
<el-button size="mini" @click="eidtNodeprocess(scope.row)" type="text"
icon="el-icon-edit">修改</el-button>
<el-button size="mini" @click="deleteNodeprocess(scope.row)" type="text"
icon="el-icon-delete">删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList(queryParams)" />
<addNodeprocess :addvisiable="addvisiable" @cancelAdd="cancelAdd" :editData="editData" @getList="getList"
:queryParams="queryParams">
</addNodeprocess>
</div>
</template>
<script>
import { queryCaseFlowInfo, deleteCaseFlow, sortCaseFlow } from "@/api/caseprocessManagement/caseprocessManagement.js";
import addNodeprocess from "./components/addNodeprocess";
export default {
name: "paymentList",
components: {
addNodeprocess,
},
dicts: ['case_flow_node'],
data() {
return {
queryParams: {
pageNum: 1,
pageSize: 10,
},
// 遮罩层
loading: false,
// 总条数
total: 0,
// 表格数据
form: {},
// 校验表单
rules: {},
dataList: [],
addvisiable: false,//新增弹窗
editData: {},
};
},
created() {
this.getList(this.queryParams)
},
methods: {
// 删除
deleteNodeprocess(row) {
this.$modal
.confirm("是否删除")
.then((res) => {
this.deleteSealFn({ id: row.id })
})
},
// 删除接口
deleteSealFn(data) {
deleteCaseFlow(data).then(res => {
this.$modal.msgSuccess("删除成功!");
this.getList(this.queryParams);
})
},
// 向下 sortType
moveDown(row) {
let params = {
id: row.id,
sortType: 0
}
sortCaseFlow(params).then((res) => {
this.getList(this.queryParams);
})
},
// 向上
moveUp(row) {
let params = {
id: row.id,
sortType: 1
}
sortCaseFlow(params).then((res) => {
this.getList(this.queryParams);
})
},
// 新增流程节点
addnodeprocess(row) {
this.addvisiable = true;
this.editData = {};
},
cancelAdd() {
this.addvisiable = false;
},
// 编辑
eidtNodeprocess(row) {
this.addvisiable = true;
this.editData = row;
},
// 关联角色
associatedRoles() { },
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList(this.queryParams);
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 查询列表数据
getList(parms) {
this.loading = true;
parms.nodeId = parseInt(parms.nodeName)
queryCaseFlowInfo(parms).then((response) => {
this.dataList = response.rows;
this.total = response.total;
this.loading = false;
});
},
},
};
</script>
<style lang="scss" scoped></style>
@@ -1,184 +0,0 @@
<template>
<div>
<el-dialog title="新增流程节点" :visible="addvisiable" v-if="addvisiable" @close="cancel" width="600px" center>
<el-form :model="ruleForm" label-position="left" :rules="rules" ref="ruleForm" label-width="90px"
class="demo-ruleForm">
<el-form-item label="节点名称" prop="nodeName">
<el-select v-model="ruleForm.nodeName" placeholder="请选择" @change="changenodeName">
<el-option v-for="dict in dict.type.case_flow_node" :key="dict.value" :label="dict.label"
:value="dict.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="案件状态" prop="caseStatusName">
<el-input v-model="ruleForm.caseStatusName" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="驳回节点" prop="backFlowName">
<el-select v-model="ruleForm.backFlowId" placeholder="请选择" clearable>
<el-option v-for="item in backflowArr" :key="item.backFlowId" :value="item.backFlowId"
:label="item.backFlowName">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="关联角色" prop="roleIds">
<el-select v-model="ruleForm.roleIds" multiple placeholder="请选择">
<el-option v-for="item in roleArr" :key="item.roleId" :label="item.roleName" :value="item.roleId">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="权限字符" prop="buttonAuthFlag">
<el-input v-model="ruleForm.buttonAuthFlag" placeholder="请输入"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel" class="endbutton"><span>取 消</span></el-button>
<el-button type="primary" @click="submitForm" class="endbutton"><span>确认</span></el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { queryCaseFlowInfo, saveCaseFlow } from "@/api/caseprocessManagement/caseprocessManagement.js";
import { listRole } from "@/api/system/role";
export default {
props: ["addvisiable", "editData", "queryParams"],
dicts: ["case_flow_node"],
data() {
return {
fileList: [],
data: [],
backflowArr: [],//驳回节点
roleArr: [],//关联角色
isImg: false,
filedata: {},
flagBtn: false,
ruleForm: {},
rules: {
nodeName: [
{ required: true, message: '请选择模版名称', trigger: 'blur' },
],
caseStatusName: [
{ required: true, message: '请输入案件状态', trigger: 'blur' },
],
roleIds: [
{ required: true, message: '请选择关联角色', trigger: 'blur' },
],
buttonAuthFlag: [
{ required: true, message: '请输入权限字符', trigger: 'blur' },
]
},
dealvalue: [],
};
},
watch: {
addvisiable(val) {
if (val) {
this.ruleForm = this.editData;
this.getRoles();
this.getbackflowArr()
}
}
},
created() {
},
methods: {
changenodeName(val) {
console.log(val, 'changeval');
},
// 获取驳回节点数据
getbackflowArr() {
let queryParams2 = {
pageNum: 1,
pageSize: 999,
};
queryCaseFlowInfo(queryParams2).then((res) => {
this.backflowArr = [];
res.rows.forEach(item => {
this.backflowArr.push({
backFlowName: item.nodeName,
backFlowId: item.id
})
});
if (this.editData.id) {
let arr = this.backflowArr;
let result = arr.filter(obj => obj.backFlowId !== this.editData.id);
this.backflowArr = result
}
})
},
// 获取关联角色
getRoles() {
let queryParams1 = {
pageNum: 1,
pageSize: 100000000000000000,
};
listRole(queryParams1).then((res) => {
this.roleArr = res.rows
})
},
cancel() {
this.$emit("cancelAdd");
},
// 提交
submitForm() {
this.$refs['ruleForm'].validate((valid) => {
if (valid) {
let params = {};
if (this.ruleForm.id) {
let nodevalue = this.dict.type.case_flow_node;
this.dealvalue = nodevalue.filter((item) => {
if (item.value == this.ruleForm.nodeId) {
return item
}
}
);
// 编辑
params = {
id: this.ruleForm.id,
nodeId: this.dealvalue[0].value,
nodeName: this.dealvalue[0].label,
caseStatusName: this.ruleForm.caseStatusName,
backFlowId: this.ruleForm.backFlowId,
roleIds: this.ruleForm.roleIds,
sort: this.ruleForm.sort,
buttonAuthFlag: this.ruleForm.buttonAuthFlag
}
} else {
let nodevalue = this.dict.type.case_flow_node;
this.dealvalue = nodevalue.filter((item) => {
if (item.value == this.ruleForm.nodeName) {
return item
}
}
);
// 新增
params = {
nodeId: this.dealvalue[0].value,
nodeName: this.dealvalue[0].label,
caseStatusName: this.ruleForm.caseStatusName,
backFlowId: this.ruleForm.backFlowId,
roleIds: this.ruleForm.roleIds,
buttonAuthFlag: this.ruleForm.buttonAuthFlag
}
}
if (params.backFlowId == undefined) {
delete params.backFlowId
}
saveCaseFlow(params).then((res) => {
this.$modal.msgSuccess("成功!");
this.$emit("getList", this.queryParams)
this.$emit("cancelAdd");
})
}
});
},
},
};
</script>
<style lang="scss" scoped>
::v-deep .el-select {
width: 100%;
}
</style>
@@ -1,3 +0,0 @@
const elementIcons = ['platform-eleme', 'eleme', 'delete-solid', 'delete', 's-tools', 'setting', 'user-solid', 'user', 'phone', 'phone-outline', 'more', 'more-outline', 'star-on', 'star-off', 's-goods', 'goods', 'warning', 'warning-outline', 'question', 'info', 'remove', 'circle-plus', 'success', 'error', 'zoom-in', 'zoom-out', 'remove-outline', 'circle-plus-outline', 'circle-check', 'circle-close', 's-help', 'help', 'minus', 'plus', 'check', 'close', 'picture', 'picture-outline', 'picture-outline-round', 'upload', 'upload2', 'download', 'camera-solid', 'camera', 'video-camera-solid', 'video-camera', 'message-solid', 'bell', 's-cooperation', 's-order', 's-platform', 's-fold', 's-unfold', 's-operation', 's-promotion', 's-home', 's-release', 's-ticket', 's-management', 's-open', 's-shop', 's-marketing', 's-flag', 's-comment', 's-finance', 's-claim', 's-custom', 's-opportunity', 's-data', 's-check', 's-grid', 'menu', 'share', 'd-caret', 'caret-left', 'caret-right', 'caret-bottom', 'caret-top', 'bottom-left', 'bottom-right', 'back', 'right', 'bottom', 'top', 'top-left', 'top-right', 'arrow-left', 'arrow-right', 'arrow-down', 'arrow-up', 'd-arrow-left', 'd-arrow-right', 'video-pause', 'video-play', 'refresh', 'refresh-right', 'refresh-left', 'finished', 'sort', 'sort-up', 'sort-down', 'rank', 'loading', 'view', 'c-scale-to-original', 'date', 'edit', 'edit-outline', 'folder', 'folder-opened', 'folder-add', 'folder-remove', 'folder-delete', 'folder-checked', 'tickets', 'document-remove', 'document-delete', 'document-copy', 'document-checked', 'document', 'document-add', 'printer', 'paperclip', 'takeaway-box', 'search', 'monitor', 'attract', 'mobile', 'scissors', 'umbrella', 'headset', 'brush', 'mouse', 'coordinate', 'magic-stick', 'reading', 'data-line', 'data-board', 'pie-chart', 'data-analysis', 'collection-tag', 'film', 'suitcase', 'suitcase-1', 'receiving', 'collection', 'files', 'notebook-1', 'notebook-2', 'toilet-paper', 'office-building', 'school', 'table-lamp', 'house', 'no-smoking', 'smoking', 'shopping-cart-full', 'shopping-cart-1', 'shopping-cart-2', 'shopping-bag-1', 'shopping-bag-2', 'sold-out', 'sell', 'present', 'box', 'bank-card', 'money', 'coin', 'wallet', 'discount', 'price-tag', 'news', 'guide', 'male', 'female', 'thumb', 'cpu', 'link', 'connection', 'open', 'turn-off', 'set-up', 'chat-round', 'chat-line-round', 'chat-square', 'chat-dot-round', 'chat-dot-square', 'chat-line-square', 'message', 'postcard', 'position', 'turn-off-microphone', 'microphone', 'close-notification', 'bangzhu', 'time', 'odometer', 'crop', 'aim', 'switch-button', 'full-screen', 'copy-document', 'mic', 'stopwatch', 'medal-1', 'medal', 'trophy', 'trophy-1', 'first-aid-kit', 'discover', 'place', 'location', 'location-outline', 'location-information', 'add-location', 'delete-location', 'map-location', 'alarm-clock', 'timer', 'watch-1', 'watch', 'lock', 'unlock', 'key', 'service', 'mobile-phone', 'bicycle', 'truck', 'ship', 'basketball', 'football', 'soccer', 'baseball', 'wind-power', 'light-rain', 'lightning', 'heavy-rain', 'sunrise', 'sunrise-1', 'sunset', 'sunny', 'cloudy', 'partly-cloudy', 'cloudy-and-sunny', 'moon', 'moon-night', 'dish', 'dish-1', 'food', 'chicken', 'fork-spoon', 'knife-fork', 'burger', 'tableware', 'sugar', 'dessert', 'ice-cream', 'hot-water', 'water-cup', 'coffee-cup', 'cold-drink', 'goblet', 'goblet-full', 'goblet-square', 'goblet-square-full', 'refrigerator', 'grape', 'watermelon', 'cherry', 'apple', 'pear', 'orange', 'coffee', 'ice-tea', 'ice-drink', 'milk-tea', 'potato-strips', 'lollipop', 'ice-cream-square', 'ice-cream-round']
export default elementIcons
-87
View File
@@ -1,87 +0,0 @@
<template>
<div class="icons-container">
<aside>
<a href="#" target="_blank">Add and use
</a>
</aside>
<el-tabs type="border-card">
<el-tab-pane label="Icons">
<div v-for="item of svgIcons" :key="item">
<el-tooltip placement="top">
<div slot="content">
{{ generateIconCode(item) }}
</div>
<div class="icon-item">
<svg-icon :icon-class="item" class-name="disabled" />
<span>{{ item }}</span>
</div>
</el-tooltip>
</div>
</el-tab-pane>
<el-tab-pane label="Element-UI Icons">
<div v-for="item of elementIcons" :key="item">
<el-tooltip placement="top">
<div slot="content">
{{ generateElementIconCode(item) }}
</div>
<div class="icon-item">
<i :class="'el-icon-' + item" />
<span>{{ item }}</span>
</div>
</el-tooltip>
</div>
</el-tab-pane>
</el-tabs>
</div>
</template>
<script>
import svgIcons from './svg-icons'
import elementIcons from './element-icons'
export default {
name: 'Icons',
data() {
return {
svgIcons,
elementIcons
}
},
methods: {
generateIconCode(symbol) {
return `<svg-icon icon-class="${symbol}" />`
},
generateElementIconCode(symbol) {
return `<i class="el-icon-${symbol}" />`
}
}
}
</script>
<style lang="scss" scoped>
.icons-container {
margin: 10px 20px 0;
overflow: hidden;
.icon-item {
margin: 20px;
height: 85px;
text-align: center;
width: 100px;
float: left;
font-size: 30px;
color: #24292e;
cursor: pointer;
}
span {
display: block;
font-size: 16px;
margin-top: 10px;
}
.disabled {
pointer-events: none;
}
}
</style>
-10
View File
@@ -1,10 +0,0 @@
const req = require.context('../../../assets/icons/svg', false, /\.svg$/)
const requireAll = requireContext => requireContext.keys()
const re = /\.\/(.*)\.svg/
const svgIcons = requireAll(req).map(i => {
return i.match(re)[1]
})
export default svgIcons
-102
View File
@@ -1,102 +0,0 @@
<template>
<div :class="className" :style="{height:height,width:width}" />
</template>
<script>
import * as echarts from 'echarts';
require('echarts/theme/macarons') // echarts theme
import resize from './mixins/resize'
const animationDuration = 6000
export default {
mixins: [resize],
props: {
className: {
type: String,
default: 'chart'
},
width: {
type: String,
default: '100%'
},
height: {
type: String,
default: '300px'
}
},
data() {
return {
chart: null
}
},
mounted() {
this.$nextTick(() => {
this.initChart()
})
},
beforeDestroy() {
if (!this.chart) {
return
}
this.chart.dispose()
this.chart = null
},
methods: {
initChart() {
this.chart = echarts.init(this.$el, 'macarons')
this.chart.setOption({
tooltip: {
trigger: 'axis',
axisPointer: { // 坐标轴指示器,坐标轴触发有效
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
}
},
grid: {
top: 10,
left: '2%',
right: '2%',
bottom: '3%',
containLabel: true
},
xAxis: [{
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
axisTick: {
alignWithLabel: true
}
}],
yAxis: [{
type: 'value',
axisTick: {
show: false
}
}],
series: [{
name: 'pageA',
type: 'bar',
stack: 'vistors',
barWidth: '60%',
data: [79, 52, 200, 334, 390, 330, 220],
animationDuration
}, {
name: 'pageB',
type: 'bar',
stack: 'vistors',
barWidth: '60%',
data: [80, 52, 200, 334, 390, 330, 220],
animationDuration
}, {
name: 'pageC',
type: 'bar',
stack: 'vistors',
barWidth: '60%',
data: [30, 52, 200, 334, 390, 330, 220],
animationDuration
}]
})
}
}
}
</script>
-135
View File
@@ -1,135 +0,0 @@
<template>
<div :class="className" :style="{height:height,width:width}" />
</template>
<script>
import * as echarts from 'echarts';
require('echarts/theme/macarons') // echarts theme
import resize from './mixins/resize'
export default {
mixins: [resize],
props: {
className: {
type: String,
default: 'chart'
},
width: {
type: String,
default: '100%'
},
height: {
type: String,
default: '350px'
},
autoResize: {
type: Boolean,
default: true
},
chartData: {
type: Object,
required: true
}
},
data() {
return {
chart: null
}
},
watch: {
chartData: {
deep: true,
handler(val) {
this.setOptions(val)
}
}
},
mounted() {
this.$nextTick(() => {
this.initChart()
})
},
beforeDestroy() {
if (!this.chart) {
return
}
this.chart.dispose()
this.chart = null
},
methods: {
initChart() {
this.chart = echarts.init(this.$el, 'macarons')
this.setOptions(this.chartData)
},
setOptions({ expectedData, actualData } = {}) {
this.chart.setOption({
xAxis: {
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
boundaryGap: false,
axisTick: {
show: false
}
},
grid: {
left: 10,
right: 10,
bottom: 20,
top: 30,
containLabel: true
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross'
},
padding: [5, 10]
},
yAxis: {
axisTick: {
show: false
}
},
legend: {
data: ['expected', 'actual']
},
series: [{
name: 'expected', itemStyle: {
normal: {
color: '#FF005A',
lineStyle: {
color: '#FF005A',
width: 2
}
}
},
smooth: true,
type: 'line',
data: expectedData,
animationDuration: 2800,
animationEasing: 'cubicInOut'
},
{
name: 'actual',
smooth: true,
type: 'line',
itemStyle: {
normal: {
color: '#3888fa',
lineStyle: {
color: '#3888fa',
width: 2
},
areaStyle: {
color: '#f3f8ff'
}
}
},
data: actualData,
animationDuration: 2800,
animationEasing: 'quadraticOut'
}]
})
}
}
}
</script>
-181
View File
@@ -1,181 +0,0 @@
<template>
<el-row :gutter="40" class="panel-group">
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
<div class="card-panel" @click="handleSetLineChartData('newVisitis')">
<div class="card-panel-icon-wrapper icon-people">
<svg-icon icon-class="peoples" class-name="card-panel-icon" />
</div>
<div class="card-panel-description">
<div class="card-panel-text">
访客
</div>
<count-to :start-val="0" :end-val="102400" :duration="2600" class="card-panel-num" />
</div>
</div>
</el-col>
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
<div class="card-panel" @click="handleSetLineChartData('messages')">
<div class="card-panel-icon-wrapper icon-message">
<svg-icon icon-class="message" class-name="card-panel-icon" />
</div>
<div class="card-panel-description">
<div class="card-panel-text">
消息
</div>
<count-to :start-val="0" :end-val="81212" :duration="3000" class="card-panel-num" />
</div>
</div>
</el-col>
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
<div class="card-panel" @click="handleSetLineChartData('purchases')">
<div class="card-panel-icon-wrapper icon-money">
<svg-icon icon-class="money" class-name="card-panel-icon" />
</div>
<div class="card-panel-description">
<div class="card-panel-text">
金额
</div>
<count-to :start-val="0" :end-val="9280" :duration="3200" class="card-panel-num" />
</div>
</div>
</el-col>
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
<div class="card-panel" @click="handleSetLineChartData('shoppings')">
<div class="card-panel-icon-wrapper icon-shopping">
<svg-icon icon-class="shopping" class-name="card-panel-icon" />
</div>
<div class="card-panel-description">
<div class="card-panel-text">
订单
</div>
<count-to :start-val="0" :end-val="13600" :duration="3600" class="card-panel-num" />
</div>
</div>
</el-col>
</el-row>
</template>
<script>
import CountTo from 'vue-count-to'
export default {
components: {
CountTo
},
methods: {
handleSetLineChartData(type) {
this.$emit('handleSetLineChartData', type)
}
}
}
</script>
<style lang="scss" scoped>
.panel-group {
margin-top: 18px;
.card-panel-col {
margin-bottom: 32px;
}
.card-panel {
height: 108px;
cursor: pointer;
font-size: 12px;
position: relative;
overflow: hidden;
color: #666;
background: #fff;
box-shadow: 4px 4px 40px rgba(0, 0, 0, .05);
border-color: rgba(0, 0, 0, .05);
&:hover {
.card-panel-icon-wrapper {
color: #fff;
}
.icon-people {
background: #40c9c6;
}
.icon-message {
background: #36a3f7;
}
.icon-money {
background: #f4516c;
}
.icon-shopping {
background: #34bfa3
}
}
.icon-people {
color: #40c9c6;
}
.icon-message {
color: #36a3f7;
}
.icon-money {
color: #f4516c;
}
.icon-shopping {
color: #34bfa3
}
.card-panel-icon-wrapper {
float: left;
margin: 14px 0 0 14px;
padding: 16px;
transition: all 0.38s ease-out;
border-radius: 6px;
}
.card-panel-icon {
float: left;
font-size: 48px;
}
.card-panel-description {
float: right;
font-weight: bold;
margin: 26px;
margin-left: 0px;
.card-panel-text {
line-height: 18px;
color: rgba(0, 0, 0, 0.45);
font-size: 16px;
margin-bottom: 12px;
}
.card-panel-num {
font-size: 20px;
}
}
}
}
@media (max-width:550px) {
.card-panel-description {
display: none;
}
.card-panel-icon-wrapper {
float: none !important;
width: 100%;
height: 100%;
margin: 0 !important;
.svg-icon {
display: block;
margin: 14px auto !important;
float: none !important;
}
}
}
</style>
-79
View File
@@ -1,79 +0,0 @@
<template>
<div :class="className" :style="{height:height,width:width}" />
</template>
<script>
import * as echarts from 'echarts';
require('echarts/theme/macarons') // echarts theme
import resize from './mixins/resize'
export default {
mixins: [resize],
props: {
className: {
type: String,
default: 'chart'
},
width: {
type: String,
default: '100%'
},
height: {
type: String,
default: '300px'
}
},
data() {
return {
chart: null
}
},
mounted() {
this.$nextTick(() => {
this.initChart()
})
},
beforeDestroy() {
if (!this.chart) {
return
}
this.chart.dispose()
this.chart = null
},
methods: {
initChart() {
this.chart = echarts.init(this.$el, 'macarons')
this.chart.setOption({
tooltip: {
trigger: 'item',
formatter: '{a} <br/>{b} : {c} ({d}%)'
},
legend: {
left: 'center',
bottom: '10',
data: ['Industries', 'Technology', 'Forex', 'Gold', 'Forecasts']
},
series: [
{
name: 'WEEKLY WRITE ARTICLES',
type: 'pie',
roseType: 'radius',
radius: [15, 95],
center: ['50%', '38%'],
data: [
{ value: 320, name: 'Industries' },
{ value: 240, name: 'Technology' },
{ value: 149, name: 'Forex' },
{ value: 100, name: 'Gold' },
{ value: 59, name: 'Forecasts' }
],
animationEasing: 'cubicInOut',
animationDuration: 2600
}
]
})
}
}
}
</script>
-116
View File
@@ -1,116 +0,0 @@
<template>
<div :class="className" :style="{height:height,width:width}" />
</template>
<script>
import * as echarts from 'echarts';
require('echarts/theme/macarons') // echarts theme
import resize from './mixins/resize'
const animationDuration = 3000
export default {
mixins: [resize],
props: {
className: {
type: String,
default: 'chart'
},
width: {
type: String,
default: '100%'
},
height: {
type: String,
default: '300px'
}
},
data() {
return {
chart: null
}
},
mounted() {
this.$nextTick(() => {
this.initChart()
})
},
beforeDestroy() {
if (!this.chart) {
return
}
this.chart.dispose()
this.chart = null
},
methods: {
initChart() {
this.chart = echarts.init(this.$el, 'macarons')
this.chart.setOption({
tooltip: {
trigger: 'axis',
axisPointer: { // 坐标轴指示器,坐标轴触发有效
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
}
},
radar: {
radius: '66%',
center: ['50%', '42%'],
splitNumber: 8,
splitArea: {
areaStyle: {
color: 'rgba(127,95,132,.3)',
opacity: 1,
shadowBlur: 45,
shadowColor: 'rgba(0,0,0,.5)',
shadowOffsetX: 0,
shadowOffsetY: 15
}
},
indicator: [
{ name: 'Sales', max: 10000 },
{ name: 'Administration', max: 20000 },
{ name: 'Information Techology', max: 20000 },
{ name: 'Customer Support', max: 20000 },
{ name: 'Development', max: 20000 },
{ name: 'Marketing', max: 20000 }
]
},
legend: {
left: 'center',
bottom: '10',
data: ['Allocated Budget', 'Expected Spending', 'Actual Spending']
},
series: [{
type: 'radar',
symbolSize: 0,
areaStyle: {
normal: {
shadowBlur: 13,
shadowColor: 'rgba(0,0,0,.2)',
shadowOffsetX: 0,
shadowOffsetY: 10,
opacity: 1
}
},
data: [
{
value: [5000, 7000, 12000, 11000, 15000, 14000],
name: 'Allocated Budget'
},
{
value: [4000, 9000, 15000, 15000, 13000, 11000],
name: 'Expected Spending'
},
{
value: [5500, 11000, 12000, 15000, 12000, 12000],
name: 'Actual Spending'
}
],
animationDuration: animationDuration
}]
})
}
}
}
</script>
-56
View File
@@ -1,56 +0,0 @@
import { debounce } from '@/utils'
export default {
data() {
return {
$_sidebarElm: null,
$_resizeHandler: null
}
},
mounted() {
this.initListener()
},
activated() {
if (!this.$_resizeHandler) {
// avoid duplication init
this.initListener()
}
// when keep-alive chart activated, auto resize
this.resize()
},
beforeDestroy() {
this.destroyListener()
},
deactivated() {
this.destroyListener()
},
methods: {
// use $_ for mixins properties
// https://vuejs.org/v2/style-guide/index.html#Private-property-names-essential
$_sidebarResizeHandler(e) {
if (e.propertyName === 'width') {
this.$_resizeHandler()
}
},
initListener() {
this.$_resizeHandler = debounce(() => {
this.resize()
}, 100)
window.addEventListener('resize', this.$_resizeHandler)
this.$_sidebarElm = document.getElementsByClassName('sidebar-container')[0]
this.$_sidebarElm && this.$_sidebarElm.addEventListener('transitionend', this.$_sidebarResizeHandler)
},
destroyListener() {
window.removeEventListener('resize', this.$_resizeHandler)
this.$_resizeHandler = null
this.$_sidebarElm && this.$_sidebarElm.removeEventListener('transitionend', this.$_sidebarResizeHandler)
},
resize() {
const { chart } = this
chart && chart.resize()
}
}
}
-104
View File
@@ -1,104 +0,0 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px">
<el-form-item label="案件编号" prop="caseNum">
<el-input v-model="queryParams.caseNum" placeholder="请输入案件编号" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="dataList" style="width: 100%">
<el-table-column label="序号" type="index" align="center">
<template slot-scope="scope">
<span>{{
(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1
}}</span>
</template>
</el-table-column>
<el-table-column label="案件编号" align="center" prop="caseNum" :show-overflow-tooltip="true" />
<el-table-column label="名称" align="center" prop="mailName" :show-overflow-tooltip="true" />
<!-- <el-table-column label="证件号码" align="center" prop="caseNum" :show-overflow-tooltip="true" /> -->
<el-table-column label="邮箱地址" align="center" prop="mailAddress" />
<el-table-column label="发送时间" align="center" prop="sendTime" :show-overflow-tooltip="true" />
<el-table-column label="发送状态" align="center" prop="sendStatus" />
<!-- <el-table-column label="文书类型" align="center" prop="hearDate" :show-overflow-tooltip="true" /> -->
<!-- 缴费人 -->
<!-- <el-table-column label="案件状态" align="center" prop="caseStatusName" /> -->
<el-table-column label="内容" align="center" prop="mailContent"></el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList(queryParams)" />
</div>
</template>
<script>
import {
emailList,
} from "@/api/deliveryRecord/deliveryRecord.js";
import { getDicts } from '@/api/system/dict/data.js'
export default {
name: "paymentList",
dicts: ["case_status"],
components: {},
data() {
return {
queryParams: {
pageNum: 1,
pageSize: 10,
},
caseStatus: [],
// 遮罩层
loading: false,
// 总条数
total: 0,
// 表格数据
form: {},
// 校验表单
rules: {},
dataList: [],
};
},
created() {
getDicts("case_status").then(res => {
this.caseStatus = res.data;
this.getList(this.queryParams);
})
},
methods: {
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList(this.queryParams);
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 查询列表数据
getList(parms) {
this.loading = true;
emailList(parms).then((response) => {
this.dataList = response.rows;
this.dataList.forEach(item => {
if (item.sendStatus == 0) {
item.sendStatus = "未发送"
} else if (item.sendStatus == 1) {
item.sendStatus = "已发送"
} else {
item.sendStatus = "未发送"
}
})
this.total = response.total;
this.loading = false;
});
},
},
};
</script>
<style lang="scss" scoped></style>
-100
View File
@@ -1,100 +0,0 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px">
<el-form-item label="案件编号" prop="caseNum">
<el-input v-model="queryParams.caseNum" placeholder="请输入案件编号" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="dataList" style="width: 100%">
<el-table-column label="序号" type="index" align="center">
<template slot-scope="scope">
<span>{{
(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1
}}</span>
</template>
</el-table-column>
<el-table-column label="案件编号" align="center" prop="caseNum" :show-overflow-tooltip="true" />
<el-table-column label="手机号" align="center" prop="phone" :show-overflow-tooltip="true" />
<el-table-column label="发送时间" align="center" prop="sendTime" />
<el-table-column label="发送状态" align="center" prop="sendStatus" />
<el-table-column label="发送内容" align="center" prop="sendContent" :show-overflow-tooltip="true" />
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList({caseNum:queryParams.caseNum},{pageNum:queryParams.pageNum,pageSize:queryParams.pageSize})" />
</div>
</template>
<script>
import {
smsList,
} from "@/api/deliveryRecord/deliveryRecord.js";
import { getDicts } from '@/api/system/dict/data.js'
export default {
name: "paymentList",
dicts: ["case_status"],
components: { },
data() {
return {
queryParams: {
pageNum: 1,
pageSize: 10,
},
caseStatus: [],
// 遮罩层
loading: false,
// 总条数
total: 0,
// 表格数据
form: {},
// 校验表单
rules: {},
dataList: [],
};
},
created() {
getDicts("case_status").then(res => {
this.getList({caseNum:this.queryParams.caseNum},{pageNum:this.queryParams.pageNum,pageSize:this.queryParams.pageSize});
})
},
methods: {
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList({caseNum:this.queryParams.caseNum},{pageNum:this.queryParams.pageNum,pageSize:this.queryParams.pageSize});
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 查询列表数据
getList(data,params) {
this.loading = true;
smsList(data,params).then((response) => {
this.dataList = response.rows;
this.dataList.forEach(item=>{
if(item.sendStatus == 0){
item.sendStatus = "发送失败"
}else if(item.sendStatus == 1){
item.sendStatus = "已送达"
}else if(item.sendStatus == 2){
item.sendStatus = "已读取"
}else{
item.sendStatus = "发送失败"
}
})
this.total = response.total;
this.loading = false;
});
},
},
};
</script>
<style lang="scss" scoped></style>
-88
View File
@@ -1,88 +0,0 @@
<template>
<div class="errPage-container">
<el-button icon="arrow-left" class="pan-back-btn" @click="back">
返回
</el-button>
<el-row>
<el-col :span="12">
<h1 class="text-jumbo text-ginormous">
401错误!
</h1>
<h2>您没有访问权限!</h2>
<h6>对不起,您没有访问权限,请不要进行非法操作!您可以返回主页面</h6>
<ul class="list-unstyled">
<li class="link-type">
<router-link to="/">
回首页
</router-link>
</li>
</ul>
</el-col>
<el-col :span="12">
<img :src="errGif" width="313" height="428" alt="Girl has dropped her ice cream.">
</el-col>
</el-row>
</div>
</template>
<script>
import errGif from '@/assets/401_images/401.gif'
export default {
name: 'Page401',
data() {
return {
errGif: errGif + '?' + +new Date()
}
},
methods: {
back() {
if (this.$route.query.noGoBack) {
this.$router.push({ path: '/' })
} else {
this.$router.go(-1)
}
}
}
}
</script>
<style lang="scss" scoped>
.errPage-container {
width: 800px;
max-width: 100%;
margin: 100px auto;
.pan-back-btn {
background: #008489;
color: #fff;
border: none!important;
}
.pan-gif {
margin: 0 auto;
display: block;
}
.pan-img {
display: block;
margin: 0 auto;
width: 100%;
}
.text-jumbo {
font-size: 60px;
font-weight: 700;
color: #484848;
}
.list-unstyled {
font-size: 14px;
li {
padding-bottom: 5px;
}
a {
color: #008489;
text-decoration: none;
&:hover {
text-decoration: underline;
}
}
}
}
</style>
-233
View File
@@ -1,233 +0,0 @@
<template>
<div class="wscn-http404-container">
<div class="wscn-http404">
<div class="pic-404">
<img class="pic-404__parent" src="@/assets/404_images/404.png" alt="404">
<img class="pic-404__child left" src="@/assets/404_images/404_cloud.png" alt="404">
<img class="pic-404__child mid" src="@/assets/404_images/404_cloud.png" alt="404">
<img class="pic-404__child right" src="@/assets/404_images/404_cloud.png" alt="404">
</div>
<div class="bullshit">
<div class="bullshit__oops">
404错误!
</div>
<div class="bullshit__headline">
{{ message }}
</div>
<div class="bullshit__info">
对不起,您正在寻找的页面不存在。尝试检查URL的错误,然后按浏览器上的刷新按钮或尝试在我们的应用程序中找到其他内容。
</div>
<router-link to="/" class="bullshit__return-home">
返回首页
</router-link>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'Page404',
computed: {
message() {
return '找不到网页!'
}
}
}
</script>
<style lang="scss" scoped>
.wscn-http404-container{
transform: translate(-50%,-50%);
position: absolute;
top: 40%;
left: 50%;
}
.wscn-http404 {
position: relative;
width: 1200px;
padding: 0 50px;
overflow: hidden;
.pic-404 {
position: relative;
float: left;
width: 600px;
overflow: hidden;
&__parent {
width: 100%;
}
&__child {
position: absolute;
&.left {
width: 80px;
top: 17px;
left: 220px;
opacity: 0;
animation-name: cloudLeft;
animation-duration: 2s;
animation-timing-function: linear;
animation-fill-mode: forwards;
animation-delay: 1s;
}
&.mid {
width: 46px;
top: 10px;
left: 420px;
opacity: 0;
animation-name: cloudMid;
animation-duration: 2s;
animation-timing-function: linear;
animation-fill-mode: forwards;
animation-delay: 1.2s;
}
&.right {
width: 62px;
top: 100px;
left: 500px;
opacity: 0;
animation-name: cloudRight;
animation-duration: 2s;
animation-timing-function: linear;
animation-fill-mode: forwards;
animation-delay: 1s;
}
@keyframes cloudLeft {
0% {
top: 17px;
left: 220px;
opacity: 0;
}
20% {
top: 33px;
left: 188px;
opacity: 1;
}
80% {
top: 81px;
left: 92px;
opacity: 1;
}
100% {
top: 97px;
left: 60px;
opacity: 0;
}
}
@keyframes cloudMid {
0% {
top: 10px;
left: 420px;
opacity: 0;
}
20% {
top: 40px;
left: 360px;
opacity: 1;
}
70% {
top: 130px;
left: 180px;
opacity: 1;
}
100% {
top: 160px;
left: 120px;
opacity: 0;
}
}
@keyframes cloudRight {
0% {
top: 100px;
left: 500px;
opacity: 0;
}
20% {
top: 120px;
left: 460px;
opacity: 1;
}
80% {
top: 180px;
left: 340px;
opacity: 1;
}
100% {
top: 200px;
left: 300px;
opacity: 0;
}
}
}
}
.bullshit {
position: relative;
float: left;
width: 300px;
padding: 30px 0;
overflow: hidden;
&__oops {
font-size: 32px;
font-weight: bold;
line-height: 40px;
color: #1482f0;
opacity: 0;
margin-bottom: 20px;
animation-name: slideUp;
animation-duration: 0.5s;
animation-fill-mode: forwards;
}
&__headline {
font-size: 20px;
line-height: 24px;
color: #222;
font-weight: bold;
opacity: 0;
margin-bottom: 10px;
animation-name: slideUp;
animation-duration: 0.5s;
animation-delay: 0.1s;
animation-fill-mode: forwards;
}
&__info {
font-size: 13px;
line-height: 21px;
color: grey;
opacity: 0;
margin-bottom: 30px;
animation-name: slideUp;
animation-duration: 0.5s;
animation-delay: 0.2s;
animation-fill-mode: forwards;
}
&__return-home {
display: block;
float: left;
width: 110px;
height: 36px;
background: #1482f0;
border-radius: 100px;
text-align: center;
color: #ffffff;
opacity: 0;
font-size: 14px;
line-height: 36px;
cursor: pointer;
animation-name: slideUp;
animation-duration: 0.5s;
animation-delay: 0.3s;
animation-fill-mode: forwards;
}
@keyframes slideUp {
0% {
transform: translateY(60px);
opacity: 0;
}
100% {
transform: translateY(0);
opacity: 1;
}
}
}
}
</style>
-129
View File
@@ -1,129 +0,0 @@
<template>
<div class="app-container home">
<div class="header">
<div class="iconTitle"></div>
<div class="headerMain">我的待办</div>
</div>
<div class="homeMain">
<div class="cardList" v-for="(item, index) in pendingTasks" :key="index" @click="pushPage(item.caseFlowId)">
<div class="badge">{{item.caseCount}}</div>
<div class="cardMain">
<img class="iconImg" src="@/assets/images/daiban.png" alt="" />
</div>
<div class="cardMain">
<div class="imgTitle">{{ item.caseStatusName }}</div>
</div>
</div>
</div>
</div>
</template>
<script>
import { todoCount } from "@/api/system/homepage.js";
export default {
name: "Index",
data() {
return {
// 版本号
version: "3.8.6",
pendingTasks: [], //案件代办状态
};
},
created() {
this.gettodoCount();
},
methods: {
goTarget(href) {
window.open(href, "_blank");
},
// 查询代办状态
gettodoCount() {
todoCount({}).then((res) => {
this.pendingTasks = res.data.toDoCountList
console.log(res.data.toDoCountList, "this.pendingTasks");
});
},
// 点击待办按钮跳转
pushPage(status) {
this.$router.push({ path: '/caseManagement/caseManagement/caseList', query: { caseFlowId: status + '' } })
}
},
};
</script>
<style scoped lang="scss">
.home {
font-family: "open sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 13px;
color: #676a6c;
overflow-x: hidden;
background-color: #f1f1f1;
height: 100vh;
.header {
width: 100%;
height: 80px;
display: flex;
align-items: center;
.iconTitle {
width: 5px;
height: 25px;
background-color: #0f5c9b;
margin-right: 25px;
}
.headerMain {
font-size: 20px;
}
}
.homeMain {
width: 100%;
display: flex;
flex-wrap: wrap;
.cardList {
width: 13%;
height: 200px;
border-radius: 30px;
background-color: #ffffff;
position: relative;
margin-right: 38px;
margin-bottom: 30px;
.badge {
width: 50px;
height: 30px;
text-align: center;
line-height: 30px;
font-size: 18px;
font-weight: 500;
color: #e32a4f;
border-radius: 10px 30px 10px 30px;
background-color: #05baf1;
position: absolute;
right: 0;
}
.cardMain {
width: 100%;
display: flex;
justify-content: center;
margin-top: 20px;
.iconImg {
width: 100px;
height: 110px;
}
.imgTitle {
font-size: 15px;
font-weight: 900;
}
}
}
}
}
</style>
-98
View File
@@ -1,98 +0,0 @@
<template>
<div class="dashboard-editor-container">
<panel-group @handleSetLineChartData="handleSetLineChartData" />
<el-row style="background:#fff;padding:16px 16px 0;margin-bottom:32px;">
<line-chart :chart-data="lineChartData" />
</el-row>
<el-row :gutter="32">
<el-col :xs="24" :sm="24" :lg="8">
<div class="chart-wrapper">
<raddar-chart />
</div>
</el-col>
<el-col :xs="24" :sm="24" :lg="8">
<div class="chart-wrapper">
<pie-chart />
</div>
</el-col>
<el-col :xs="24" :sm="24" :lg="8">
<div class="chart-wrapper">
<bar-chart />
</div>
</el-col>
</el-row>
</div>
</template>
<script>
import PanelGroup from './dashboard/PanelGroup'
import LineChart from './dashboard/LineChart'
import RaddarChart from './dashboard/RaddarChart'
import PieChart from './dashboard/PieChart'
import BarChart from './dashboard/BarChart'
const lineChartData = {
newVisitis: {
expectedData: [100, 120, 161, 134, 105, 160, 165],
actualData: [120, 82, 91, 154, 162, 140, 145]
},
messages: {
expectedData: [200, 192, 120, 144, 160, 130, 140],
actualData: [180, 160, 151, 106, 145, 150, 130]
},
purchases: {
expectedData: [80, 100, 121, 104, 105, 90, 100],
actualData: [120, 90, 100, 138, 142, 130, 130]
},
shoppings: {
expectedData: [130, 140, 141, 142, 145, 150, 160],
actualData: [120, 82, 91, 154, 162, 140, 130]
}
}
export default {
name: 'Index',
components: {
PanelGroup,
LineChart,
RaddarChart,
PieChart,
BarChart
},
data() {
return {
lineChartData: lineChartData.newVisitis
}
},
methods: {
handleSetLineChartData(type) {
this.lineChartData = lineChartData[type]
}
}
}
</script>
<style lang="scss" scoped>
.dashboard-editor-container {
padding: 32px;
background-color: rgb(240, 242, 245);
position: relative;
.chart-wrapper {
background: #fff;
padding: 16px 16px 0;
margin-bottom: 32px;
}
}
@media (max-width:1024px) {
.chart-wrapper {
padding: 8px;
}
}
</style>
-268
View File
@@ -1,268 +0,0 @@
<template>
<div class="login">
<!-- 左侧 -->
<div class="leftBox">
<div class="leftIcon">
<div class="Icon"></div>
<div>智慧调解系统</div>
</div>
<div class="leftImage"></div>
</div>
<!-- 右侧 -->
<div class="rightBox">
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
<h2 class="title">用户登录</h2>
<el-form-item prop="username">
<el-input
v-model="loginForm.username"
type="text"
auto-complete="off"
placeholder="账号"
>
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
</el-input>
</el-form-item>
<el-form-item prop="password">
<el-input
v-model="loginForm.password"
type="password"
auto-complete="off"
placeholder="密码"
@keyup.enter.native="handleLogin"
>
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
</el-input>
</el-form-item>
<el-form-item prop="code" v-if="captchaEnabled">
<el-input
v-model="loginForm.code"
auto-complete="off"
placeholder="验证码"
style="width: 63%"
@keyup.enter.native="handleLogin"
>
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
</el-input>
<div class="login-code">
<img :src="codeUrl" @click="getCode" class="login-code-img"/>
</div>
</el-form-item>
<el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox>
<el-form-item style="width:100%;">
<el-button
:loading="loading"
size="medium"
type="primary"
style="width:100%;"
@click.native.prevent="handleLogin"
>
<span v-if="!loading">登 录</span>
<span v-else>登 录 中...</span>
</el-button>
<div style="float: right;" v-if="register">
<router-link class="link-type" :to="'/register'">立即注册</router-link>
</div>
</el-form-item>
</el-form>
</div>
<!-- 底部 -->
<div class="el-login-footer">
<div>Copyright © 2023 乙巢(上海)企业管理服务有限公司.</div>
<div>Version:1.0.1</div>
</div>
</div>
</template>
<script>
import { getCodeImg } from "@/api/login";
import Cookies from "js-cookie";
import { encrypt, decrypt } from '@/utils/jsencrypt'
export default {
name: "Login",
data() {
return {
codeUrl: "",
loginForm: {
username: "admin",
password: "admin123",
rememberMe: false,
code: "",
uuid: ""
},
loginRules: {
username: [
{ required: true, trigger: "blur", message: "请输入您的账号" }
],
password: [
{ required: true, trigger: "blur", message: "请输入您的密码" }
],
code: [{ required: true, trigger: "change", message: "请输入验证码" }]
},
loading: false,
// 验证码开关
captchaEnabled: true,
// 注册开关
register: true,
redirect: undefined
};
},
watch: {
$route: {
handler: function(route) {
this.redirect = route.query && route.query.redirect;
},
immediate: true
}
},
created() {
this.getCode();
this.getCookie();
},
methods: {
getCode() {
getCodeImg().then(res => {
this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled;
if (this.captchaEnabled) {
this.codeUrl = "data:image/gif;base64," + res.img;
this.loginForm.uuid = res.uuid;
}
});
},
getCookie() {
const username = Cookies.get("username");
const password = Cookies.get("password");
const rememberMe = Cookies.get('rememberMe')
this.loginForm = {
username: username === undefined ? this.loginForm.username : username,
password: password === undefined ? this.loginForm.password : decrypt(password),
rememberMe: rememberMe === undefined ? false : Boolean(rememberMe)
};
},
handleLogin() {
this.$refs.loginForm.validate(valid => {
if (valid) {
this.loading = true;
if (this.loginForm.rememberMe) {
Cookies.set("username", this.loginForm.username, { expires: 30 });
Cookies.set("password", encrypt(this.loginForm.password), { expires: 30 });
Cookies.set('rememberMe', this.loginForm.rememberMe, { expires: 30 });
} else {
Cookies.remove("username");
Cookies.remove("password");
Cookies.remove('rememberMe');
}
this.$store.dispatch("Login", this.loginForm).then(() => {
this.$router.push({ path: this.redirect || "/" }).catch(()=>{});
}).catch(() => {
this.loading = false;
if (this.captchaEnabled) {
this.getCode();
}
});
}
});
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss">
.login {
display: flex;
justify-content: center;
align-items: center;
height: 100%;
.leftBox {
width: 50%;
height: 90%;
.leftIcon {
height: 20%;
width: 100%;
margin: 0% 10% 1% 15%;
.Icon {
width: 100px;
height: 105px;
background-image: url("../assets/images/logos.png");
background-size: cover;
}
div {
font-size: 18px;
}
}
.leftImage {
width: 100%;
height: 90%;
margin-left: 10%;
margin-top: -15%;
background-image: url("../assets/images/login.svg");
background-size: cover;
}
}
.rightBox {
width: 50%;
height: 90%;
display: flex;
justify-content: center;
align-items: center;
}
}
.title {
margin: 0px auto 30px auto;
text-align: center;
color: #1296db;
font-weight: 600;
}
.login-form {
border-radius: 6px;
background: #ffffff;
width: 400px;
padding: 25px 25px 5px 25px;
.el-input {
height: 38px;
input {
height: 38px;
}
}
.input-icon {
height: 39px;
width: 14px;
margin-left: 2px;
}
}
.login-tip {
font-size: 13px;
text-align: center;
color: #bfbfbf;
}
.login-code {
width: 33%;
height: 38px;
float: right;
img {
cursor: pointer;
vertical-align: middle;
}
}
.el-login-footer {
background-color: rgb(126, 131, 135);
height: 55px;
line-height: 55px;
position: fixed;
bottom: 0;
width: 100%;
text-align: center;
color: #fff;
font-family: Arial;
font-size: 12px;
letter-spacing: 1px;
div {
height: 30%;
}
}
.login-code-img {
height: 38px;
}
</style>
-144
View File
@@ -1,144 +0,0 @@
<template>
<div class="app-container">
<el-row>
<el-col :span="24" class="card-box">
<el-card>
<div slot="header"><span><i class="el-icon-monitor"></i> 基本信息</span></div>
<div class="el-table el-table--enable-row-hover el-table--medium">
<table cellspacing="0" style="width: 100%">
<tbody>
<tr>
<td class="el-table__cell is-leaf"><div class="cell">Redis版本</div></td>
<td class="el-table__cell is-leaf"><div class="cell" v-if="cache.info">{{ cache.info.redis_version }}</div></td>
<td class="el-table__cell is-leaf"><div class="cell">运行模式</div></td>
<td class="el-table__cell is-leaf"><div class="cell" v-if="cache.info">{{ cache.info.redis_mode == "standalone" ? "单机" : "集群" }}</div></td>
<td class="el-table__cell is-leaf"><div class="cell">端口</div></td>
<td class="el-table__cell is-leaf"><div class="cell" v-if="cache.info">{{ cache.info.tcp_port }}</div></td>
<td class="el-table__cell is-leaf"><div class="cell">客户端数</div></td>
<td class="el-table__cell is-leaf"><div class="cell" v-if="cache.info">{{ cache.info.connected_clients }}</div></td>
</tr>
<tr>
<td class="el-table__cell is-leaf"><div class="cell">运行时间(天)</div></td>
<td class="el-table__cell is-leaf"><div class="cell" v-if="cache.info">{{ cache.info.uptime_in_days }}</div></td>
<td class="el-table__cell is-leaf"><div class="cell">使用内存</div></td>
<td class="el-table__cell is-leaf"><div class="cell" v-if="cache.info">{{ cache.info.used_memory_human }}</div></td>
<td class="el-table__cell is-leaf"><div class="cell">使用CPU</div></td>
<td class="el-table__cell is-leaf"><div class="cell" v-if="cache.info">{{ parseFloat(cache.info.used_cpu_user_children).toFixed(2) }}</div></td>
<td class="el-table__cell is-leaf"><div class="cell">内存配置</div></td>
<td class="el-table__cell is-leaf"><div class="cell" v-if="cache.info">{{ cache.info.maxmemory_human }}</div></td>
</tr>
<tr>
<td class="el-table__cell is-leaf"><div class="cell">AOF是否开启</div></td>
<td class="el-table__cell is-leaf"><div class="cell" v-if="cache.info">{{ cache.info.aof_enabled == "0" ? "否" : "是" }}</div></td>
<td class="el-table__cell is-leaf"><div class="cell">RDB是否成功</div></td>
<td class="el-table__cell is-leaf"><div class="cell" v-if="cache.info">{{ cache.info.rdb_last_bgsave_status }}</div></td>
<td class="el-table__cell is-leaf"><div class="cell">Key数量</div></td>
<td class="el-table__cell is-leaf"><div class="cell" v-if="cache.dbSize">{{ cache.dbSize }} </div></td>
<td class="el-table__cell is-leaf"><div class="cell">网络入口/出口</div></td>
<td class="el-table__cell is-leaf"><div class="cell" v-if="cache.info">{{ cache.info.instantaneous_input_kbps }}kps/{{cache.info.instantaneous_output_kbps}}kps</div></td>
</tr>
</tbody>
</table>
</div>
</el-card>
</el-col>
<el-col :span="12" class="card-box">
<el-card>
<div slot="header"><span><i class="el-icon-pie-chart"></i> 命令统计</span></div>
<div class="el-table el-table--enable-row-hover el-table--medium">
<div ref="commandstats" style="height: 420px" />
</div>
</el-card>
</el-col>
<el-col :span="12" class="card-box">
<el-card>
<div slot="header"><span><i class="el-icon-odometer"></i> 内存信息</span></div>
<div class="el-table el-table--enable-row-hover el-table--medium">
<div ref="usedmemory" style="height: 420px" />
</div>
</el-card>
</el-col>
</el-row>
</div>
</template>
<script>
import { getCache } from "@/api/monitor/cache";
import * as echarts from "echarts";
export default {
name: "Cache",
data() {
return {
// 统计命令信息
commandstats: null,
// 使用内存
usedmemory: null,
// cache信息
cache: []
}
},
created() {
this.getList();
this.openLoading();
},
methods: {
/** 查缓存询信息 */
getList() {
getCache().then((response) => {
this.cache = response.data;
this.$modal.closeLoading();
this.commandstats = echarts.init(this.$refs.commandstats, "macarons");
this.commandstats.setOption({
tooltip: {
trigger: "item",
formatter: "{a} <br/>{b} : {c} ({d}%)",
},
series: [
{
name: "命令",
type: "pie",
roseType: "radius",
radius: [15, 95],
center: ["50%", "38%"],
data: response.data.commandStats,
animationEasing: "cubicInOut",
animationDuration: 1000,
}
]
});
this.usedmemory = echarts.init(this.$refs.usedmemory, "macarons");
this.usedmemory.setOption({
tooltip: {
formatter: "{b} <br/>{a} : " + this.cache.info.used_memory_human,
},
series: [
{
name: "峰值",
type: "gauge",
min: 0,
max: 1000,
detail: {
formatter: this.cache.info.used_memory_human,
},
data: [
{
value: parseFloat(this.cache.info.used_memory_human),
name: "内存消耗",
}
]
}
]
});
});
},
// 打开加载层
openLoading() {
this.$modal.loading("正在加载缓存监控数据,请稍候!");
}
}
};
</script>
-241
View File
@@ -1,241 +0,0 @@
<template>
<div class="app-container">
<el-row :gutter="10">
<el-col :span="8">
<el-card style="height: calc(100vh - 125px)">
<div slot="header">
<span><i class="el-icon-collection"></i> 缓存列表</span>
<el-button
style="float: right; padding: 3px 0"
type="text"
icon="el-icon-refresh-right"
@click="refreshCacheNames()"
></el-button>
</div>
<el-table
v-loading="loading"
:data="cacheNames"
:height="tableHeight"
highlight-current-row
@row-click="getCacheKeys"
style="width: 100%"
>
<el-table-column
label="序号"
width="60"
type="index"
></el-table-column>
<el-table-column
label="缓存名称"
align="center"
prop="cacheName"
:show-overflow-tooltip="true"
:formatter="nameFormatter"
></el-table-column>
<el-table-column
label="备注"
align="center"
prop="remark"
:show-overflow-tooltip="true"
/>
<el-table-column
label="操作"
width="60"
align="center"
class-name="small-padding fixed-width"
>
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleClearCacheName(scope.row)"
></el-button>
</template>
</el-table-column>
</el-table>
</el-card>
</el-col>
<el-col :span="8">
<el-card style="height: calc(100vh - 125px)">
<div slot="header">
<span><i class="el-icon-key"></i> 键名列表</span>
<el-button
style="float: right; padding: 3px 0"
type="text"
icon="el-icon-refresh-right"
@click="refreshCacheKeys()"
></el-button>
</div>
<el-table
v-loading="subLoading"
:data="cacheKeys"
:height="tableHeight"
highlight-current-row
@row-click="handleCacheValue"
style="width: 100%"
>
<el-table-column
label="序号"
width="60"
type="index"
></el-table-column>
<el-table-column
label="缓存键名"
align="center"
:show-overflow-tooltip="true"
:formatter="keyFormatter"
>
</el-table-column>
<el-table-column
label="操作"
width="60"
align="center"
class-name="small-padding fixed-width"
>
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleClearCacheKey(scope.row)"
></el-button>
</template>
</el-table-column>
</el-table>
</el-card>
</el-col>
<el-col :span="8">
<el-card :bordered="false" style="height: calc(100vh - 125px)">
<div slot="header">
<span><i class="el-icon-document"></i> 缓存内容</span>
<el-button
style="float: right; padding: 3px 0"
type="text"
icon="el-icon-refresh-right"
@click="handleClearCacheAll()"
>清理全部</el-button
>
</div>
<el-form :model="cacheForm">
<el-row :gutter="32">
<el-col :offset="1" :span="22">
<el-form-item label="缓存名称:" prop="cacheName">
<el-input v-model="cacheForm.cacheName" :readOnly="true" />
</el-form-item>
</el-col>
<el-col :offset="1" :span="22">
<el-form-item label="缓存键名:" prop="cacheKey">
<el-input v-model="cacheForm.cacheKey" :readOnly="true" />
</el-form-item>
</el-col>
<el-col :offset="1" :span="22">
<el-form-item label="缓存内容:" prop="cacheValue">
<el-input
v-model="cacheForm.cacheValue"
type="textarea"
:rows="8"
:readOnly="true"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-card>
</el-col>
</el-row>
</div>
</template>
<script>
import { listCacheName, listCacheKey, getCacheValue, clearCacheName, clearCacheKey, clearCacheAll } from "@/api/monitor/cache";
export default {
name: "CacheList",
data() {
return {
cacheNames: [],
cacheKeys: [],
cacheForm: {},
loading: true,
subLoading: false,
nowCacheName: "",
tableHeight: window.innerHeight - 200
};
},
created() {
this.getCacheNames();
},
methods: {
/** 查询缓存名称列表 */
getCacheNames() {
this.loading = true;
listCacheName().then(response => {
this.cacheNames = response.data;
this.loading = false;
});
},
/** 刷新缓存名称列表 */
refreshCacheNames() {
this.getCacheNames();
this.$modal.msgSuccess("刷新缓存列表成功");
},
/** 清理指定名称缓存 */
handleClearCacheName(row) {
clearCacheName(row.cacheName).then(response => {
this.$modal.msgSuccess("清理缓存名称[" + row.cacheName + "]成功");
this.getCacheKeys();
});
},
/** 查询缓存键名列表 */
getCacheKeys(row) {
const cacheName = row !== undefined ? row.cacheName : this.nowCacheName;
if (cacheName === "") {
return;
}
this.subLoading = true;
listCacheKey(cacheName).then(response => {
this.cacheKeys = response.data;
this.subLoading = false;
this.nowCacheName = cacheName;
});
},
/** 刷新缓存键名列表 */
refreshCacheKeys() {
this.getCacheKeys();
this.$modal.msgSuccess("刷新键名列表成功");
},
/** 清理指定键名缓存 */
handleClearCacheKey(cacheKey) {
clearCacheKey(cacheKey).then(response => {
this.$modal.msgSuccess("清理缓存键名[" + cacheKey + "]成功");
this.getCacheKeys();
});
},
/** 列表前缀去除 */
nameFormatter(row) {
return row.cacheName.replace(":", "");
},
/** 键名前缀去除 */
keyFormatter(cacheKey) {
return cacheKey.replace(this.nowCacheName, "");
},
/** 查询缓存内容详细 */
handleCacheValue(cacheKey) {
getCacheValue(this.nowCacheName, cacheKey).then(response => {
this.cacheForm = response.data;
});
},
/** 清理全部缓存 */
handleClearCacheAll() {
clearCacheAll().then(response => {
this.$modal.msgSuccess("清理全部缓存成功");
});
}
},
};
</script>
-15
View File
@@ -1,15 +0,0 @@
<template>
<i-frame :src="url" />
</template>
<script>
import iFrame from "@/components/iFrame/index";
export default {
name: "Druid",
components: { iFrame },
data() {
return {
url: process.env.VUE_APP_BASE_API + "/druid/login.html"
};
},
};
</script>
-513
View File
@@ -1,513 +0,0 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="任务名称" prop="jobName">
<el-input
v-model="queryParams.jobName"
placeholder="请输入任务名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="任务组名" prop="jobGroup">
<el-select v-model="queryParams.jobGroup" placeholder="请选择任务组名" clearable>
<el-option
v-for="dict in dict.type.sys_job_group"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="任务状态" prop="status">
<el-select v-model="queryParams.status" placeholder="请选择任务状态" clearable>
<el-option
v-for="dict in dict.type.sys_job_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['monitor:job:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['monitor:job:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['monitor:job:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['monitor:job:export']"
>导出</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="info"
plain
icon="el-icon-s-operation"
size="mini"
@click="handleJobLog"
v-hasPermi="['monitor:job:query']"
>日志</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="jobList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="任务编号" width="100" align="center" prop="jobId" />
<el-table-column label="任务名称" align="center" prop="jobName" :show-overflow-tooltip="true" />
<el-table-column label="任务组名" align="center" prop="jobGroup">
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_job_group" :value="scope.row.jobGroup"/>
</template>
</el-table-column>
<el-table-column label="调用目标字符串" align="center" prop="invokeTarget" :show-overflow-tooltip="true" />
<el-table-column label="cron执行表达式" align="center" prop="cronExpression" :show-overflow-tooltip="true" />
<el-table-column label="状态" align="center">
<template slot-scope="scope">
<el-switch
v-model="scope.row.status"
active-value="0"
inactive-value="1"
@change="handleStatusChange(scope.row)"
></el-switch>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['monitor:job:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['monitor:job:remove']"
>删除</el-button>
<el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['monitor:job:changeStatus', 'monitor:job:query']">
<el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="handleRun" icon="el-icon-caret-right"
v-hasPermi="['monitor:job:changeStatus']">执行一次</el-dropdown-item>
<el-dropdown-item command="handleView" icon="el-icon-view"
v-hasPermi="['monitor:job:query']">任务详细</el-dropdown-item>
<el-dropdown-item command="handleJobLog" icon="el-icon-s-operation"
v-hasPermi="['monitor:job:query']">调度日志</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改定时任务对话框 -->
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row>
<el-col :span="12">
<el-form-item label="任务名称" prop="jobName">
<el-input v-model="form.jobName" placeholder="请输入任务名称" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="任务分组" prop="jobGroup">
<el-select v-model="form.jobGroup" placeholder="请选择任务分组">
<el-option
v-for="dict in dict.type.sys_job_group"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item prop="invokeTarget">
<span slot="label">
调用方法
<el-tooltip placement="top">
<div slot="content">
Bean调用示例:ryTask.ryParams('ry')
<br />Class类调用示例:com.ruoyi.quartz.task.RyTask.ryParams('ry')
<br />参数说明:支持字符串,布尔类型,长整型,浮点型,整型
</div>
<i class="el-icon-question"></i>
</el-tooltip>
</span>
<el-input v-model="form.invokeTarget" placeholder="请输入调用目标字符串" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="cron表达式" prop="cronExpression">
<el-input v-model="form.cronExpression" placeholder="请输入cron执行表达式">
<template slot="append">
<el-button type="primary" @click="handleShowCron">
生成表达式
<i class="el-icon-time el-icon--right"></i>
</el-button>
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="24" v-if="form.jobId !== undefined">
<el-form-item label="状态">
<el-radio-group v-model="form.status">
<el-radio
v-for="dict in dict.type.sys_job_status"
:key="dict.value"
:label="dict.value"
>{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="执行策略" prop="misfirePolicy">
<el-radio-group v-model="form.misfirePolicy" size="small">
<el-radio-button label="1">立即执行</el-radio-button>
<el-radio-button label="2">执行一次</el-radio-button>
<el-radio-button label="3">放弃执行</el-radio-button>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否并发" prop="concurrent">
<el-radio-group v-model="form.concurrent" size="small">
<el-radio-button label="0">允许</el-radio-button>
<el-radio-button label="1">禁止</el-radio-button>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
<el-dialog title="Cron表达式生成器" :visible.sync="openCron" append-to-body destroy-on-close class="scrollbar">
<crontab @hide="openCron=false" @fill="crontabFill" :expression="expression"></crontab>
</el-dialog>
<!-- 任务日志详细 -->
<el-dialog title="任务详细" :visible.sync="openView" width="700px" append-to-body>
<el-form ref="form" :model="form" label-width="120px" size="mini">
<el-row>
<el-col :span="12">
<el-form-item label="任务编号:">{{ form.jobId }}</el-form-item>
<el-form-item label="任务名称:">{{ form.jobName }}</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="任务分组:">{{ jobGroupFormat(form) }}</el-form-item>
<el-form-item label="创建时间:">{{ form.createTime }}</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="cron表达式:">{{ form.cronExpression }}</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="下次执行时间:">{{ parseTime(form.nextValidTime) }}</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="调用目标方法:">{{ form.invokeTarget }}</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="任务状态:">
<div v-if="form.status == 0">正常</div>
<div v-else-if="form.status == 1">暂停</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否并发:">
<div v-if="form.concurrent == 0">允许</div>
<div v-else-if="form.concurrent == 1">禁止</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="执行策略:">
<div v-if="form.misfirePolicy == 0">默认策略</div>
<div v-else-if="form.misfirePolicy == 1">立即执行</div>
<div v-else-if="form.misfirePolicy == 2">执行一次</div>
<div v-else-if="form.misfirePolicy == 3">放弃执行</div>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="openView = false">关 闭</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listJob, getJob, delJob, addJob, updateJob, runJob, changeJobStatus } from "@/api/monitor/job";
import Crontab from '@/components/Crontab'
export default {
components: { Crontab },
name: "Job",
dicts: ['sys_job_group', 'sys_job_status'],
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 定时任务表格数据
jobList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 是否显示详细弹出层
openView: false,
// 是否显示Cron表达式弹出层
openCron: false,
// 传入的表达式
expression: "",
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
jobName: undefined,
jobGroup: undefined,
status: undefined
},
// 表单参数
form: {},
// 表单校验
rules: {
jobName: [
{ required: true, message: "任务名称不能为空", trigger: "blur" }
],
invokeTarget: [
{ required: true, message: "调用目标字符串不能为空", trigger: "blur" }
],
cronExpression: [
{ required: true, message: "cron执行表达式不能为空", trigger: "blur" }
]
}
};
},
created() {
this.getList();
},
methods: {
/** 查询定时任务列表 */
getList() {
this.loading = true;
listJob(this.queryParams).then(response => {
this.jobList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 任务组名字典翻译
jobGroupFormat(row, column) {
return this.selectDictLabel(this.dict.type.sys_job_group, row.jobGroup);
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
jobId: undefined,
jobName: undefined,
jobGroup: undefined,
invokeTarget: undefined,
cronExpression: undefined,
misfirePolicy: 1,
concurrent: 1,
status: "0"
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.jobId);
this.single = selection.length != 1;
this.multiple = !selection.length;
},
// 更多操作触发
handleCommand(command, row) {
switch (command) {
case "handleRun":
this.handleRun(row);
break;
case "handleView":
this.handleView(row);
break;
case "handleJobLog":
this.handleJobLog(row);
break;
default:
break;
}
},
// 任务状态修改
handleStatusChange(row) {
let text = row.status === "0" ? "启用" : "停用";
this.$modal.confirm('确认要"' + text + '""' + row.jobName + '"任务吗?').then(function() {
return changeJobStatus(row.jobId, row.status);
}).then(() => {
this.$modal.msgSuccess(text + "成功");
}).catch(function() {
row.status = row.status === "0" ? "1" : "0";
});
},
/* 立即执行一次 */
handleRun(row) {
this.$modal.confirm('确认要立即执行一次"' + row.jobName + '"任务吗?').then(function() {
return runJob(row.jobId, row.jobGroup);
}).then(() => {
this.$modal.msgSuccess("执行成功");
}).catch(() => {});
},
/** 任务详细信息 */
handleView(row) {
getJob(row.jobId).then(response => {
this.form = response.data;
this.openView = true;
});
},
/** cron表达式按钮操作 */
handleShowCron() {
this.expression = this.form.cronExpression;
this.openCron = true;
},
/** 确定后回传值 */
crontabFill(value) {
this.form.cronExpression = value;
},
/** 任务日志列表查询 */
handleJobLog(row) {
const jobId = row.jobId || 0;
this.$router.push('/monitor/job-log/index/' + jobId)
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加任务";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const jobId = row.jobId || this.ids;
getJob(jobId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改任务";
});
},
/** 提交按钮 */
submitForm: function() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.jobId != undefined) {
updateJob(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addJob(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const jobIds = row.jobId || this.ids;
this.$modal.confirm('是否确认删除定时任务编号为"' + jobIds + '"的数据项?').then(function() {
return delJob(jobIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('monitor/job/export', {
...this.queryParams
}, `job_${new Date().getTime()}.xlsx`)
}
}
};
</script>
-295
View File
@@ -1,295 +0,0 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="任务名称" prop="jobName">
<el-input
v-model="queryParams.jobName"
placeholder="请输入任务名称"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="任务组名" prop="jobGroup">
<el-select
v-model="queryParams.jobGroup"
placeholder="请选择任务组名"
clearable
style="width: 240px"
>
<el-option
v-for="dict in dict.type.sys_job_group"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="执行状态" prop="status">
<el-select
v-model="queryParams.status"
placeholder="请选择执行状态"
clearable
style="width: 240px"
>
<el-option
v-for="dict in dict.type.sys_common_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="执行时间">
<el-date-picker
v-model="dateRange"
style="width: 240px"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['monitor:job:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
@click="handleClean"
v-hasPermi="['monitor:job:remove']"
>清空</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['monitor:job:export']"
>导出</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-close"
size="mini"
@click="handleClose"
>关闭</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="jobLogList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="日志编号" width="80" align="center" prop="jobLogId" />
<el-table-column label="任务名称" align="center" prop="jobName" :show-overflow-tooltip="true" />
<el-table-column label="任务组名" align="center" prop="jobGroup" :show-overflow-tooltip="true">
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_job_group" :value="scope.row.jobGroup"/>
</template>
</el-table-column>
<el-table-column label="调用目标字符串" align="center" prop="invokeTarget" :show-overflow-tooltip="true" />
<el-table-column label="日志信息" align="center" prop="jobMessage" :show-overflow-tooltip="true" />
<el-table-column label="执行状态" align="center" prop="status">
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_common_status" :value="scope.row.status"/>
</template>
</el-table-column>
<el-table-column label="执行时间" align="center" prop="createTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-view"
@click="handleView(scope.row)"
v-hasPermi="['monitor:job:query']"
>详细</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 调度日志详细 -->
<el-dialog title="调度日志详细" :visible.sync="open" width="700px" append-to-body>
<el-form ref="form" :model="form" label-width="100px" size="mini">
<el-row>
<el-col :span="12">
<el-form-item label="日志序号:">{{ form.jobLogId }}</el-form-item>
<el-form-item label="任务名称:">{{ form.jobName }}</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="任务分组:">{{ form.jobGroup }}</el-form-item>
<el-form-item label="执行时间:">{{ form.createTime }}</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="调用方法:">{{ form.invokeTarget }}</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="日志信息:">{{ form.jobMessage }}</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="执行状态:">
<div v-if="form.status == 0">正常</div>
<div v-else-if="form.status == 1">失败</div>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="异常信息:" v-if="form.status == 1">{{ form.exceptionInfo }}</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="open = false">关 闭</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { getJob} from "@/api/monitor/job";
import { listJobLog, delJobLog, cleanJobLog } from "@/api/monitor/jobLog";
export default {
name: "JobLog",
dicts: ['sys_common_status', 'sys_job_group'],
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 调度日志表格数据
jobLogList: [],
// 是否显示弹出层
open: false,
// 日期范围
dateRange: [],
// 表单参数
form: {},
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
jobName: undefined,
jobGroup: undefined,
status: undefined
}
};
},
created() {
const jobId = this.$route.params && this.$route.params.jobId;
if (jobId !== undefined && jobId != 0) {
getJob(jobId).then(response => {
this.queryParams.jobName = response.data.jobName;
this.queryParams.jobGroup = response.data.jobGroup;
this.getList();
});
} else {
this.getList();
}
},
methods: {
/** 查询调度日志列表 */
getList() {
this.loading = true;
listJobLog(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
this.jobLogList = response.rows;
this.total = response.total;
this.loading = false;
}
);
},
// 返回按钮
handleClose() {
const obj = { path: "/monitor/job" };
this.$tab.closeOpenPage(obj);
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = [];
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.jobLogId);
this.multiple = !selection.length;
},
/** 详细按钮操作 */
handleView(row) {
this.open = true;
this.form = row;
},
/** 删除按钮操作 */
handleDelete(row) {
const jobLogIds = this.ids;
this.$modal.confirm('是否确认删除调度日志编号为"' + jobLogIds + '"的数据项?').then(function() {
return delJobLog(jobLogIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 清空按钮操作 */
handleClean() {
this.$modal.confirm('是否确认清空所有调度日志数据项?').then(function() {
return cleanJobLog();
}).then(() => {
this.getList();
this.$modal.msgSuccess("清空成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('/monitor/jobLog/export', {
...this.queryParams
}, `log_${new Date().getTime()}.xlsx`)
}
}
};
</script>
-246
View File
@@ -1,246 +0,0 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="登录地址" prop="ipaddr">
<el-input
v-model="queryParams.ipaddr"
placeholder="请输入登录地址"
clearable
style="width: 240px;"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="用户名称" prop="userName">
<el-input
v-model="queryParams.userName"
placeholder="请输入用户名称"
clearable
style="width: 240px;"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="状态" prop="status">
<el-select
v-model="queryParams.status"
placeholder="登录状态"
clearable
style="width: 240px"
>
<el-option
v-for="dict in dict.type.sys_common_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="登录时间">
<el-date-picker
v-model="dateRange"
style="width: 240px"
value-format="yyyy-MM-dd HH:mm:ss"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="['00:00:00', '23:59:59']"
></el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['monitor:logininfor:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
@click="handleClean"
v-hasPermi="['monitor:logininfor:remove']"
>清空</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-unlock"
size="mini"
:disabled="single"
@click="handleUnlock"
v-hasPermi="['monitor:logininfor:unlock']"
>解锁</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['monitor:logininfor:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table ref="tables" v-loading="loading" :data="list" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="handleSortChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="访问编号" align="center" prop="infoId" />
<el-table-column label="用户名称" align="center" prop="userName" :show-overflow-tooltip="true" sortable="custom" :sort-orders="['descending', 'ascending']" />
<el-table-column label="登录地址" align="center" prop="ipaddr" width="130" :show-overflow-tooltip="true" />
<el-table-column label="登录地点" align="center" prop="loginLocation" :show-overflow-tooltip="true" />
<el-table-column label="浏览器" align="center" prop="browser" :show-overflow-tooltip="true" />
<el-table-column label="操作系统" align="center" prop="os" />
<el-table-column label="登录状态" align="center" prop="status">
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_common_status" :value="scope.row.status"/>
</template>
</el-table-column>
<el-table-column label="操作信息" align="center" prop="msg" :show-overflow-tooltip="true" />
<el-table-column label="登录日期" align="center" prop="loginTime" sortable="custom" :sort-orders="['descending', 'ascending']" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.loginTime) }}</span>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import { list, delLogininfor, cleanLogininfor, unlockLogininfor } from "@/api/monitor/logininfor";
export default {
name: "Logininfor",
dicts: ['sys_common_status'],
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 选择用户名
selectName: "",
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 表格数据
list: [],
// 日期范围
dateRange: [],
// 默认排序
defaultSort: {prop: 'loginTime', order: 'descending'},
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
ipaddr: undefined,
userName: undefined,
status: undefined
}
};
},
created() {
this.getList();
},
methods: {
/** 查询登录日志列表 */
getList() {
this.loading = true;
list(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
this.list = response.rows;
this.total = response.total;
this.loading = false;
}
);
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = [];
this.resetForm("queryForm");
this.queryParams.pageNum = 1;
this.$refs.tables.sort(this.defaultSort.prop, this.defaultSort.order)
},
/** 多选框选中数据 */
handleSelectionChange(selection) {
this.ids = selection.map(item => item.infoId)
this.single = selection.length!=1
this.multiple = !selection.length
this.selectName = selection.map(item => item.userName);
},
/** 排序触发事件 */
handleSortChange(column, prop, order) {
this.queryParams.orderByColumn = column.prop;
this.queryParams.isAsc = column.order;
this.getList();
},
/** 删除按钮操作 */
handleDelete(row) {
const infoIds = row.infoId || this.ids;
this.$modal.confirm('是否确认删除访问编号为"' + infoIds + '"的数据项?').then(function() {
return delLogininfor(infoIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 清空按钮操作 */
handleClean() {
this.$modal.confirm('是否确认清空所有登录日志数据项?').then(function() {
return cleanLogininfor();
}).then(() => {
this.getList();
this.$modal.msgSuccess("清空成功");
}).catch(() => {});
},
/** 解锁按钮操作 */
handleUnlock() {
const username = this.selectName;
this.$modal.confirm('是否确认解锁用户"' + username + '"数据项?').then(function() {
return unlockLogininfor(username);
}).then(() => {
this.$modal.msgSuccess("用户" + username + "解锁成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('monitor/logininfor/export', {
...this.queryParams
}, `logininfor_${new Date().getTime()}.xlsx`)
}
}
};
</script>
-122
View File
@@ -1,122 +0,0 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px">
<el-form-item label="登录地址" prop="ipaddr">
<el-input
v-model="queryParams.ipaddr"
placeholder="请输入登录地址"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="用户名称" prop="userName">
<el-input
v-model="queryParams.userName"
placeholder="请输入用户名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-table
v-loading="loading"
:data="list.slice((pageNum-1)*pageSize,pageNum*pageSize)"
style="width: 100%;"
>
<el-table-column label="序号" type="index" align="center">
<template slot-scope="scope">
<span>{{(pageNum - 1) * pageSize + scope.$index + 1}}</span>
</template>
</el-table-column>
<el-table-column label="会话编号" align="center" prop="tokenId" :show-overflow-tooltip="true" />
<el-table-column label="登录名称" align="center" prop="userName" :show-overflow-tooltip="true" />
<el-table-column label="部门名称" align="center" prop="deptName" />
<el-table-column label="主机" align="center" prop="ipaddr" :show-overflow-tooltip="true" />
<el-table-column label="登录地点" align="center" prop="loginLocation" :show-overflow-tooltip="true" />
<el-table-column label="浏览器" align="center" prop="browser" />
<el-table-column label="操作系统" align="center" prop="os" />
<el-table-column label="登录时间" align="center" prop="loginTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.loginTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleForceLogout(scope.row)"
v-hasPermi="['monitor:online:forceLogout']"
>强退</el-button>
</template>
</el-table-column>
</el-table>
<pagination v-show="total>0" :total="total" :page.sync="pageNum" :limit.sync="pageSize" />
</div>
</template>
<script>
import { list, forceLogout } from "@/api/monitor/online";
export default {
name: "Online",
data() {
return {
// 遮罩层
loading: true,
// 总条数
total: 0,
// 表格数据
list: [],
pageNum: 1,
pageSize: 10,
// 查询参数
queryParams: {
ipaddr: undefined,
userName: undefined
}
};
},
created() {
this.getList();
},
methods: {
/** 查询登录日志列表 */
getList() {
this.loading = true;
list(this.queryParams).then(response => {
this.list = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
/** 强退按钮操作 */
handleForceLogout(row) {
this.$modal.confirm('是否确认强退名称为"' + row.userName + '"的用户?').then(function() {
return forceLogout(row.tokenId);
}).then(() => {
this.getList();
this.$modal.msgSuccess("强退成功");
}).catch(() => {});
}
}
};
</script>
-313
View File
@@ -1,313 +0,0 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="系统模块" prop="title">
<el-input
v-model="queryParams.title"
placeholder="请输入系统模块"
clearable
style="width: 240px;"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="操作人员" prop="operName">
<el-input
v-model="queryParams.operName"
placeholder="请输入操作人员"
clearable
style="width: 240px;"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="类型" prop="businessType">
<el-select
v-model="queryParams.businessType"
placeholder="操作类型"
clearable
style="width: 240px"
>
<el-option
v-for="dict in dict.type.sys_oper_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="状态" prop="status">
<el-select
v-model="queryParams.status"
placeholder="操作状态"
clearable
style="width: 240px"
>
<el-option
v-for="dict in dict.type.sys_common_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="操作时间">
<el-date-picker
v-model="dateRange"
style="width: 240px"
value-format="yyyy-MM-dd HH:mm:ss"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="['00:00:00', '23:59:59']"
></el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['monitor:operlog:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
@click="handleClean"
v-hasPermi="['monitor:operlog:remove']"
>清空</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['monitor:operlog:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table ref="tables" v-loading="loading" :data="list" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="handleSortChange">
<el-table-column type="selection" width="50" align="center" />
<el-table-column label="日志编号" align="center" prop="operId" />
<el-table-column label="系统模块" align="center" prop="title" :show-overflow-tooltip="true" />
<el-table-column label="操作类型" align="center" prop="businessType">
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_oper_type" :value="scope.row.businessType"/>
</template>
</el-table-column>
<el-table-column label="操作人员" align="center" prop="operName" width="110" :show-overflow-tooltip="true" sortable="custom" :sort-orders="['descending', 'ascending']" />
<el-table-column label="操作地址" align="center" prop="operIp" width="130" :show-overflow-tooltip="true" />
<el-table-column label="操作地点" align="center" prop="operLocation" :show-overflow-tooltip="true" />
<el-table-column label="操作状态" align="center" prop="status">
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_common_status" :value="scope.row.status"/>
</template>
</el-table-column>
<el-table-column label="操作日期" align="center" prop="operTime" width="160" sortable="custom" :sort-orders="['descending', 'ascending']">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.operTime) }}</span>
</template>
</el-table-column>
<el-table-column label="消耗时间" align="center" prop="costTime" width="110" :show-overflow-tooltip="true" sortable="custom" :sort-orders="['descending', 'ascending']">
<template slot-scope="scope">
<span>{{ scope.row.costTime }}毫秒</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-view"
@click="handleView(scope.row,scope.index)"
v-hasPermi="['monitor:operlog:query']"
>详细</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 操作日志详细 -->
<el-dialog title="操作日志详细" :visible.sync="open" width="700px" append-to-body>
<el-form ref="form" :model="form" label-width="100px" size="mini">
<el-row>
<el-col :span="12">
<el-form-item label="操作模块:">{{ form.title }} / {{ typeFormat(form) }}</el-form-item>
<el-form-item
label="登录信息:"
>{{ form.operName }} / {{ form.operIp }} / {{ form.operLocation }}</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="请求地址:">{{ form.operUrl }}</el-form-item>
<el-form-item label="请求方式:">{{ form.requestMethod }}</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="操作方法:">{{ form.method }}</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="请求参数:">{{ form.operParam }}</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="返回参数:">{{ form.jsonResult }}</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="操作状态:">
<div v-if="form.status === 0">正常</div>
<div v-else-if="form.status === 1">失败</div>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="消耗时间:">{{ form.costTime }}毫秒</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="操作时间:">{{ parseTime(form.operTime) }}</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="异常信息:" v-if="form.status === 1">{{ form.errorMsg }}</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="open = false">关 闭</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { list, delOperlog, cleanOperlog } from "@/api/monitor/operlog";
export default {
name: "Operlog",
dicts: ['sys_oper_type', 'sys_common_status'],
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 表格数据
list: [],
// 是否显示弹出层
open: false,
// 日期范围
dateRange: [],
// 默认排序
defaultSort: {prop: 'operTime', order: 'descending'},
// 表单参数
form: {},
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
title: undefined,
operName: undefined,
businessType: undefined,
status: undefined
}
};
},
created() {
this.getList();
},
methods: {
/** 查询登录日志 */
getList() {
this.loading = true;
list(this.addDateRange(this.queryParams, this.dateRange)).then( response => {
this.list = response.rows;
this.total = response.total;
this.loading = false;
}
);
},
// 操作日志类型字典翻译
typeFormat(row, column) {
return this.selectDictLabel(this.dict.type.sys_oper_type, row.businessType);
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = [];
this.resetForm("queryForm");
this.queryParams.pageNum = 1;
this.$refs.tables.sort(this.defaultSort.prop, this.defaultSort.order)
},
/** 多选框选中数据 */
handleSelectionChange(selection) {
this.ids = selection.map(item => item.operId)
this.multiple = !selection.length
},
/** 排序触发事件 */
handleSortChange(column, prop, order) {
this.queryParams.orderByColumn = column.prop;
this.queryParams.isAsc = column.order;
this.getList();
},
/** 详细按钮操作 */
handleView(row) {
this.open = true;
this.form = row;
},
/** 删除按钮操作 */
handleDelete(row) {
const operIds = row.operId || this.ids;
this.$modal.confirm('是否确认删除日志编号为"' + operIds + '"的数据项?').then(function() {
return delOperlog(operIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 清空按钮操作 */
handleClean() {
this.$modal.confirm('是否确认清空所有操作日志数据项?').then(function() {
return cleanOperlog();
}).then(() => {
this.getList();
this.$modal.msgSuccess("清空成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('monitor/operlog/export', {
...this.queryParams
}, `operlog_${new Date().getTime()}.xlsx`)
}
}
};
</script>
-207
View File
@@ -1,207 +0,0 @@
<template>
<div class="app-container">
<el-row>
<el-col :span="12" class="card-box">
<el-card>
<div slot="header"><span><i class="el-icon-cpu"></i> CPU</span></div>
<div class="el-table el-table--enable-row-hover el-table--medium">
<table cellspacing="0" style="width: 100%;">
<thead>
<tr>
<th class="el-table__cell is-leaf"><div class="cell">属性</div></th>
<th class="el-table__cell is-leaf"><div class="cell">值</div></th>
</tr>
</thead>
<tbody>
<tr>
<td class="el-table__cell is-leaf"><div class="cell">核心数</div></td>
<td class="el-table__cell is-leaf"><div class="cell" v-if="server.cpu">{{ server.cpu.cpuNum }}</div></td>
</tr>
<tr>
<td class="el-table__cell is-leaf"><div class="cell">用户使用率</div></td>
<td class="el-table__cell is-leaf"><div class="cell" v-if="server.cpu">{{ server.cpu.used }}%</div></td>
</tr>
<tr>
<td class="el-table__cell is-leaf"><div class="cell">系统使用率</div></td>
<td class="el-table__cell is-leaf"><div class="cell" v-if="server.cpu">{{ server.cpu.sys }}%</div></td>
</tr>
<tr>
<td class="el-table__cell is-leaf"><div class="cell">当前空闲率</div></td>
<td class="el-table__cell is-leaf"><div class="cell" v-if="server.cpu">{{ server.cpu.free }}%</div></td>
</tr>
</tbody>
</table>
</div>
</el-card>
</el-col>
<el-col :span="12" class="card-box">
<el-card>
<div slot="header"><span><i class="el-icon-tickets"></i> 内存</span></div>
<div class="el-table el-table--enable-row-hover el-table--medium">
<table cellspacing="0" style="width: 100%;">
<thead>
<tr>
<th class="el-table__cell is-leaf"><div class="cell">属性</div></th>
<th class="el-table__cell is-leaf"><div class="cell">内存</div></th>
<th class="el-table__cell is-leaf"><div class="cell">JVM</div></th>
</tr>
</thead>
<tbody>
<tr>
<td class="el-table__cell is-leaf"><div class="cell">总内存</div></td>
<td class="el-table__cell is-leaf"><div class="cell" v-if="server.mem">{{ server.mem.total }}G</div></td>
<td class="el-table__cell is-leaf"><div class="cell" v-if="server.jvm">{{ server.jvm.total }}M</div></td>
</tr>
<tr>
<td class="el-table__cell is-leaf"><div class="cell">已用内存</div></td>
<td class="el-table__cell is-leaf"><div class="cell" v-if="server.mem">{{ server.mem.used}}G</div></td>
<td class="el-table__cell is-leaf"><div class="cell" v-if="server.jvm">{{ server.jvm.used}}M</div></td>
</tr>
<tr>
<td class="el-table__cell is-leaf"><div class="cell">剩余内存</div></td>
<td class="el-table__cell is-leaf"><div class="cell" v-if="server.mem">{{ server.mem.free }}G</div></td>
<td class="el-table__cell is-leaf"><div class="cell" v-if="server.jvm">{{ server.jvm.free }}M</div></td>
</tr>
<tr>
<td class="el-table__cell is-leaf"><div class="cell">使用率</div></td>
<td class="el-table__cell is-leaf"><div class="cell" v-if="server.mem" :class="{'text-danger': server.mem.usage > 80}">{{ server.mem.usage }}%</div></td>
<td class="el-table__cell is-leaf"><div class="cell" v-if="server.jvm" :class="{'text-danger': server.jvm.usage > 80}">{{ server.jvm.usage }}%</div></td>
</tr>
</tbody>
</table>
</div>
</el-card>
</el-col>
<el-col :span="24" class="card-box">
<el-card>
<div slot="header">
<span><i class="el-icon-monitor"></i> 服务器信息</span>
</div>
<div class="el-table el-table--enable-row-hover el-table--medium">
<table cellspacing="0" style="width: 100%;">
<tbody>
<tr>
<td class="el-table__cell is-leaf"><div class="cell">服务器名称</div></td>
<td class="el-table__cell is-leaf"><div class="cell" v-if="server.sys">{{ server.sys.computerName }}</div></td>
<td class="el-table__cell is-leaf"><div class="cell">操作系统</div></td>
<td class="el-table__cell is-leaf"><div class="cell" v-if="server.sys">{{ server.sys.osName }}</div></td>
</tr>
<tr>
<td class="el-table__cell is-leaf"><div class="cell">服务器IP</div></td>
<td class="el-table__cell is-leaf"><div class="cell" v-if="server.sys">{{ server.sys.computerIp }}</div></td>
<td class="el-table__cell is-leaf"><div class="cell">系统架构</div></td>
<td class="el-table__cell is-leaf"><div class="cell" v-if="server.sys">{{ server.sys.osArch }}</div></td>
</tr>
</tbody>
</table>
</div>
</el-card>
</el-col>
<el-col :span="24" class="card-box">
<el-card>
<div slot="header">
<span><i class="el-icon-coffee-cup"></i> Java虚拟机信息</span>
</div>
<div class="el-table el-table--enable-row-hover el-table--medium">
<table cellspacing="0" style="width: 100%;table-layout:fixed;">
<tbody>
<tr>
<td class="el-table__cell is-leaf"><div class="cell">Java名称</div></td>
<td class="el-table__cell is-leaf"><div class="cell" v-if="server.jvm">{{ server.jvm.name }}</div></td>
<td class="el-table__cell is-leaf"><div class="cell">Java版本</div></td>
<td class="el-table__cell is-leaf"><div class="cell" v-if="server.jvm">{{ server.jvm.version }}</div></td>
</tr>
<tr>
<td class="el-table__cell is-leaf"><div class="cell">启动时间</div></td>
<td class="el-table__cell is-leaf"><div class="cell" v-if="server.jvm">{{ server.jvm.startTime }}</div></td>
<td class="el-table__cell is-leaf"><div class="cell">运行时长</div></td>
<td class="el-table__cell is-leaf"><div class="cell" v-if="server.jvm">{{ server.jvm.runTime }}</div></td>
</tr>
<tr>
<td colspan="1" class="el-table__cell is-leaf"><div class="cell">安装路径</div></td>
<td colspan="3" class="el-table__cell is-leaf"><div class="cell" v-if="server.jvm">{{ server.jvm.home }}</div></td>
</tr>
<tr>
<td colspan="1" class="el-table__cell is-leaf"><div class="cell">项目路径</div></td>
<td colspan="3" class="el-table__cell is-leaf"><div class="cell" v-if="server.sys">{{ server.sys.userDir }}</div></td>
</tr>
<tr>
<td colspan="1" class="el-table__cell is-leaf"><div class="cell">运行参数</div></td>
<td colspan="3" class="el-table__cell is-leaf"><div class="cell" v-if="server.jvm">{{ server.jvm.inputArgs }}</div></td>
</tr>
</tbody>
</table>
</div>
</el-card>
</el-col>
<el-col :span="24" class="card-box">
<el-card>
<div slot="header">
<span><i class="el-icon-receiving"></i> 磁盘状态</span>
</div>
<div class="el-table el-table--enable-row-hover el-table--medium">
<table cellspacing="0" style="width: 100%;">
<thead>
<tr>
<th class="el-table__cell el-table__cell is-leaf"><div class="cell">盘符路径</div></th>
<th class="el-table__cell is-leaf"><div class="cell">文件系统</div></th>
<th class="el-table__cell is-leaf"><div class="cell">盘符类型</div></th>
<th class="el-table__cell is-leaf"><div class="cell">总大小</div></th>
<th class="el-table__cell is-leaf"><div class="cell">可用大小</div></th>
<th class="el-table__cell is-leaf"><div class="cell">已用大小</div></th>
<th class="el-table__cell is-leaf"><div class="cell">已用百分比</div></th>
</tr>
</thead>
<tbody v-if="server.sysFiles">
<tr v-for="(sysFile, index) in server.sysFiles" :key="index">
<td class="el-table__cell is-leaf"><div class="cell">{{ sysFile.dirName }}</div></td>
<td class="el-table__cell is-leaf"><div class="cell">{{ sysFile.sysTypeName }}</div></td>
<td class="el-table__cell is-leaf"><div class="cell">{{ sysFile.typeName }}</div></td>
<td class="el-table__cell is-leaf"><div class="cell">{{ sysFile.total }}</div></td>
<td class="el-table__cell is-leaf"><div class="cell">{{ sysFile.free }}</div></td>
<td class="el-table__cell is-leaf"><div class="cell">{{ sysFile.used }}</div></td>
<td class="el-table__cell is-leaf"><div class="cell" :class="{'text-danger': sysFile.usage > 80}">{{ sysFile.usage }}%</div></td>
</tr>
</tbody>
</table>
</div>
</el-card>
</el-col>
</el-row>
</div>
</template>
<script>
import { getServer } from "@/api/monitor/server";
export default {
name: "Server",
data() {
return {
// 服务器信息
server: []
};
},
created() {
this.getList();
this.openLoading();
},
methods: {
/** 查询服务器信息 */
getList() {
getServer().then(response => {
this.server = response.data;
this.$modal.closeLoading();
});
},
// 打开加载层
openLoading() {
this.$modal.loading("正在加载服务监控数据,请稍候!");
}
}
};
</script>
@@ -1,124 +0,0 @@
<template>
<div>
<el-dialog :title="title" :visible="operateVisable" v-if="operateVisable" @close="cancel" width="600px" center
:distroy-on-close="true">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="130px" class="demo-ruleForm">
<el-form-item label="机构名称" prop="identifyName">
<el-input v-model="ruleForm.identifyName"></el-input>
</el-form-item>
<el-form-item label="机构邮箱" prop="identifyEmail">
<el-input v-model="ruleForm.identifyEmail"></el-input>
</el-form-item>
<!-- <el-form-item label="经办人姓名" prop="operName">
<el-input v-model="ruleForm.operName"></el-input>
</el-form-item>
<el-form-item label="经办人用户名" prop="operUserName">
<el-input v-model="ruleForm.operUserName"></el-input>
</el-form-item>
<el-form-item label="经办人手机号" prop="operPhone">
<el-input v-model="ruleForm.operPhone"></el-input>
</el-form-item> -->
<el-form-item label="机构信用代码" prop="creditCode">
<el-input v-model="ruleForm.creditCode"></el-input>
</el-form-item>
<el-form-item label="法人姓名" prop="legalPerName">
<el-input v-model="ruleForm.legalPerName"></el-input>
</el-form-item>
<el-form-item label="法人手机号" prop="legalPerPhone">
<el-input v-model="ruleForm.legalPerPhone"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel" class="endbutton"><span>取 消</span></el-button>
<el-button type="primary" @click="submitForm" class="endbutton"><span>确认</span></el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {
insert,
} from "@/api/officialSeal/officialSeal.js";
import { listUser } from '@/api/system/user.js'
export default {
props: ["operateVisable", "queryParams"],
data() {
return {
title: "新增机构",
ruleForm: {},
rules: {
identifyName: [
{ required: true, message: '请输入机构名称', trigger: 'blur' },
],
// operName: [
// { required: true, message: '请输入经办人姓名', trigger: 'blur' },
// ],
// operPhone: [
// { required: true, message: '请输入经办人手机号', trigger: 'blur' },
// { pattern: /^[1][3,4,5,6,7,8,9][0-9]{9}$/, message: '请输入正确的手机号码', trigger: 'blur', },
// ],
creditCode: [
{ required: true, message: '请输入机构信用代码', trigger: 'blur' },
],
legalPerName: [
{ required: true, message: '请输入法人姓名', trigger: 'blur' },
],
legalPerPhone: [
{ required: true, message: '请输入法人手机号', trigger: 'blur' },
{ pattern: /^[1][3,4,5,6,7,8,9][0-9]{9}$/, message: '请输入正确的手机号码', trigger: 'blur', },
],
// operUserName: [
// { required: true, message: '请输入经办人用户名', trigger: 'blur' },
// ],
identifyEmail: [
{ required: true, message: '请输入邮箱', trigger: 'blur' },
{ type: 'email', message: '请输入正确的邮箱地址', trigger: 'blur' }
]
}
};
},
watch: {
operateVisable(val) {
if (val) {
}
},
},
created() {
},
methods: {
// 新增部门
insertFn(data) {
insert(data).then(res => {
this.$modal.msgSuccess("新增成功!");
this.$emit("cancelFilingreview");
this.$emit('getList', this.queryParams);
})
},
// 提交form表单
submitForm() {
this.$refs['ruleForm'].validate((valid) => {
if (valid) {
this.insertFn(this.ruleForm)
}
});
},
cancel() {
this.$emit("cancelFilingreview");
},
},
};
</script>
<style lang="scss" scoped>
.steps {
display: flex;
flex-wrap: wrap;
}
.radiobox {
margin-top: 30px;
}
</style>
@@ -1,94 +0,0 @@
<template>
<div>
<el-dialog title="新增模板" :visible="uploadVisable" v-if="uploadVisable" @close="cancel" width="600px" center>
<el-form :model="ruleForm" label-position="left" :rules="rules" ref="ruleForm" label-width="90px"
class="demo-ruleForm">
<el-form-item label="模板名称" prop="name">
<el-input v-model="ruleForm.name"></el-input>
</el-form-item>
<el-form-item label="模板类型" prop="type">
<el-select v-model="ruleForm.type" placeholder="请选择">
<el-option v-for="dict in dict.type.manager_type" :key="dict.value" :label="dict.label"
:value="dict.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="模板内容" prop="content">
<el-input type="textarea" placeholder="请输入内容" v-model="ruleForm.content">
</el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel" class="endbutton"><span>取 消</span></el-button>
<el-button type="primary" @click="submitUpload" class="endbutton"><span>确认</span></el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { getToken } from "@/utils/auth";
import {
insertManager,
} from "@/api/officialSeal/officialSeal.js";
export default {
props: ["uploadVisable", "uploadData", "queryParams"],
dicts: ["manager_type"],
data() {
return {
fileList: [],
data: [],
tempList: [],
isImg: false,
headers: {
Authorization: "Bearer " + getToken(),
},
filedata: {},
flagBtn: false,
ruleForm: {},
rules: {
name: [
{ required: true, message: '请输入模板名称', trigger: 'blur' },
],
type: [
{ required: true, message: '请输入模板名称', trigger: 'blur' },
],
content: [
{ required: true, message: '请输入模板名称', trigger: 'blur' },
]
}
};
},
watch: {
uploadVisable(val) {
if (val) {
this.ruleForm = {};
}
}
},
created() {
},
methods: {
cancel() {
this.$emit("cancelUpload");
},
// 新增模板
insertManagerFn(data) {
insertManager(data).then(res => {
this.$message.success('新增成功');
this.$emit("cancelUpload");
this.$emit('getList', this.queryParams);
})
},
submitUpload() {
this.$refs['ruleForm'].validate((valid) => {
if (valid) {
console.log(this.ruleForm, "LLLLLLLLLLLLLLLLLLLLLLL");
this.insertManagerFn(this.ruleForm)
}
});
},
},
};
</script>
<style lang="scss" scoped></style>
@@ -1,199 +0,0 @@
<template>
<div>
<el-dialog title="新增模板" :visible="uploadVisable" v-if="uploadVisable" @close="cancel" width="600px" center>
<el-form :model="ruleForm" label-position="left" :rules="rules" ref="ruleForm" label-width="90px"
class="demo-ruleForm">
<el-form-item label="模板名称" prop="temName">
<el-input v-model="ruleForm.temName"></el-input>
</el-form-item>
<!-- <el-form-item label="模板类型" prop="temType">
<el-select v-model="ruleForm.temType" placeholder="请选择">
<el-option v-for="dict in dict.type.template_type" :key="dict.value" :label="dict.label"
:value="dict.value"></el-option>
</el-select>
</el-form-item> -->
<el-form-item label="机构名称" prop="identifyId">
<el-select v-model="ruleForm.identifyId" placeholder="请选择">
<el-option v-for="item in tempList" :key="item.id" :label="item.identifyName" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-form>
<el-upload class="avatar-uploader" :on-success="handleSuccessC" ref="upload" :action="UploadUrl()"
:headers="headers" :data="filedataC" :on-remove="handleRemoveC" :on-change="handleChangeC" accept=".doc,.docx"
:file-list="fileListC" :limit="1">
<el-button size="small" type="primary">选择自然人调解申请书模板</el-button>
</el-upload>
<el-upload class="avatar-uploader" :on-success="handleSuccess" ref="upload" :action="UploadUrl()"
:headers="headers" :data="filedata" :on-remove="handleRemove" :on-change="handleChange" accept=".doc,.docx"
:file-list="fileList" :limit="1">
<el-button size="small" type="primary">选择机构调解申请书模板</el-button>
</el-upload>
<el-upload class="avatar-uploader" :on-success="handleSuccessA" ref="uploadA" :action="UploadUrl()"
:headers="headers" :data="filedataA" :on-remove="handleRemoveA" :on-change="handleChangeA"
accept=".doc,.docx" :file-list="fileListA" :limit="1">
<el-button size="small" type="primary">选择和解协议模板</el-button>
</el-upload>
<el-upload class="avatar-uploader" :on-success="handleSuccessB" ref="upload" :action="UploadUrl()"
:headers="headers" :data="filedataB" :on-remove="handleRemoveB" :on-change="handleChangeB"
accept=".doc,.docx" :file-list="fileListB" :limit="1">
<el-button size="small" type="primary">选择调解书模板</el-button>
</el-upload>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel" class="endbutton"><span>取 消</span></el-button>
<el-button type="primary" @click="submitUpload" class="endbutton"><span>确认</span></el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { getToken } from "@/utils/auth";
import {
deptIdentifyList,
insertTemplate
} from "@/api/officialSeal/officialSeal.js";
export default {
props: ["uploadVisable", "uploadData", "queryParams"],
dicts: ["template_type"],
data() {
return {
fileList: [],
fileListA: [],
fileListB: [],
fileListC: [],
data: [],
tempList: [],
isImg: false,
headers: {
Authorization: "Bearer " + getToken(),
},
filedata: {
annexType: 1
},
filedataA: {
annexType: 2
},
filedataB: {
annexType: 3
},
filedataC: {
annexType: 4
},
flagBtn: false,
ruleForm: {},
rules: {
temName: [
{ required: true, message: '请输入模板名称', trigger: 'blur' },
],
// temType: [
// { required: true, message: '请输入模板名称', trigger: 'blur' },
// ],
identifyId: [
{ required: true, message: '请输入模板名称', trigger: 'blur' },
]
},
submitForm: {
annexIds: []
}
};
},
watch: {
uploadVisable(val) {
if (val) {
let queryParams = {
pageNum: 1,
pageSize: 10000000000000000000000,
};
deptIdentifyList(queryParams).then(res => {
this.tempList = res.rows;
})
this.ruleForm = {}
}
}
},
created() {
},
methods: {
cancel() {
this.$emit("cancelUpload");
},
handleChange(file, fileList) {
this.isImg = file.type === '.doc' || '.docx'
},
UploadUrl() {
return window.location.origin + "/API/deptIdentify/upload";
},
handleRemove(file, fileList) {
console.log(file, fileList);
},
handleSuccess(res) {
this.$message.success('上传成功');
console.log(res, "OOOOOOOOOOOOOOOOO");
this.submitForm.annexIds.push(res.annexId)
},
handleChangeA(file, fileList) {
this.isImg = file.type === '.doc' || '.docx'
},
// 自然人
handleSuccessC(res) {
console.log(res,'自然人上传成功');
this.$message.success('上传成功');
this.submitForm.annexIds.push(res.annexId)
},
handleRemoveC(file, fileList) {
console.log(file, fileList);
},
handleChangeC(file, fileList) {
this.isImg = file.type === '.doc' || '.docx'
},
UploadUrl() {
return window.location.origin + "/API/deptIdentify/upload";
},
handleRemoveA(file, fileList) {
console.log(file, fileList);
},
handleSuccessA(res) {
this.$message.success('上传成功');
this.submitForm.annexIds.push(res.annexId)
},
handleChangeB(file, fileList) {
this.isImg = file.type === '.doc' || '.docx'
},
UploadUrl() {
return window.location.origin + "/API/deptIdentify/upload";
},
handleRemoveB(file, fileList) {
console.log(file, fileList);
},
handleSuccessB(res) {
this.$message.success('上传成功');
this.submitForm.annexIds.push(res.annexId)
},
submitUpload() {
this.$refs['ruleForm'].validate((valid) => {
if (valid) {
if(this.submitForm.annexIds.length < 4){
this.$message.error('四种类型模板必须上传');
return
}
this.submitForm.identifyId = this.ruleForm.identifyId;
this.submitForm.temName = this.ruleForm.temName;
insertTemplate(this.submitForm).then(res => {
this.$message.success('新增成功');
this.$emit("cancelUpload");
this.$emit('getList', this.queryParams);
})
}
});
},
},
};
</script>
<style lang="scss" scoped>
.avatar-uploader {
margin-bottom: 20px;
}
</style>
@@ -1,90 +0,0 @@
<template>
<div>
<el-dialog title="修改模板" :visible="editVisable" v-if="editVisable" @close="cancel" width="600px" center>
<el-form :model="ruleForm" label-position="left" :rules="rules" ref="ruleForm" label-width="90px"
class="demo-ruleForm">
<el-form-item label="模板名称" prop="name">
<el-input v-model="ruleForm.name"></el-input>
</el-form-item>
<el-form-item label="模板类型" prop="type">
<el-select v-model="ruleForm.type" placeholder="请选择">
<el-option v-for="dict in dict.type.manager_type" :key="dict.value" :label="dict.label"
:value="dict.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="模板内容" prop="content">
<el-input type="textarea" placeholder="请输入内容" v-model="ruleForm.content">
</el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel" class="endbutton"><span>取 消</span></el-button>
<el-button type="primary" @click="submitUpload" class="endbutton"><span>确认</span></el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { updateManager } from "@/api/officialSeal/officialSeal"
export default {
props: ["editVisable", "editData", "queryParams"],
dicts: ["manager_type"],
data() {
return {
data: [],
flagBtn: false,
ruleForm: {},
rules: {
name: [
{ required: true, message: '请输入模板名称', trigger: 'blur' },
],
type: [
{ required: true, message: '请输入模板名称', trigger: 'blur' },
],
content: [
{ required: true, message: '请输入模板名称', trigger: 'blur' },
]
}
};
},
watch: {
editData(val) {
if (val) {
this.ruleForm = val;
this.fileList = [];
this.ruleForm.type = this.ruleForm.type + '';
}
}
},
created() {
},
methods: {
cancel() {
this.$emit("cancelEdit");
},
// 修改模板
updateManagerFn(data) {
updateManager(data).then(res => {
this.$message.success('修改成功');
this.$emit("cancelEdit");
this.$emit('getList', this.queryParams);
})
},
submitUpload() {
this.$refs['ruleForm'].validate((valid) => {
if (valid) {
this.updateManagerFn({
name: this.ruleForm.name,
content: this.ruleForm.content,
type: this.ruleForm.type,
id:this.ruleForm.id
})
}
});
},
},
};
</script>
<style lang="scss" scoped></style>
@@ -1,235 +0,0 @@
<template>
<div>
<el-dialog title="修改模板" :visible="editVisable" v-if="editVisable" @close="cancel" width="600px" center>
<el-form :model="ruleForm" label-position="left" :rules="rules" ref="ruleForm" label-width="170px"
class="demo-ruleForm">
<el-form-item label="模板名称" prop="temName">
<el-input v-model="ruleForm.temName"></el-input>
</el-form-item>
<!-- <el-form-item label="模板类型" prop="temType">
<el-select v-model="ruleForm.temType" placeholder="请选择">
<el-option v-for="dict in dict.type.template_type" :key="dict.value" :label="dict.label"
:value="dict.value"></el-option>
</el-select>
</el-form-item> -->
<el-form-item label="自然人调解申请书模板" v-if="ruleForm.personApplicationFile && ruleForm.personApplicationFile.fileName">
<span style="color: #0e5ce3;cursor:pointer" @click="openUrl(ruleForm.personApplicationFile.temOrigPath)">{{
ruleForm.personApplicationFile.fileName ? ruleForm.personApplicationFile.fileName : ""
}}</span>
</el-form-item>
<el-form-item label="机构调解申请书模板" v-if="ruleForm.applicationFile.fileName">
<span style="color: #0e5ce3;cursor:pointer" @click="openUrl(ruleForm.applicationFile.temOrigPath)">{{
ruleForm.applicationFile.fileName ? ruleForm.applicationFile.fileName : ""
}}</span>
</el-form-item>
<el-form-item label="和解协议模板" v-if="ruleForm.agreementFile.fileName">
<!-- <span style="color: #0e5ce3;cursor:pointer" @click="openUrl(editData.temOrigPath)">{{ editData.fileName
}}</span> -->
<span style="color: #0e5ce3;cursor:pointer" @click="openUrl(ruleForm.agreementFile.temOrigPath)">{{
ruleForm.agreementFile.fileName ? ruleForm.agreementFile.fileName : ""
}}</span>
</el-form-item>
<el-form-item label="调解书模板" v-if="ruleForm.bookFile.fileName">
<span style="color: #0e5ce3;cursor:pointer" @click="openUrl(ruleForm.bookFile.temOrigPath)">{{
ruleForm.bookFile.fileName ? ruleForm.bookFile.fileName : ""
}}</span>
</el-form-item>
</el-form>
<el-upload class="avatar-uploader" :on-success="handleSuccessC" ref="upload" :action="UploadUrl()"
:headers="headers" :data="filedataC" :on-remove="handleRemoveC" :on-change="handleChangeC" accept=".doc,.docx"
:file-list="fileListC" :limit="1">
<el-button size="small" type="primary">选择自然人调解申请书模板</el-button>
</el-upload>
<el-upload class="avatar-uploader" :on-success="handleSuccess" ref="upload" :action="UploadUrl()"
:headers="headers" :data="filedata" :on-remove="handleRemove" :on-change="handleChange" accept=".doc,.docx"
:file-list="fileList" :limit="1">
<el-button size="small" type="primary">选择机构调解申请书模板</el-button>
</el-upload>
<el-upload class="avatar-uploader" :on-success="handleSuccessA" ref="uploadA" :action="UploadUrl()"
:headers="headers" :data="filedataA" :on-remove="handleRemoveA" :on-change="handleChangeA"
accept=".doc,.docx" :file-list="fileListA" :limit="1">
<el-button size="small" type="primary">选择和解协议模板</el-button>
</el-upload>
<el-upload class="avatar-uploader" :on-success="handleSuccessB" ref="upload" :action="UploadUrl()"
:headers="headers" :data="filedataB" :on-remove="handleRemoveB" :on-change="handleChangeB"
accept=".doc,.docx" :file-list="fileListB" :limit="1">
<el-button size="small" type="primary">选择调解书模板</el-button>
</el-upload>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel" class="endbutton"><span>取 消</span></el-button>
<el-button type="primary" @click="submitUpload" class="endbutton"><span>确认</span></el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { getToken } from "@/utils/auth";
import { updateTemplate, getTemplateDetail } from "@/api/officialSeal/officialSeal"
export default {
props: ["editVisable", "editData", "queryParams"],
dicts: ["template_type"],
data() {
return {
fileList: [],
fileListA: [],
fileListB: [],
fileListC: [],
data: [],
headers: {
Authorization: "Bearer " + getToken(),
},
isImg: true,
filedata: {
annexType: 1
},
filedataA: {
annexType: 2
},
filedataB: {
annexType: 3
},
filedataC: {
annexType: 4
},
flagBtn: false,
ruleForm: {
agreementFile:{},
applicationFile:{},
bookFile:{}
},
rules: {
temName: [
{ required: true, message: '请输入模板名称', trigger: 'blur' },
],
},
submitForm: {
annexIds: []
}
};
},
watch: {
editData(val) {
if (val) {
this.fileList = [];
}
},
editVisable(val){
if(val){
this.getTemplateDetailFn({ id: this.editData.id });
this.submitForm.annexIds = []
}
}
},
created() {
},
methods: {
// 打开链接
openUrl(urlTemp) {
let headPath = window.location.origin + "/API/";
window.open(headPath + urlTemp);
},
cancel() {
this.$emit("cancelEdit");
},
UploadUrl() {
return window.location.origin + "/API/deptIdentify/updateTemplate";
},
/**根据id查看详情*/
getTemplateDetailFn(data) {
getTemplateDetail(data).then(res => {
this.ruleForm = res;
// this.submitForm.annexIds = [this.ruleForm.agreementFile.fileId,this.ruleForm.applicationFile.fileId,this.ruleForm.bookFile.fileId]
})
},
submitUpload() {
this.$refs['ruleForm'].validate((valid) => {
if (valid) {
this.$refs['ruleForm'].validate((valid) => {
if (valid) {
this.submitForm.identifyId = this.ruleForm.identifyId;
this.submitForm.temName = this.ruleForm.temName;
this.submitForm.id = this.ruleForm.id;
console.log(this.submitForm,'ooooooooooooooooooooooooooooo');
updateTemplate(this.submitForm).then(res => {
this.$message.success('修改成功');
this.$emit("cancelEdit");
this.$emit('getList', this.queryParams);
})
}
});
}
});
},
handleChange(file, fileList) {
this.isImg = file.type === '.doc' || '.docx'
},
UploadUrl() {
return window.location.origin + "/API/deptIdentify/upload";
},
handleRemove(file, fileList) {
console.log(file, fileList);
},
// 机构
handleSuccess(res) {
console.log(res,'机构上传成功');
this.$message.success('上传成功');
// this.submitForm.annexIds.push(res.annexId);
this.submitForm.annexIds.push(res.annexId);
},
// 自然人
handleSuccessC(res) {
console.log(res,'自然人上传成功');
this.$message.success('上传成功');
this.submitForm.annexIds.push(res.annexId);
},
handleRemoveC(file, fileList) {
console.log(file, fileList);
},
handleChangeC(file, fileList) {
this.isImg = file.type === '.doc' || '.docx'
},
handleChangeA(file, fileList) {
this.isImg = file.type === '.doc' || '.docx'
},
UploadUrl() {
return window.location.origin + "/API/deptIdentify/upload";
},
handleRemoveA(file, fileList) {
console.log(file, fileList);
},
// 和解协议
handleSuccessA(res) {
this.$message.success('上传成功');
// this.submitForm.annexIds.push(res.annexId);
this.submitForm.annexIds.push(res.annexId);
},
handleChangeB(file, fileList) {
this.isImg = file.type === '.doc' || '.docx'
},
UploadUrl() {
return window.location.origin + "/API/deptIdentify/upload";
},
handleRemoveB(file, fileList) {
console.log(file, fileList);
},
// 调解书
handleSuccessB(res) {
this.$message.success('上传成功');
// this.submitForm.annexIds.push(res.annexId);
this.submitForm.annexIds.push(res.annexId);
},
// handleSuccess() {
// this.$message.success('修改成功');
// this.$emit("cancelEdit");
// this.$emit('getList', this.queryParams);
// }
},
};
</script>
<style lang="scss" scoped>
.avatar-uploader {
margin-bottom: 20px;
}</style>
@@ -1,112 +0,0 @@
<template>
<div>
<el-dialog :title="title" :visible="editVisable" v-if="editVisable" @close="cancel" width="600px" center
:distroy-on-close="true">
<el-form :model="editForm" :rules="rules" ref="editForm" label-width="130px" class="demo-editForm">
<el-form-item label="机构名称" prop="identifyName">
<el-input v-model="editForm.identifyName"></el-input>
</el-form-item>
<el-form-item label="机构邮箱" prop="identifyEmail">
<el-input v-model="editForm.identifyEmail"></el-input>
</el-form-item>
<el-form-item label="机构信用代码" prop="creditCode">
<el-input v-model="editForm.creditCode"></el-input>
</el-form-item>
<el-form-item label="法人姓名" prop="legalPerName">
<el-input v-model="editForm.legalPerName"></el-input>
</el-form-item>
<el-form-item label="法人手机号" prop="legalPerPhone">
<el-input v-model="editForm.legalPerPhone"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel" class="endbutton"><span>取 消</span></el-button>
<el-button type="primary" @click="submitForm" class="endbutton"><span>确认</span></el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {
sealUpdate
} from "@/api/officialSeal/officialSeal.js";
export default {
props: ["editVisable","editData","queryParams"],
data() {
return {
title: "修改机构",
editForm: {},
rules: {
identifyName: [
{ required: true, message: '请输入机构名称', trigger: 'blur' },
],
creditCode: [
{ required: true, message: '请输入机构信用代码', trigger: 'blur' },
],
legalPerName: [
{ required: true, message: '请输入法人姓名', trigger: 'blur' },
],
legalPerPhone: [
{ required: true, message: '请输入法人手机号', trigger: 'blur' },
{ pattern: /^[1][3,4,5,6,7,8,9][0-9]{9}$/, message: '请输入正确的手机号码', trigger: 'blur', },
],
// operUserName: [
// { required: true, message: '请输入经办人用户名', trigger: 'blur' },
// ],
identifyEmail: [
{ required: true, message: '请输入邮箱', trigger: 'blur' },
{ type: 'email', message: '请输入正确的邮箱地址', trigger: 'blur' }
]
}
};
},
watch: {
editVisable(val) {
if (val) {
this.editForm = this.editData;
}
}
},
created() {
},
methods: {
// 编辑
sealUpdateFn(data) {
sealUpdate(data).then(res => {
this.$modal.msgSuccess("修改成功!");
this.$emit("cancelEdit");
this.$emit('getList',this.queryParams);
})
},
// 提交form表单
submitForm() {
this.$refs['editForm'].validate((valid) => {
if (valid) {
this.sealUpdateFn({
identifyName:this.editForm.identifyName,
operName:this.editForm.operName,
operPhone:this.editForm.operPhone,
id:this.editForm.id,
})
}
});
},
cancel() {
this.$emit("cancelEdit");
},
},
};
</script>
<style lang="scss" scoped>
.steps {
display: flex;
flex-wrap: wrap;
}
.radiobox {
margin-top: 30px;
}
</style>
@@ -1,288 +0,0 @@
<template>
<div>
<el-dialog title="设置抓取规则" :visible="rulesVisable" v-if="rulesVisable" @close="cancelRules"
append-to-body :destroy-on-close="true" center>
<el-button type="primary" icon="el-icon-plus" style="margin-bottom: 20px;"
@click="addForm">新增系统内置抓取规则</el-button>
<div class="formDom">
<el-form ref="form" :model="formData" label-width="150px">
<div class="formItem" v-for="(item, index) in formData.forms" :key="item.key">
<el-button type="primary" icon="el-icon-delete" style="margin-bottom: 20px;"
@click="deleteForm(item)">删除</el-button>
<el-row>
<el-col :span="12">
<el-form-item label="抓取文件名:" :prop="'forms.' + index + '.fileName'" :rules="[
{
required: true,
message: '抓取文件名不能为空',
},
]">
<el-input v-model="item.fileName" placeholder="请输入抓取文件名" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="字段名:" :prop="'forms.' + index + '.columnName'" :rules="[
{
required: true,
message: '字段名不能为空',
},
]">
<el-select v-model="item.columnName" placeholder="请选择" @change="columnNameChange(item)">
<el-option v-for="dict in dict.type.case_built_type" :key="dict.value"
:label="dict.label" :value="dict.label"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="开始抓取字段:" :prop="'forms.' + index + '.startContent'">
<el-input v-model="item.startContent" placeholder="请输入开始抓取字段" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="结束抓取字段:" :prop="'forms.' + index + '.endContent'">
<el-input v-model="item.endContent" placeholder="结束抓取字段" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="指定抓取开始位置:" :prop="'forms.' + index + '.startContentRepeatOrder'">
<el-input-number v-model="item.startContentRepeatOrder" controls-position="right" :min="1"></el-input-number>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="指定抓取结束位置:" :prop="'forms.' + index + '.endContentRepeatOrder'">
<el-input-number v-model="item.endContentRepeatOrder" controls-position="right" :min="1"></el-input-number>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="抓取方向:" :prop="'forms.' + index + '.fatchOrder'">
<el-select v-model="item.fatchOrder" placeholder="请选择">
<el-option v-for="dict in fatchOrderList" :key="dict.key"
:label="dict.name" :value="dict.key"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</div>
</el-form>
</div>
<el-button type="primary" icon="el-icon-plus" style="margin-bottom: 20px;"
@click="addFormCustom">新增自定义抓取规则</el-button>
<div class="formDom">
<el-form ref="form_custom" :model="formData_custom" label-width="150px">
<div class="formItem" v-for="(item, index) in formData_custom.forms" :key="item.key">
<el-button type="primary" icon="el-icon-delete" style="margin-bottom: 20px;"
@click="deleteFormCustom(item)">删除</el-button>
<el-row>
<el-col :span="12">
<el-form-item label="字段:" :prop="'forms.' + index + '.column'" :rules="[
{
required: true,
message: '字段不能为空',
},
]">
<el-input v-model="item.column" placeholder="请输入字段" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="字段名:" :prop="'forms.' + index + '.columnName'" :rules="[
{
required: true,
message: '字段名不能为空',
},
]">
<el-input v-model="item.columnName" placeholder="请输入字段名" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="抓取文件名:" :prop="'forms.' + index + '.fileName'" :rules="[
{
required: true,
message: '抓取文件名不能为空',
},
]">
<el-input v-model="item.fileName" placeholder="请输入抓取文件名" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="开始抓取字段:" :prop="'forms.' + index + '.startContent'">
<el-input v-model="item.startContent" placeholder="请输入开始抓取字段" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="结束抓取字段:" :prop="'forms.' + index + '.endContent'">
<el-input v-model="item.endContent" placeholder="结束抓取字段" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="指定抓取开始位置:" :prop="'forms.' + index + '.startContentRepeatOrder'">
<el-input-number v-model="item.startContentRepeatOrder" controls-position="right" :min="1"></el-input-number>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="指定抓取结束位置:" :prop="'forms.' + index + '.endContentRepeatOrder'">
<el-input-number v-model="item.endContentRepeatOrder" controls-position="right" :min="1"></el-input-number>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="抓取方向:" :prop="'forms.' + index + '.fatchOrder'">
<el-select v-model="item.fatchOrder" placeholder="请选择">
<el-option v-for="dict in fatchOrderList" :key="dict.key"
:label="dict.name" :value="dict.key"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</div>
</el-form>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="cancelRules" class="endbutton"><span>取 消</span></el-button>
<el-button type="primary" @click="submitRules" class="endbutton"><span>确认</span></el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {
getFatchRuleByTemplateid,
saveFatchRules
} from "@/api/officialSeal/officialSeal.js";
export default {
props: ["rulesVisable", "rulesData", "queryParams"],
dicts: ["case_built_type"],
data() {
return {
formData: {
forms: [{
// fileName: "",
// startContent: '',
// endContent: '',
// column: "",
// columnName: "",
}]
},
formData_custom: {
forms: []
},
fatchOrderList: [
{
name:'从前向后抓取',
key:0
},
{
name:'从后往前抓取',
key:1
}
]
};
},
watch: {
rulesData(val) {
if (val) {
this.formData.forms = [];
this.formData_custom.forms = [];
this.getFatchRuleByTemplateidFn({ id: val.id })
}
}
},
created() {
},
methods: {
cancelRules() {
this.$emit("cancelRules");
},
addForm() {
this.formData.forms.push({
fileName: "",
startContent: '',
endContent: '',
column: "",
columnName: "",
isDefault: 0
});
},
deleteForm(item) {
var index = this.formData.forms.indexOf(item)
if (index !== -1) {
this.formData.forms.splice(index, 1)
}
},
deleteFormCustom(item) {
var index = this.formData_custom.forms.indexOf(item)
if (index !== -1) {
this.formData_custom.forms.splice(index, 1)
}
},
addFormCustom() {
this.formData_custom.forms.push({
fileName: "",
startContent: '',
endContent: '',
column: "",
columnName: "",
isDefault: 1
});
},
columnNameChange(item){
let result = this.dict.type.case_built_type.find((data=>{
return data.label == item.columnName
}))
item.column = result.value;
},
submitRules() {
this.$refs['form'].validate((valid) => {
if (valid) {
this.$refs['form_custom'].validate((valid_custom) => {
if (valid_custom) {
let paramsList = this.formData.forms.concat(this.formData_custom.forms)
this.saveFatchRulesFn({
id: this.rulesData.id,
fatchRules: paramsList
})
}
})
}
});
},
// 根据id获取抓取规则
getFatchRuleByTemplateidFn(data) {
getFatchRuleByTemplateid(data).then(res => {
// this.formData.forms = res.data;
// this.selectList = res.data
this.formData.forms = [];
this.formData_custom.forms = [];
console.log(res.data,"LLLLLLLLLLLLLLLLLLLLLLLLLLLL");
res.data.forEach(item => {
if(item.isDefault == 0){
this.formData.forms.push(item)
}else if(item.isDefault == 1){
this.formData_custom.forms.push(item)
}
});
})
},
// 提交抓取规则
saveFatchRulesFn(data) {
saveFatchRules(data).then(res => {
this.$message.success('提交成功');
this.$emit("cancelRules");
this.$emit('getList', this.queryParams);
})
}
},
};
</script>
<style lang="scss" scoped>
::v-deep .el-form {
border: 1px solid #c2bcbc;
padding: 20px;
margin-bottom: 15px;
max-height: 300px;
overflow-y: scroll;
}
.el-input-number{
width: 180px;
}
</style>
@@ -1,117 +0,0 @@
<template>
<div>
<el-dialog title="公章列表" :visible="sealVisable" @close="cancel" width="800px" center :distroy-on-close="true">
<el-table v-loading="loading" :data="dataList" style="width: 100%">
<el-table-column label="序号" type="index" align="center">
<template slot-scope="scope">
<span>{{
(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1
}}</span>
</template>
</el-table-column>
<el-table-column label="印章名称" align="center" prop="sealName"
:show-overflow-tooltip="true"></el-table-column>
<el-table-column label="印章图片" align="center" prop="annexPath">
<template slot-scope="scope">
<el-image style="width: 40px; height: 40px;" :src="imgUrl + scope.row.annexPath"
:preview-src-list="[imgUrl + scope.row.annexPath]">
</el-image>
<!-- <span>{{ imgUrl + scope.row.annexPath }}</span> -->
</template>
</el-table-column>
<el-table-column label="是否启用" align="center" prop="sealStatus">
<template slot-scope="scope">
<el-tag type="success" v-if="scope.row.isUse == 1">已启用</el-tag>
<el-tag type="info"
v-if="(scope.row.isUse == 0 || scope.row.isUse == null) && scope.row.sealStatus !== 0">未启用</el-tag>
<el-tag type="danger" v-if="scope.row.sealStatus == 0">审核中</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button size="mini" @click="isUseChange(scope.row.id, 1)" type="text" icon="el-icon-thumb"
v-if="(scope.row.isUse == 0 || scope.row.isUse == null) && scope.row.sealStatus !== 0">启用</el-button>
<el-button size="mini" @click="isUseChange(scope.row.id, 0)" type="text" icon="el-icon-thumb"
v-if="scope.row.isUse == 1">禁用</el-button>
</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize" @pagination="sealListFn(queryParams)" />
</el-dialog>
</div>
</template>
<script>
import {
sealList,
updateSealLockStatus
} from "@/api/officialSeal/officialSeal.js";
export default {
props: ["sealVisable", "sealData"],
data() {
return {
loading: false,
srcList: [],
queryParams: {
pageNum: 1,
pageSize: 10,
},
dataList: [
],
total: 0,
imgUrl: ""
};
},
watch: {
sealVisable(val) {
if (val) {
this.queryParams.id = this.sealData.id;
this.sealListFn(this.queryParams)
}
}
},
created() {
this.UploadUrl()
},
methods: {
UploadUrl() {
this.imgUrl = window.location.origin + '/API';
},
// 查询列表数据
sealListFn(data) {
this.loading = true;
sealList(data).then(res => {
this.dataList = res.rows;
this.total = res.total;
this.loading = false;
})
},
// 更新公章状态
updateSealLockStatusFn(data) {
updateSealLockStatus(data).then(res => {
this.$message.success('更新状态成功');
this.sealListFn(this.queryParams);
})
},
// 启用或者禁用公章
isUseChange(id, type) {
let params = {
id: id,
isUse: type
}
this.$modal
.confirm("是否更改状态")
.then((res) => {
this.updateSealLockStatusFn(params);
})
},
cancel() {
this.$emit("cancelSeal");
},
},
};
</script>
<style lang="scss" scoped></style>
@@ -1,58 +0,0 @@
<template>
<div>
<el-dialog :title="title" :visible="listVisable" v-if="listVisable" @close="cancel" width="800px" center
:distroy-on-close="true">
<el-table v-loading="loading" :data="dataList" style="width: 100%">
<el-table-column label="字段" align="center" prop="column" :show-overflow-tooltip="true" />
<el-table-column label="字段名" align="center" prop="columnName" :show-overflow-tooltip="true" />
</el-table>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel" class="endbutton"><span>取 消</span></el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {
getTemplateInfoById
} from "@/api/officialSeal/officialSeal.js";
export default {
props: ["listVisable", "listData", "queryParams"],
data() {
return {
title: "模板字段列表",
// 遮罩层
loading: false,
dataList:[]
};
},
watch: {
listData(val) {
if (val) {
getTemplateInfoById({ id: val.id }).then(res=>{
this.dataList = res.data;
})
}
}
},
created() {
},
methods: {
cancel() {
this.$emit("cancelList");
},
},
};
</script>
<style lang="scss" scoped>
.steps {
display: flex;
flex-wrap: wrap;
}
.radiobox {
margin-top: 30px;
}
</style>
@@ -1,128 +0,0 @@
<template>
<div>
<el-dialog title="上传公章" :visible="uploadVisable" v-if="uploadVisable" @close="cancel" width="600px" center>
<el-form :model="ruleForm" label-position="left" :rules="rules" ref="ruleForm" label-width="90px"
class="demo-ruleForm">
<el-form-item label="印章名称" prop="sealName">
<el-input v-model="ruleForm.sealName"></el-input>
</el-form-item>
</el-form>
<el-upload class="avatar-uploader" accept="image/png" :before-upload="beforeUpload" :on-success="handleSuccess" ref="upload"
:action="UploadUrl()" :headers="headers" :data="filedata" :on-remove="handleRemove"
:on-change="handleChange" :show-file-list="false" :file-list="fileList" :auto-upload="false">
<img v-if="imageUrl" :src="imageUrl" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel" class="endbutton"><span>取 消</span></el-button>
<el-button type="primary" @click="submitUpload" class="endbutton"><span>确认</span></el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { getToken } from "@/utils/auth";
export default {
props: ["uploadVisable", "uploadData"],
data() {
return {
fileList: [],
data: [],
headers: {
Authorization: "Bearer " + getToken(),
},
filedata: {
id: this.uploadData.id
},
flagBtn: false,
imageUrl: "",
ruleForm: {},
rules: {
sealName: [
{ required: true, message: '请输入印章名称', trigger: 'blur' },
],
}
};
},
watch: {
uploadVisable(val) {
if (val) {
this.imageUrl = "",
this.ruleForm = {}
}
}
},
created() {
},
methods: {
cancel() {
this.$emit("cancelUpload");
},
handleChange(file, fileList) {
this.imageUrl = URL.createObjectURL(file.raw);
},
UploadUrl() {
return window.location.origin + "/API/deptIdentify/sealUpload";
},
submitUpload() {
this.$refs['ruleForm'].validate((valid) => {
if (valid) {
this.filedata.id = this.uploadData.id;
this.filedata.sealName = this.ruleForm.sealName;
this.$refs.upload.submit();
}
});
},
handleRemove(file, fileList) {
console.log(file, fileList);
},
beforeUpload(file) {
const isImg = file.type === 'image/png'
if (!isImg) {
this.$message.error('只能上传图片格式的文件')
}
return isImg
},
handleSuccess(response) {
if (response.code == 200) {
this.$message.success('上传成功');
this.cancel()
} else {
this.$message.error(response.msg);
}
}
},
};
</script>
<style lang="scss" scoped>
::v-deep .avatar-uploader .el-upload {
width: 178px;
height: 178px;
border: 1px dashed #d9d9d9;
border-radius: 6px;
cursor: pointer;
margin-left: 90px;
}
::v-deep .avatar-uploader .el-upload:hover {
border-color: #409EFF;
}
::v-deep .avatar-uploader-icon {
font-size: 28px;
color: #8c939d;
width: 178px;
height: 178px;
line-height: 178px;
text-align: center;
}
::v-deep .avatar {
width: 178px;
height: 178px;
display: block;
}
</style>
-280
View File
@@ -1,280 +0,0 @@
<template>
<div class="app-container">
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="addInstitution">新增部门</el-button>
<!-- v-hasPermi="['caseManagement:list:add']" -->
</el-col>
</el-row>
<el-table v-loading="loading" :data="dataList" style="width: 100%">
<el-table-column label="序号" type="index" align="center">
<template slot-scope="scope">
<span>{{
(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1
}}</span>
</template>
</el-table-column>
<el-table-column label="调解机构名称" align="center" prop="identifyName" :show-overflow-tooltip="true" />
<el-table-column label="经办人姓名" align="center" prop="operName" :show-overflow-tooltip="true" />
<el-table-column label="经办人手机号" align="center" prop="operPhone" :show-overflow-tooltip="true" />
<el-table-column label="认证时间" align="center" prop="identifyDate" />
<el-table-column label="认证状态" align="center" prop="identifyStatus" :show-overflow-tooltip="true" />
<el-table-column label="是否启用" align="center" prop="isUse"></el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" @click="DeptIndefiUrl(scope.row)" type="text" icon="el-icon-thumb"
v-if="scope.row.identifyStatus == '未认证'">认证</el-button>
<el-button size="mini" @click="changeStatus(scope.row)" type="text" icon="el-icon-thumb"
v-if="scope.row.isUse == '未启用' && scope.row.identifyStatus == '已认证'">启用</el-button>
<el-button size="mini" @click="uploadSeal(scope.row)" type="text"
v-if="scope.row.identifyStatus == '已认证'" icon="el-icon-upload2">上传公章</el-button>
<el-button size="mini" @click="sealManage(scope.row)" type="text"
v-if="scope.row.identifyStatus == '已认证'" icon="el-icon-upload2">公章管理</el-button>
<el-button size="mini" @click="sealDelete(scope.row)" v-if="scope.row.identifyStatus == '未认证'"
type="text" icon="el-icon-delete">删除</el-button>
<el-button size="mini" @click="eidtSeal(scope.row)" type="text" v-if="scope.row.identifyStatus == '未认证'"
icon="el-icon-edit">修改</el-button>
<el-button size="mini" @click="selectUser(scope.row)" type="text"
v-if="scope.row.identifyStatus == '未认证'" icon="el-icon-edit">选择经办人</el-button>
</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList(queryParams)" />
<addInstitution :operateVisable="operateVisable" @cancelFilingreview="cancelFilingreview" :queryParams="queryParams"
@getList="getList">
</addInstitution>
<uploadSeal :uploadVisable="uploadVisable" @cancelUpload="cancelUpload" :queryParams="queryParams"
:uploadData="uploadData" @getList="getList">
</uploadSeal>
<sealManage :sealVisable="sealVisable" @cancelSeal="cancelSeal" :queryParams="queryParams" :sealData="sealData">
</sealManage>
<eidtInstitution :editVisable="editVisable" @cancelEdit="cancelEdit" :queryParams="queryParams" @getList="getList"
:editData="editData"></eidtInstitution>
<el-dialog title="选择经办人" :visible.sync="selectVisible" width="600px" @close="selectClose">
<el-form :model="slectFrom" :rules="rules" ref="slectFrom" label-width="80px">
<el-form-item label="经办人" prop="id">
<el-select v-model="slectFrom.id" clearable placeholder="请选择">
<el-option v-for="item in userList" :key="item.userId" :label="item.nickName" :value="item.userId">
</el-option>
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="selectClose" class="endbutton"><span>取 消</span></el-button>
<el-button type="primary" @click="submitUser" class="endbutton"><span>确认</span></el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {
deptIdentifyList,
enableDept,
selectDeptIndefiUrl,
deleteSeal,
selectPostUserByDeptId,
bindHandler
} from "@/api/officialSeal/officialSeal.js";
import addInstitution from "./components/addInstitution";
import uploadSeal from "./components/uploadSeal";
import sealManage from "./components/sealManage";
import eidtInstitution from "./components/eidtInstitution";
export default {
name: "paymentList",
components: {
addInstitution,
uploadSeal,
sealManage,
eidtInstitution
},
data() {
return {
queryParams: {
pageNum: 1,
pageSize: 10,
},
// 遮罩层
loading: false,
// 总条数
total: 0,
// 表格数据
form: {},
// 校验表单
rules: {},
dataList: [1],
operateVisable: false,//新增弹窗
uploadVisable: false,//上传弹窗
sealVisable: false,//公章列表弹窗
uploadData: {},
sealData: {},
editVisable: false,
editData: {},
selectVisible: false,
slectFrom: {},
userList: [],
templateId: null,
rules: {
id: [
{ required: true, message: '请选择经办人', trigger: 'blur' },
]
}
};
},
created() {
this.getList(this.queryParams)
},
methods: {
// 选择经办人
selectUser(row) {
this.selectVisible = true;
this.templateId = row.id;
selectPostUserByDeptId({ id: row.id }).then(res => {
this.userList = res.data;
if (row.userId) {
this.slectFrom.id = row.userId;
} else {
this.slectFrom = {};
}
})
},
// 确认经办人
submitUser() {
this.$refs['slectFrom'].validate((valid) => {
if (valid) {
bindHandler({ id: this.templateId, userId: this.slectFrom.id }).then(res => {
this.$modal.msgSuccess("选择成功");
this.selectVisible = false;
this.getList(this.queryParams);
})
}
})
},
selectClose() {
this.selectVisible = false;
},
// 删除
sealDelete(row) {
this.$modal
.confirm("是否更改状态")
.then((res) => {
this.deleteSealFn({ id: row.id })
})
},
// 删除接口
deleteSealFn(data) {
deleteSeal(data).then(res => {
this.$modal.msgSuccess("删除成功!");
this.getList(this.queryParams);
})
},
// 公章管理
sealManage(row) {
this.sealVisable = true;
this.sealData = row;
},
cancelSeal() {
this.sealVisable = false;
},
// 上传公章
uploadSeal(row) {
this.uploadVisable = true;
this.uploadData = row;
},
closeUploadSeal(){
this.uploadVisable = false
},
cancelFilingreview() {
this.operateVisable = false;
},
cancelUpload() {
this.uploadVisable = false;
},
// 新增部门
addInstitution() {
this.operateVisable = true;
},
// 编辑
eidtSeal(row) {
this.editVisable = true;
this.editData = row;
},
cancelEdit() {
this.editVisable = false;
},
// 启用认证按钮
changeStatus(row) {
this.$modal.confirm('是否进行启用?')
.then(function () {
})
.then(() => {
enableDept({ id: row.id }).then(res => {
this.$modal.msgSuccess("启用成功!");
this.getList(this.queryParams);
})
})
.catch(function () {
});
},
// 认证按钮
DeptIndefiUrl(row) {
if (!row.operName || !row.legalPerPhone) {
this.$modal.msgError("当前没有经办人 ,无法认证!!");
return
}
this.$modal.confirm('是否认证?')
.then(function () {
selectDeptIndefiUrl({ id: row.id }).then(res => {
let url = res.data.identifyUrl;
window.open(url)
})
})
.then(() => {
// this.$modal.msgSuccess("认证成功!");
// this.getList(this.queryParams);
})
.catch(function () {
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList(this.queryParams);
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 查询列表数据
getList(parms) {
this.loading = true;
deptIdentifyList(parms).then((response) => {
this.dataList = response.rows;
this.total = response.total;
this.loading = false;
this.dataList.forEach(item => {
if (item.identifyStatus == 0 || item.identifyStatus == null) {
item.identifyStatus = '未认证'
} else if (item.identifyStatus == 2) {
item.identifyStatus = '认证中'
} else if (item.identifyStatus == 1) {
item.identifyStatus = '已认证'
}
if (item.isUse == 0 || item.isUse == null) {
item.isUse = '未启用'
} else {
item.isUse = '已启用'
}
})
});
},
},
};
</script>
<style lang="scss" scoped></style>
@@ -1,182 +0,0 @@
<template>
<div class="app-container">
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="addtemplate">新增调解书模板</el-button>
<!-- v-hasPermi="['caseManagement:list:add']" -->
</el-col>
</el-row>
<el-table v-loading="loading" :data="dataList" style="width: 100%">
<el-table-column label="序号" type="index" align="center">
<template slot-scope="scope">
<span>{{
(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1
}}</span>
</template>
</el-table-column>
<el-table-column label="调解机构名称" align="center" prop="identifyName" :show-overflow-tooltip="true" />
<el-table-column label="调解书名称" align="center" prop="temName" :show-overflow-tooltip="true" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" @click="deleteTemplate(scope.row)" type="text" icon="el-icon-delete">删除</el-button>
<el-button size="mini" @click="eidtTemplate(scope.row)" type="text" icon="el-icon-edit">修改模板</el-button>
<el-button size="mini" @click="grabRulesClick(scope.row)" type="text" icon="el-icon-edit">设置抓取规则</el-button>
<el-button size="mini" @click="templateList(scope.row)" type="text" icon="el-icon-edit">模板字段列表</el-button>
</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList(queryParams)" />
<addTemplate :uploadVisable="uploadVisable" @cancelUpload="cancelUpload" :uploadData="uploadData" @getList="getList" :queryParams="queryParams">
</addTemplate>
<sealManage :sealVisable="sealVisable" @cancelSeal="cancelSeal" :sealData="sealData">
</sealManage>
<editTemplate :editVisable="editVisable" @cancelEdit="cancelEdit" @getList="getList" :editData="editData" :queryParams="queryParams"></editTemplate>
<grabRules :rulesVisable="rulesVisable" @cancelRules="cancelRules" @getList="getList" :rulesData="rulesData" :queryParams="queryParams"></grabRules>
<temmplateList :listVisable="listVisable" @cancelList="cancelList" @getList="getList" :listData="listData" :queryParams="queryParams"></temmplateList>
</div>
</template>
<script>
import {
getTemplate,
deleteTemplate,
getTemplateInfoById
} from "@/api/officialSeal/officialSeal.js";
import addInstitution from "./components/addInstitution";
import addTemplate from "./components/addTemplate";
import sealManage from "./components/sealManage";
import editTemplate from "./components/editTemplate";
import grabRules from "./components/grabRules.vue";
import temmplateList from "./components/temmplateList.vue";
export default {
name: "paymentList",
components: {
addInstitution,
addTemplate,
sealManage,
editTemplate,
grabRules,
temmplateList
},
data() {
return {
queryParams: {
pageNum: 1,
pageSize: 10,
},
// 遮罩层
loading: false,
// 总条数
total: 0,
// 表格数据
form: {},
// 校验表单
rules: {},
dataList: [],
operateVisable: false,//新增弹窗
uploadVisable: false,//上传弹窗
sealVisable: false,//公章列表弹窗
rulesVisable:false,//抓取规则弹窗
uploadData: {},
sealData: {},
editVisable:false,
editData:{},
rulesData:{},
listVisable:false,
listData:{}
};
},
created() {
this.getList(this.queryParams)
},
methods: {
// 删除
deleteTemplate(row) {
this.$modal
.confirm("是否删除")
.then((res) => {
this.deleteSealFn({ id: row.id })
})
},
// 删除接口
deleteSealFn(data) {
deleteTemplate(data).then(res => {
this.$modal.msgSuccess("删除成功!");
this.getList(this.queryParams);
})
},
cancelSeal() {
this.sealVisable = false;
},
// 新增模板
addtemplate(row) {
this.uploadVisable = true;
this.uploadData = row;
},
cancelUpload() {
this.uploadVisable = false;
},
// 编辑
eidtTemplate(row) {
this.editVisable = true;
this.editData = row;
},
cancelEdit() {
this.editVisable = false;
},
// 模板字段列表
templateList(row){
this.listVisable = true;
this.listData = row;
},
cancelList(){
this.listVisable = false;
},
// 抓取规则
grabRulesClick(row){
this.rulesVisable = true;
this.rulesData = row;
},
cancelRules(){
this.rulesVisable = false;
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList(this.queryParams);
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 查询列表数据
getList(parms) {
this.loading = true;
getTemplate(parms).then((response) => {
this.dataList = response.rows;
this.total = response.total;
this.loading = false;
console.log(this.dataList,"LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL");
// this.dataList.forEach(item => {
// if (item.identifyStatus == 0 || item.identifyStatus == null) {
// item.identifyStatus = '未认证'
// } else {
// item.identifyStatus = '已认证'
// }
// if (item.isUse == 0 || item.isUse == null) {
// item.isUse = '未启用'
// } else {
// item.isUse = '已启用'
// }
// })
});
},
},
};
</script>
<style lang="scss" scoped></style>
-140
View File
@@ -1,140 +0,0 @@
<template>
<div class="app-container">
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="addtemplate">新增模板</el-button>
<!-- v-hasPermi="['caseManagement:list:add']" -->
</el-col>
</el-row>
<el-table v-loading="loading" :data="dataList" style="width: 100%">
<el-table-column label="序号" type="index" align="center">
<template slot-scope="scope">
<span>{{
(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1
}}</span>
</template>
</el-table-column>
<el-table-column label="模板名称" align="center" prop="name" :show-overflow-tooltip="true" />
<el-table-column label="模板内容" align="center" prop="content" :show-overflow-tooltip="true" />
<el-table-column label="模板类型" align="center" prop="typeName" :show-overflow-tooltip="true" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" @click="deleteTemplate(scope.row)" type="text" icon="el-icon-delete">删除</el-button>
<el-button size="mini" @click="eidtTemplate(scope.row)" type="text" icon="el-icon-edit">修改模板</el-button>
</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList(queryParams)" />
<addManager :uploadVisable="uploadVisable" @cancelUpload="cancelUpload" :uploadData="uploadData" @getList="getList" :queryParams="queryParams">
</addManager>
<editManager :editVisable="editVisable" @cancelEdit="cancelEdit" @getList="getList" :editData="editData" :queryParams="queryParams"></editManager>
</div>
</template>
<script>
import {
getManagerList,
deleteManager
} from "@/api/officialSeal/officialSeal.js";
import addManager from "./components/addManager";
import editManager from "./components/editManager";
export default {
name: "paymentList",
components: {
addManager,
editManager
},
data() {
return {
queryParams: {
pageNum: 1,
pageSize: 10,
},
// 遮罩层
loading: false,
// 总条数
total: 0,
// 表格数据
form: {},
// 校验表单
rules: {},
dataList: [],
operateVisable: false,//新增弹窗
uploadVisable: false,//上传弹窗
uploadData: {},
sealData: {},
editVisable:false,
editData:{}
};
},
created() {
this.getList(this.queryParams)
},
methods: {
// 删除
deleteTemplate(row) {
this.$modal
.confirm("是否删除")
.then((res) => {
this.deleteSealFn({ id: row.id })
})
},
// 删除接口
deleteSealFn(data) {
deleteManager(data).then(res => {
this.$modal.msgSuccess("删除成功!");
this.getList(this.queryParams);
})
},
// 新增模板
addtemplate(row) {
this.uploadVisable = true;
this.uploadData = row;
},
cancelUpload() {
this.uploadVisable = false;
},
// 编辑
eidtTemplate(row) {
this.editVisable = true;
this.editData = row;
},
cancelEdit() {
this.editVisable = false;
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList(this.queryParams);
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 查询列表数据
getList(parms) {
this.loading = true;
getManagerList(parms).then((response) => {
this.dataList = response.rows;
this.dataList.forEach(item => {
if(item.type == 1){
item.typeName = '裁决内容'
}else if(item.type == 2){
item.typeName = '调解协议'
}else if(item.type == 3){
item.typeName = '金融消费纠纷基本情况'
}
});
this.total = response.total;
this.loading = false;
});
},
},
};
</script>
<style lang="scss" scoped></style>
-12
View File
@@ -1,12 +0,0 @@
<script>
export default {
created() {
const { params, query } = this.$route
const { path } = params
this.$router.replace({ path: '/' + path, query })
},
render: function(h) {
return h() // avoid warning message
}
}
</script>
-322
View File
@@ -1,322 +0,0 @@
<template>
<div class="register">
<el-form ref="registerForm" :model="registerForm" :rules="registerRules" class="register-form">
<h3 class="title">智慧调解系统注册</h3>
<el-form-item prop="userName">
<el-input v-model="registerForm.userName" type="text" auto-complete="off" @blur="changeInput" placeholder="账号">
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
</el-input>
</el-form-item>
<el-form-item prop="passWord">
<el-input v-model="registerForm.passWord" type="password" auto-complete="off" placeholder="密码"
@keyup.enter.native="handleRegister">
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
</el-input>
</el-form-item>
<el-form-item prop="confirmPassword">
<el-input v-model="registerForm.confirmPassword" type="password" auto-complete="off" placeholder="确认密码"
@keyup.enter.native="handleRegister">
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
</el-input>
</el-form-item>
<el-form-item prop="identityNo">
<el-input v-model="registerForm.identityNo" type="text" auto-complete="off" placeholder="身份证号码">
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
</el-input>
</el-form-item>
<el-form-item prop="email">
<el-input v-model="registerForm.email" type="text" auto-complete="off" placeholder="邮箱">
<svg-icon slot="prefix" icon-class="email" class="el-input__icon input-icon" />
</el-input>
</el-form-item>
<el-form-item prop="name">
<el-input v-model="registerForm.name" type="text" auto-complete="off" placeholder="用户名">
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
</el-input>
</el-form-item>
<el-form-item prop="roleId">
<el-select v-model="registerForm.roleId" placeholder="请选择角色" auto-complete="off" style="width: 100%;">
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
<el-option v-for="item in roleList" :key="item.roleId" :label="item.roleName" :value="item.roleId">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="phone">
<el-input v-model="registerForm.phone" auto-complete="off" placeholder="手机号" style="width: 63%">
<svg-icon slot="prefix" icon-class="phone" class="el-input__icon input-icon" />
</el-input>
<div class="register-code">
<el-button type="primary" :disabled="codeDisabled" @click="getCodeNumber(registerForm.phone)">{{ codeText
}}</el-button>
</div>
</el-form-item>
<el-form-item prop="verifyCode">
<el-input v-model="registerForm.verifyCode" type="text" auto-complete="off" placeholder="手机验证码">
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
</el-input>
</el-form-item>
<el-form-item prop="code" v-if="captchaEnabled">
<el-input v-model="registerForm.code" auto-complete="off" placeholder="验证码" style="width: 63%"
@keyup.enter.native="handleRegister">
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
</el-input>
<div class="register-code">
<img :src="codeUrl" @click="getCode" class="register-code-img" />
</div>
</el-form-item>
<el-form-item style="width:100%;">
<el-button :loading="loading" size="medium" type="primary" style="width:100%;"
@click.native.prevent="handleRegister">
<span v-if="!loading">注 册</span>
<span v-else>注 册 中...</span>
</el-button>
<div style="float: right;">
<router-link class="link-type" :to="'/login'">使用已有账户登录</router-link>
</div>
</el-form-item>
</el-form>
<!-- 底部 -->
<!-- <div class="el-register-footer">
<span>Copyright © 2018-2023 ruoyi.vip All Rights Reserved.</span>
</div> -->
</div>
</template>
<script>
import { getCodeImg, register, sendCode, wxregister,verifyUserName } from "@/api/login";
import { listRoleNotoken } from "@/api/system/role.js"
export default {
name: "Register",
data() {
const equalToPassword = (rule, value, callback) => {
if (this.registerForm.passWord !== value) {
callback(new Error("两次输入的密码不一致"));
} else {
callback();
}
};
return {
codeText: "发送验证码",
codeDisabled: false,
codeUrl: "",
registerForm: {
userName: "",
passWord: "",
phone: "",
confirmPassword: "",
code: "",
uuid: "",
},
registerRules: {
userName: [
{ required: true, trigger: "blur", message: "请输入您的账号" },
{ min: 2, max: 20, message: '用户账号长度必须介于 2 和 20 之间', trigger: 'blur' },
{
pattern:
/^[0-9a-zA-Z]*$/g,
message: '只能输入英文或者数字',
trigger: 'blur',
},
],
password: [
{ required: true, trigger: "blur", message: "请输入您的密码" },
{ min: 5, max: 20, message: '用户密码长度必须介于 5 和 20 之间', trigger: 'blur' }
],
confirmPassword: [
{ required: true, trigger: "blur", message: "请再次输入您的密码" },
{ required: true, validator: equalToPassword, trigger: "blur" }
],
code: [{ required: true, trigger: "change", message: "请输入验证码" }],
identityNo: [
{
required: true,
message: '被申请人身份证号不能为空',
trigger: 'blur',
},
{
pattern:
/^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,
message: '请输入正确的身份证号码',
trigger: 'blur',
},
],
email: [
{ required: true, trigger: "blur", message: "请再次输入您的密码" },
{
pattern:
/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/,
message: '请输入正确的邮箱地址',
trigger: 'blur',
},
],
name: [
{ required: true, trigger: "blur", message: "请输入用户名" },
],
roleId: [
{ required: true, trigger: "blur", message: "请选择角色" },
],
phone: [
{
required: true,
message: '请输入手机号',
trigger: 'blur',
},
{
pattern: /^[1][3,4,5,6,7,8,9][0-9]{9}$/,
message: '请输入正确的手机号码',
trigger: 'blur',
},
],
verifyCode: [
{ required: true, trigger: "blur", message: "请输入验证码" },
],
},
loading: false,
captchaEnabled: true,
roleList: []
};
},
created() {
this.getCode();
this.getListRole();
},
methods: {
changeInput(){
verifyUserName({userName:this.registerForm.userName})
},
/**获取角色 */
getListRole() {
listRoleNotoken().then(res => {
const roleList = res.data.filter((item) => item.roleName == '申请人' || item.roleName == '被申请人');
this.roleList = roleList;
})
},
getCode() {
getCodeImg().then(res => {
this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled;
if (this.captchaEnabled) {
this.codeUrl = "data:image/gif;base64," + res.img;
this.registerForm.uuid = res.uuid;
}
});
},
handleRegister() {
this.$refs.registerForm.validate(valid => {
if (valid) {
this.loading = true;
wxregister(this.registerForm).then(res => {
const userName = this.registerForm.userName;
this.$alert("<font color='red'>恭喜你,您的账号 " + userName + " 注册成功!</font>", '系统提示', {
dangerouslyUseHTMLString: true,
type: 'success'
}).then(() => {
this.$router.push("/login");
}).catch(() => { });
}).catch(() => {
this.loading = false;
if (this.captchaEnabled) {
this.getCode();
}
})
}
});
},
getCodeNumber(data) {
sendCode({
phone: data
}).then(res => {
if (res.code != 200) {
this.$modal.msgError(res.msg);
return
} else {
this.$modal.msgSuccess('发送成功');
let time = 60;
let timer = setInterval(() => {
time--;
this.codeDisabled = true;
this.codeText = time + 's重试'
if (time == 0) {
clearInterval(timer)
this.codeText = '发送验证码'
this.codeDisabled = false;
}
}, 1000)
}
})
},
}
};
</script>
<style rel="stylesheet/scss" lang="scss">
.register {
display: flex;
justify-content: center;
align-items: center;
//height: 100%;
background-image: url("../assets/images/login-background.jpg");
background-size: cover;
}
.title {
margin: 0px auto 30px auto;
text-align: center;
color: #707070;
}
.register-form {
border-radius: 6px;
background: #ffffff;
width: 400px;
height: 80%;
padding: 25px 25px 5px 25px;
// .el-input {
// height: 38px;
// input {
// height: 38px;
// }
// }
.input-icon {
height: 39px;
width: 14px;
margin-left: 2px;
}
}
.register-tip {
font-size: 13px;
text-align: center;
color: #bfbfbf;
}
.register-code {
width: 33%;
height: 38px;
float: right;
img {
cursor: pointer;
vertical-align: middle;
}
}
.el-register-footer {
height: 40px;
line-height: 40px;
position: fixed;
bottom: 0;
width: 100%;
text-align: center;
color: #fff;
font-family: Arial;
font-size: 12px;
letter-spacing: 1px;
}
.register-code-img {
height: 38px;
}
</style>
-343
View File
@@ -1,343 +0,0 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="参数名称" prop="configName">
<el-input
v-model="queryParams.configName"
placeholder="请输入参数名称"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="参数键名" prop="configKey">
<el-input
v-model="queryParams.configKey"
placeholder="请输入参数键名"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="系统内置" prop="configType">
<el-select v-model="queryParams.configType" placeholder="系统内置" clearable>
<el-option
v-for="dict in dict.type.sys_yes_no"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="创建时间">
<el-date-picker
v-model="dateRange"
style="width: 240px"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['system:config:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:config:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:config:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['system:config:export']"
>导出</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-refresh"
size="mini"
@click="handleRefreshCache"
v-hasPermi="['system:config:remove']"
>刷新缓存</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="configList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="参数主键" align="center" prop="configId" />
<el-table-column label="参数名称" align="center" prop="configName" :show-overflow-tooltip="true" />
<el-table-column label="参数键名" align="center" prop="configKey" :show-overflow-tooltip="true" />
<el-table-column label="参数键值" align="center" prop="configValue" :show-overflow-tooltip="true" />
<el-table-column label="系统内置" align="center" prop="configType">
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_yes_no" :value="scope.row.configType"/>
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:config:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:config:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改参数配置对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="参数名称" prop="configName">
<el-input v-model="form.configName" placeholder="请输入参数名称" />
</el-form-item>
<el-form-item label="参数键名" prop="configKey">
<el-input v-model="form.configKey" placeholder="请输入参数键名" />
</el-form-item>
<el-form-item label="参数键值" prop="configValue">
<el-input v-model="form.configValue" placeholder="请输入参数键值" />
</el-form-item>
<el-form-item label="系统内置" prop="configType">
<el-radio-group v-model="form.configType">
<el-radio
v-for="dict in dict.type.sys_yes_no"
:key="dict.value"
:label="dict.value"
>{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listConfig, getConfig, delConfig, addConfig, updateConfig, refreshCache } from "@/api/system/config";
export default {
name: "Config",
dicts: ['sys_yes_no'],
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 参数表格数据
configList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 日期范围
dateRange: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
configName: undefined,
configKey: undefined,
configType: undefined
},
// 表单参数
form: {},
// 表单校验
rules: {
configName: [
{ required: true, message: "参数名称不能为空", trigger: "blur" }
],
configKey: [
{ required: true, message: "参数键名不能为空", trigger: "blur" }
],
configValue: [
{ required: true, message: "参数键值不能为空", trigger: "blur" }
]
}
};
},
created() {
this.getList();
},
methods: {
/** 查询参数列表 */
getList() {
this.loading = true;
listConfig(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
this.configList = response.rows;
this.total = response.total;
this.loading = false;
}
);
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
configId: undefined,
configName: undefined,
configKey: undefined,
configValue: undefined,
configType: "Y",
remark: undefined
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = [];
this.resetForm("queryForm");
this.handleQuery();
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加参数";
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.configId)
this.single = selection.length!=1
this.multiple = !selection.length
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const configId = row.configId || this.ids
getConfig(configId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改参数";
});
},
/** 提交按钮 */
submitForm: function() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.configId != undefined) {
updateConfig(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addConfig(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const configIds = row.configId || this.ids;
this.$modal.confirm('是否确认删除参数编号为"' + configIds + '"的数据项?').then(function() {
return delConfig(configIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('system/config/export', {
...this.queryParams
}, `config_${new Date().getTime()}.xlsx`)
},
/** 刷新缓存按钮操作 */
handleRefreshCache() {
refreshCache().then(() => {
this.$modal.msgSuccess("刷新成功");
});
}
}
};
</script>
-331
View File
@@ -1,331 +0,0 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
<el-form-item label="部门名称" prop="deptName">
<el-input v-model="queryParams.deptName" placeholder="请输入部门名称" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="状态" prop="status">
<el-select v-model="queryParams.status" placeholder="部门状态" clearable>
<el-option v-for="dict in dict.type.sys_normal_disable" :key="dict.value" :label="dict.label"
:value="dict.value" />
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd(1)"
v-hasPermi="['system:dept:add']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="info" plain icon="el-icon-sort" size="mini" @click="toggleExpandAll">展开/折叠</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-if="refreshTable" v-loading="loading" :data="deptList" row-key="deptId" :default-expand-all="isExpandAll"
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }">
<el-table-column prop="deptName" label="部门名称" width="260"></el-table-column>
<el-table-column prop="orderNum" label="排序" width="200"></el-table-column>
<el-table-column prop="status" label="状态" width="100">
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status" />
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="200">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['system:dept:edit']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-plus" @click="handleAdd(scope.row)"
v-hasPermi="['system:dept:add']">新增</el-button>
<el-button v-if="scope.row.parentId != 0" size="mini" type="text" icon="el-icon-delete"
@click="handleDelete(scope.row)" v-hasPermi="['system:dept:remove']">删除</el-button>
</template>
</el-table-column>
</el-table>
<!-- 添加或修改部门对话框 -->
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-row>
<!-- <el-col :span="24" v-if="form.parentId !== 0">
<el-form-item label="上级部门" prop="parentId">
<treeselect v-model="form.parentId" :options="deptOptions" :normalizer="normalizer" placeholder="选择上级部门" />
</el-form-item>
</el-col> -->
<el-col :span="24" v-if="flag">
<el-form-item label="上级部门" prop="parentId">
<treeselect v-model="form.parentId" :options="deptOptions" :normalizer="normalizer" placeholder="选择上级部门" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="部门名称" prop="deptName">
<el-input v-model="form.deptName" placeholder="请输入部门名称" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="显示排序" prop="orderNum">
<el-input-number v-model="form.orderNum" controls-position="right" :min="0" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="负责人" prop="leader">
<el-input v-model="form.leader" placeholder="请输入负责人" maxlength="20" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="联系电话" prop="phone">
<el-input v-model="form.phone" placeholder="请输入联系电话" maxlength="11" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="邮箱" prop="email">
<el-input v-model="form.email" placeholder="请输入邮箱" maxlength="50" />
</el-form-item>
</el-col>
<!-- <el-col :span="12">
<el-form-item label="部门类型" prop="deptType">
<el-input v-model="form.deptType" placeholder="请输入部门编码" maxlength="50" />
</el-form-item>
</el-col> -->
<el-col :span="12">
<el-form-item label="部门类型" prop="deptType">
<el-select v-model="form.deptType" placeholder="请选择部门类型">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="部门状态">
<el-radio-group v-model="form.status">
<el-radio v-for="dict in dict.type.sys_normal_disable" :key="dict.value" :label="dict.value">{{ dict.label
}}</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listDept, getDept, delDept, addDept, updateDept, listDeptExcludeChild } from "@/api/system/dept";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default {
name: "Dept",
dicts: ['sys_normal_disable'],
components: { Treeselect },
data() {
return {
flag: false,
// 遮罩层
loading: true,
// 显示搜索条件
showSearch: true,
// 表格树数据
deptList: [],
// 部门树选项
deptOptions: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 是否展开,默认全部展开
isExpandAll: true,
// 重新渲染表格状态
refreshTable: true,
// 查询参数
queryParams: {
deptName: undefined,
status: undefined
},
// 表单参数
form: {},
// 表单校验
rules: {
parentId: [
{ required: true, message: "上级部门不能为空", trigger: "blur" }
],
deptName: [
{ required: true, message: "部门名称不能为空", trigger: "blur" }
],
deptType: [
{ required: true, message: "部门类型不能为空", trigger: "blur" }
],
orderNum: [
{ required: true, message: "显示排序不能为空", trigger: "blur" }
],
email: [
{
type: "email",
message: "请输入正确的邮箱地址",
trigger: ["blur", "change"]
}
],
phone: [
{
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
message: "请输入正确的手机号码",
trigger: "blur"
}
]
},
options: [{
value: 1,
label: '调解机构'
}, {
value: 2,
label: '金融公司'
},],
};
},
created() {
this.getList();
},
methods: {
/** 查询部门列表 */
getList() {
this.loading = true;
listDept(this.queryParams).then(response => {
this.deptList = this.handleTree(response.data, "deptId");
this.loading = false;
});
},
/** 转换部门数据结构 */
normalizer(node) {
if (node.children && !node.children.length) {
delete node.children;
}
return {
id: node.deptId,
label: node.deptName,
children: node.children
};
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
deptId: undefined,
parentId: undefined,
deptName: undefined,
orderNum: undefined,
leader: undefined,
phone: undefined,
email: undefined,
status: "0"
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
/** 新增按钮操作 */
handleAdd(row) {
console.log(row, "LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL");
if (row == 1) {
this.flag = false;
} else {
this.flag = true;
}
this.reset();
if (row != undefined) {
this.form.parentId = row.deptId;
}
this.open = true;
this.title = "添加部门";
listDept().then(response => {
this.deptOptions = this.handleTree(response.data, "deptId");
});
},
/** 展开/折叠操作 */
toggleExpandAll() {
this.refreshTable = false;
this.isExpandAll = !this.isExpandAll;
this.$nextTick(() => {
this.refreshTable = true;
});
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
getDept(row.deptId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改部门";
listDeptExcludeChild(row.deptId).then(response => {
this.deptOptions = this.handleTree(response.data, "deptId");
if (this.deptOptions.length == 0) {
const noResultsOptions = { deptId: this.form.parentId, deptName: this.form.parentName, children: [] };
this.deptOptions.push(noResultsOptions);
}
});
});
},
/** 提交按钮 */
submitForm: function () {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.deptId != undefined) {
updateDept(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addDept(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
this.$modal.confirm('是否确认删除名称为"' + row.deptName + '"的数据项?').then(function () {
return delDept(row.deptId);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => { });
}
}
};
</script>
-402
View File
@@ -1,402 +0,0 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="字典名称" prop="dictType">
<el-select v-model="queryParams.dictType">
<el-option
v-for="item in typeOptions"
:key="item.dictId"
:label="item.dictName"
:value="item.dictType"
/>
</el-select>
</el-form-item>
<el-form-item label="字典标签" prop="dictLabel">
<el-input
v-model="queryParams.dictLabel"
placeholder="请输入字典标签"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="状态" prop="status">
<el-select v-model="queryParams.status" placeholder="数据状态" clearable>
<el-option
v-for="dict in dict.type.sys_normal_disable"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['system:dict:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:dict:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:dict:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['system:dict:export']"
>导出</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-close"
size="mini"
@click="handleClose"
>关闭</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="dataList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="字典编码" align="center" prop="dictCode" />
<el-table-column label="字典标签" align="center" prop="dictLabel">
<template slot-scope="scope">
<span v-if="scope.row.listClass == '' || scope.row.listClass == 'default'">{{scope.row.dictLabel}}</span>
<el-tag v-else :type="scope.row.listClass == 'primary' ? '' : scope.row.listClass">{{scope.row.dictLabel}}</el-tag>
</template>
</el-table-column>
<el-table-column label="字典键值" align="center" prop="dictValue" />
<el-table-column label="字典排序" align="center" prop="dictSort" />
<el-table-column label="状态" align="center" prop="status">
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:dict:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:dict:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改参数配置对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="字典类型">
<el-input v-model="form.dictType" :disabled="true" />
</el-form-item>
<el-form-item label="数据标签" prop="dictLabel">
<el-input v-model="form.dictLabel" placeholder="请输入数据标签" />
</el-form-item>
<el-form-item label="数据键值" prop="dictValue">
<el-input v-model="form.dictValue" placeholder="请输入数据键值" />
</el-form-item>
<el-form-item label="样式属性" prop="cssClass">
<el-input v-model="form.cssClass" placeholder="请输入样式属性" />
</el-form-item>
<el-form-item label="显示排序" prop="dictSort">
<el-input-number v-model="form.dictSort" controls-position="right" :min="0" />
</el-form-item>
<el-form-item label="回显样式" prop="listClass">
<el-select v-model="form.listClass">
<el-option
v-for="item in listClassOptions"
:key="item.value"
:label="item.label + '(' + item.value + ')'"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="状态" prop="status">
<el-radio-group v-model="form.status">
<el-radio
v-for="dict in dict.type.sys_normal_disable"
:key="dict.value"
:label="dict.value"
>{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listData, getData, delData, addData, updateData } from "@/api/system/dict/data";
import { optionselect as getDictOptionselect, getType } from "@/api/system/dict/type";
export default {
name: "Data",
dicts: ['sys_normal_disable'],
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 字典表格数据
dataList: [],
// 默认字典类型
defaultDictType: "",
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 数据标签回显样式
listClassOptions: [
{
value: "default",
label: "默认"
},
{
value: "primary",
label: "主要"
},
{
value: "success",
label: "成功"
},
{
value: "info",
label: "信息"
},
{
value: "warning",
label: "警告"
},
{
value: "danger",
label: "危险"
}
],
// 类型数据字典
typeOptions: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
dictName: undefined,
dictType: undefined,
status: undefined
},
// 表单参数
form: {},
// 表单校验
rules: {
dictLabel: [
{ required: true, message: "数据标签不能为空", trigger: "blur" }
],
dictValue: [
{ required: true, message: "数据键值不能为空", trigger: "blur" }
],
dictSort: [
{ required: true, message: "数据顺序不能为空", trigger: "blur" }
]
}
};
},
created() {
const dictId = this.$route.params && this.$route.params.dictId;
this.getType(dictId);
this.getTypeList();
},
methods: {
/** 查询字典类型详细 */
getType(dictId) {
getType(dictId).then(response => {
this.queryParams.dictType = response.data.dictType;
this.defaultDictType = response.data.dictType;
this.getList();
});
},
/** 查询字典类型列表 */
getTypeList() {
getDictOptionselect().then(response => {
this.typeOptions = response.data;
});
},
/** 查询字典数据列表 */
getList() {
this.loading = true;
listData(this.queryParams).then(response => {
this.dataList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
dictCode: undefined,
dictLabel: undefined,
dictValue: undefined,
cssClass: undefined,
listClass: 'default',
dictSort: 0,
status: "0",
remark: undefined
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 返回按钮操作 */
handleClose() {
const obj = { path: "/system/dict" };
this.$tab.closeOpenPage(obj);
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.queryParams.dictType = this.defaultDictType;
this.handleQuery();
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加字典数据";
this.form.dictType = this.queryParams.dictType;
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.dictCode)
this.single = selection.length!=1
this.multiple = !selection.length
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const dictCode = row.dictCode || this.ids
getData(dictCode).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改字典数据";
});
},
/** 提交按钮 */
submitForm: function() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.dictCode != undefined) {
updateData(this.form).then(response => {
this.$store.dispatch('dict/removeDict', this.queryParams.dictType);
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addData(this.form).then(response => {
this.$store.dispatch('dict/removeDict', this.queryParams.dictType);
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const dictCodes = row.dictCode || this.ids;
this.$modal.confirm('是否确认删除字典编码为"' + dictCodes + '"的数据项?').then(function() {
return delData(dictCodes);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
this.$store.dispatch('dict/removeDict', this.queryParams.dictType);
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('system/dict/data/export', {
...this.queryParams
}, `data_${new Date().getTime()}.xlsx`)
}
}
};
</script>
-347
View File
@@ -1,347 +0,0 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="字典名称" prop="dictName">
<el-input
v-model="queryParams.dictName"
placeholder="请输入字典名称"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="字典类型" prop="dictType">
<el-input
v-model="queryParams.dictType"
placeholder="请输入字典类型"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="状态" prop="status">
<el-select
v-model="queryParams.status"
placeholder="字典状态"
clearable
style="width: 240px"
>
<el-option
v-for="dict in dict.type.sys_normal_disable"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="创建时间">
<el-date-picker
v-model="dateRange"
style="width: 240px"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['system:dict:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:dict:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:dict:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['system:dict:export']"
>导出</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-refresh"
size="mini"
@click="handleRefreshCache"
v-hasPermi="['system:dict:remove']"
>刷新缓存</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="typeList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="字典编号" align="center" prop="dictId" />
<el-table-column label="字典名称" align="center" prop="dictName" :show-overflow-tooltip="true" />
<el-table-column label="字典类型" align="center" :show-overflow-tooltip="true">
<template slot-scope="scope">
<router-link :to="'/system/dict-data/index/' + scope.row.dictId" class="link-type">
<span>{{ scope.row.dictType }}</span>
</router-link>
</template>
</el-table-column>
<el-table-column label="状态" align="center" prop="status">
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:dict:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:dict:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改参数配置对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="字典名称" prop="dictName">
<el-input v-model="form.dictName" placeholder="请输入字典名称" />
</el-form-item>
<el-form-item label="字典类型" prop="dictType">
<el-input v-model="form.dictType" placeholder="请输入字典类型" />
</el-form-item>
<el-form-item label="状态" prop="status">
<el-radio-group v-model="form.status">
<el-radio
v-for="dict in dict.type.sys_normal_disable"
:key="dict.value"
:label="dict.value"
>{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listType, getType, delType, addType, updateType, refreshCache } from "@/api/system/dict/type";
export default {
name: "Dict",
dicts: ['sys_normal_disable'],
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 字典表格数据
typeList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 日期范围
dateRange: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
dictName: undefined,
dictType: undefined,
status: undefined
},
// 表单参数
form: {},
// 表单校验
rules: {
dictName: [
{ required: true, message: "字典名称不能为空", trigger: "blur" }
],
dictType: [
{ required: true, message: "字典类型不能为空", trigger: "blur" }
]
}
};
},
created() {
this.getList();
},
methods: {
/** 查询字典类型列表 */
getList() {
this.loading = true;
listType(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
this.typeList = response.rows;
this.total = response.total;
this.loading = false;
}
);
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
dictId: undefined,
dictName: undefined,
dictType: undefined,
status: "0",
remark: undefined
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = [];
this.resetForm("queryForm");
this.handleQuery();
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加字典类型";
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.dictId)
this.single = selection.length!=1
this.multiple = !selection.length
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const dictId = row.dictId || this.ids
getType(dictId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改字典类型";
});
},
/** 提交按钮 */
submitForm: function() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.dictId != undefined) {
updateType(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addType(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const dictIds = row.dictId || this.ids;
this.$modal.confirm('是否确认删除字典编号为"' + dictIds + '"的数据项?').then(function() {
return delType(dictIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('system/dict/type/export', {
...this.queryParams
}, `type_${new Date().getTime()}.xlsx`)
},
/** 刷新缓存按钮操作 */
handleRefreshCache() {
refreshCache().then(() => {
this.$modal.msgSuccess("刷新成功");
this.$store.dispatch('dict/cleanDict');
});
}
}
};
</script>
-452
View File
@@ -1,452 +0,0 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
<el-form-item label="菜单名称" prop="menuName">
<el-input
v-model="queryParams.menuName"
placeholder="请输入菜单名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="状态" prop="status">
<el-select v-model="queryParams.status" placeholder="菜单状态" clearable>
<el-option
v-for="dict in dict.type.sys_normal_disable"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['system:menu:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="info"
plain
icon="el-icon-sort"
size="mini"
@click="toggleExpandAll"
>展开/折叠</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table
v-if="refreshTable"
v-loading="loading"
:data="menuList"
row-key="menuId"
:default-expand-all="isExpandAll"
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
>
<el-table-column prop="menuName" label="菜单名称" :show-overflow-tooltip="true" width="160"></el-table-column>
<el-table-column prop="icon" label="图标" align="center" width="100">
<template slot-scope="scope">
<svg-icon :icon-class="scope.row.icon" />
</template>
</el-table-column>
<el-table-column prop="orderNum" label="排序" width="60"></el-table-column>
<el-table-column prop="perms" label="权限标识" :show-overflow-tooltip="true"></el-table-column>
<el-table-column prop="component" label="组件路径" :show-overflow-tooltip="true"></el-table-column>
<el-table-column prop="status" label="状态" width="80">
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:menu:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-plus"
@click="handleAdd(scope.row)"
v-hasPermi="['system:menu:add']"
>新增</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:menu:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<!-- 添加或修改菜单对话框 -->
<el-dialog :title="title" :visible.sync="open" width="680px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-row>
<el-col :span="24">
<el-form-item label="上级菜单" prop="parentId">
<treeselect
v-model="form.parentId"
:options="menuOptions"
:normalizer="normalizer"
:show-count="true"
placeholder="选择上级菜单"
/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="菜单类型" prop="menuType">
<el-radio-group v-model="form.menuType">
<el-radio label="M">目录</el-radio>
<el-radio label="C">菜单</el-radio>
<el-radio label="F">按钮</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="24" v-if="form.menuType != 'F'">
<el-form-item label="菜单图标" prop="icon">
<el-popover
placement="bottom-start"
width="460"
trigger="click"
@show="$refs['iconSelect'].reset()"
>
<IconSelect ref="iconSelect" @selected="selected" :active-icon="form.icon" />
<el-input slot="reference" v-model="form.icon" placeholder="点击选择图标" readonly>
<svg-icon
v-if="form.icon"
slot="prefix"
:icon-class="form.icon"
style="width: 25px;"
/>
<i v-else slot="prefix" class="el-icon-search el-input__icon" />
</el-input>
</el-popover>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="菜单名称" prop="menuName">
<el-input v-model="form.menuName" placeholder="请输入菜单名称" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="显示排序" prop="orderNum">
<el-input-number v-model="form.orderNum" controls-position="right" :min="0" />
</el-form-item>
</el-col>
<el-col :span="12" v-if="form.menuType != 'F'">
<el-form-item prop="isFrame">
<span slot="label">
<el-tooltip content="选择是外链则路由地址需要以`http(s)://`开头" placement="top">
<i class="el-icon-question"></i>
</el-tooltip>
是否外链
</span>
<el-radio-group v-model="form.isFrame">
<el-radio label="0">是</el-radio>
<el-radio label="1">否</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12" v-if="form.menuType != 'F'">
<el-form-item prop="path">
<span slot="label">
<el-tooltip content="访问的路由地址,如:`user`,如外网地址需内链访问则以`http(s)://`开头" placement="top">
<i class="el-icon-question"></i>
</el-tooltip>
路由地址
</span>
<el-input v-model="form.path" placeholder="请输入路由地址" />
</el-form-item>
</el-col>
<el-col :span="12" v-if="form.menuType == 'C'">
<el-form-item prop="component">
<span slot="label">
<el-tooltip content="访问的组件路径,如:`system/user/index`,默认在`views`目录下" placement="top">
<i class="el-icon-question"></i>
</el-tooltip>
组件路径
</span>
<el-input v-model="form.component" placeholder="请输入组件路径" />
</el-form-item>
</el-col>
<el-col :span="12" v-if="form.menuType != 'M'">
<el-form-item prop="perms">
<el-input v-model="form.perms" placeholder="请输入权限标识" maxlength="100" />
<span slot="label">
<el-tooltip content="控制器中定义的权限字符,如:@PreAuthorize(`@ss.hasPermi('system:user:list')`)" placement="top">
<i class="el-icon-question"></i>
</el-tooltip>
权限字符
</span>
</el-form-item>
</el-col>
<el-col :span="12" v-if="form.menuType == 'C'">
<el-form-item prop="query">
<el-input v-model="form.query" placeholder="请输入路由参数" maxlength="255" />
<span slot="label">
<el-tooltip content='访问路由的默认传递参数,如:`{"id": 1, "name": "ry"}`' placement="top">
<i class="el-icon-question"></i>
</el-tooltip>
路由参数
</span>
</el-form-item>
</el-col>
<el-col :span="12" v-if="form.menuType == 'C'">
<el-form-item prop="isCache">
<span slot="label">
<el-tooltip content="选择是则会被`keep-alive`缓存,需要匹配组件的`name`和地址保持一致" placement="top">
<i class="el-icon-question"></i>
</el-tooltip>
是否缓存
</span>
<el-radio-group v-model="form.isCache">
<el-radio label="0">缓存</el-radio>
<el-radio label="1">不缓存</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12" v-if="form.menuType != 'F'">
<el-form-item prop="visible">
<span slot="label">
<el-tooltip content="选择隐藏则路由将不会出现在侧边栏,但仍然可以访问" placement="top">
<i class="el-icon-question"></i>
</el-tooltip>
显示状态
</span>
<el-radio-group v-model="form.visible">
<el-radio
v-for="dict in dict.type.sys_show_hide"
:key="dict.value"
:label="dict.value"
>{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12" v-if="form.menuType != 'F'">
<el-form-item prop="status">
<span slot="label">
<el-tooltip content="选择停用则路由将不会出现在侧边栏,也不能被访问" placement="top">
<i class="el-icon-question"></i>
</el-tooltip>
菜单状态
</span>
<el-radio-group v-model="form.status">
<el-radio
v-for="dict in dict.type.sys_normal_disable"
:key="dict.value"
:label="dict.value"
>{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listMenu, getMenu, delMenu, addMenu, updateMenu } from "@/api/system/menu";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import IconSelect from "@/components/IconSelect";
export default {
name: "Menu",
dicts: ['sys_show_hide', 'sys_normal_disable'],
components: { Treeselect, IconSelect },
data() {
return {
// 遮罩层
loading: true,
// 显示搜索条件
showSearch: true,
// 菜单表格树数据
menuList: [],
// 菜单树选项
menuOptions: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 是否展开,默认全部折叠
isExpandAll: false,
// 重新渲染表格状态
refreshTable: true,
// 查询参数
queryParams: {
menuName: undefined,
visible: undefined
},
// 表单参数
form: {},
// 表单校验
rules: {
menuName: [
{ required: true, message: "菜单名称不能为空", trigger: "blur" }
],
orderNum: [
{ required: true, message: "菜单顺序不能为空", trigger: "blur" }
],
path: [
{ required: true, message: "路由地址不能为空", trigger: "blur" }
]
}
};
},
created() {
this.getList();
},
methods: {
// 选择图标
selected(name) {
this.form.icon = name;
},
/** 查询菜单列表 */
getList() {
this.loading = true;
listMenu(this.queryParams).then(response => {
this.menuList = this.handleTree(response.data, "menuId");
this.loading = false;
});
},
/** 转换菜单数据结构 */
normalizer(node) {
if (node.children && !node.children.length) {
delete node.children;
}
return {
id: node.menuId,
label: node.menuName,
children: node.children
};
},
/** 查询菜单下拉树结构 */
getTreeselect() {
listMenu().then(response => {
this.menuOptions = [];
const menu = { menuId: 0, menuName: '主类目', children: [] };
menu.children = this.handleTree(response.data, "menuId");
this.menuOptions.push(menu);
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
menuId: undefined,
parentId: 0,
menuName: undefined,
icon: undefined,
menuType: "M",
orderNum: undefined,
isFrame: "1",
isCache: "0",
visible: "0",
status: "0"
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
/** 新增按钮操作 */
handleAdd(row) {
this.reset();
this.getTreeselect();
if (row != null && row.menuId) {
this.form.parentId = row.menuId;
} else {
this.form.parentId = 0;
}
this.open = true;
this.title = "添加菜单";
},
/** 展开/折叠操作 */
toggleExpandAll() {
this.refreshTable = false;
this.isExpandAll = !this.isExpandAll;
this.$nextTick(() => {
this.refreshTable = true;
});
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
this.getTreeselect();
getMenu(row.menuId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改菜单";
});
},
/** 提交按钮 */
submitForm: function() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.menuId != undefined) {
updateMenu(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addMenu(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
this.$modal.confirm('是否确认删除名称为"' + row.menuName + '"的数据项?').then(function() {
return delMenu(row.menuId);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
}
}
};
</script>
-312
View File
@@ -1,312 +0,0 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="公告标题" prop="noticeTitle">
<el-input
v-model="queryParams.noticeTitle"
placeholder="请输入公告标题"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="操作人员" prop="createBy">
<el-input
v-model="queryParams.createBy"
placeholder="请输入操作人员"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="类型" prop="noticeType">
<el-select v-model="queryParams.noticeType" placeholder="公告类型" clearable>
<el-option
v-for="dict in dict.type.sys_notice_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['system:notice:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:notice:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:notice:remove']"
>删除</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="noticeList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" prop="noticeId" width="100" />
<el-table-column
label="公告标题"
align="center"
prop="noticeTitle"
:show-overflow-tooltip="true"
/>
<el-table-column label="公告类型" align="center" prop="noticeType" width="100">
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_notice_type" :value="scope.row.noticeType"/>
</template>
</el-table-column>
<el-table-column label="状态" align="center" prop="status" width="100">
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_notice_status" :value="scope.row.status"/>
</template>
</el-table-column>
<el-table-column label="创建者" align="center" prop="createBy" width="100" />
<el-table-column label="创建时间" align="center" prop="createTime" width="100">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:notice:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:notice:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改公告对话框 -->
<el-dialog :title="title" :visible.sync="open" width="780px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-row>
<el-col :span="12">
<el-form-item label="公告标题" prop="noticeTitle">
<el-input v-model="form.noticeTitle" placeholder="请输入公告标题" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="公告类型" prop="noticeType">
<el-select v-model="form.noticeType" placeholder="请选择公告类型">
<el-option
v-for="dict in dict.type.sys_notice_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="状态">
<el-radio-group v-model="form.status">
<el-radio
v-for="dict in dict.type.sys_notice_status"
:key="dict.value"
:label="dict.value"
>{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="内容">
<editor v-model="form.noticeContent" :min-height="192"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listNotice, getNotice, delNotice, addNotice, updateNotice } from "@/api/system/notice";
export default {
name: "Notice",
dicts: ['sys_notice_status', 'sys_notice_type'],
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 公告表格数据
noticeList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
noticeTitle: undefined,
createBy: undefined,
status: undefined
},
// 表单参数
form: {},
// 表单校验
rules: {
noticeTitle: [
{ required: true, message: "公告标题不能为空", trigger: "blur" }
],
noticeType: [
{ required: true, message: "公告类型不能为空", trigger: "change" }
]
}
};
},
created() {
this.getList();
},
methods: {
/** 查询公告列表 */
getList() {
this.loading = true;
listNotice(this.queryParams).then(response => {
this.noticeList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
noticeId: undefined,
noticeTitle: undefined,
noticeType: undefined,
noticeContent: undefined,
status: "0"
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.noticeId)
this.single = selection.length!=1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加公告";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const noticeId = row.noticeId || this.ids
getNotice(noticeId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改公告";
});
},
/** 提交按钮 */
submitForm: function() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.noticeId != undefined) {
updateNotice(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addNotice(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const noticeIds = row.noticeId || this.ids
this.$modal.confirm('是否确认删除公告编号为"' + noticeIds + '"的数据项?').then(function() {
return delNotice(noticeIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
}
}
};
</script>
-309
View File
@@ -1,309 +0,0 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="岗位编码" prop="postCode">
<el-input
v-model="queryParams.postCode"
placeholder="请输入岗位编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="岗位名称" prop="postName">
<el-input
v-model="queryParams.postName"
placeholder="请输入岗位名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="状态" prop="status">
<el-select v-model="queryParams.status" placeholder="岗位状态" clearable>
<el-option
v-for="dict in dict.type.sys_normal_disable"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['system:post:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:post:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:post:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['system:post:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="岗位编号" align="center" prop="postId" />
<el-table-column label="岗位编码" align="center" prop="postCode" />
<el-table-column label="岗位名称" align="center" prop="postName" />
<el-table-column label="岗位排序" align="center" prop="postSort" />
<el-table-column label="状态" align="center" prop="status">
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:post:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:post:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改岗位对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="岗位名称" prop="postName">
<el-input v-model="form.postName" placeholder="请输入岗位名称" />
</el-form-item>
<el-form-item label="岗位编码" prop="postCode">
<el-input v-model="form.postCode" placeholder="请输入编码名称" />
</el-form-item>
<el-form-item label="岗位顺序" prop="postSort">
<el-input-number v-model="form.postSort" controls-position="right" :min="0" />
</el-form-item>
<el-form-item label="岗位状态" prop="status">
<el-radio-group v-model="form.status">
<el-radio
v-for="dict in dict.type.sys_normal_disable"
:key="dict.value"
:label="dict.value"
>{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listPost, getPost, delPost, addPost, updatePost } from "@/api/system/post";
export default {
name: "Post",
dicts: ['sys_normal_disable'],
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 岗位表格数据
postList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
postCode: undefined,
postName: undefined,
status: undefined
},
// 表单参数
form: {},
// 表单校验
rules: {
postName: [
{ required: true, message: "岗位名称不能为空", trigger: "blur" }
],
postCode: [
{ required: true, message: "岗位编码不能为空", trigger: "blur" }
],
postSort: [
{ required: true, message: "岗位顺序不能为空", trigger: "blur" }
]
}
};
},
created() {
this.getList();
},
methods: {
/** 查询岗位列表 */
getList() {
this.loading = true;
listPost(this.queryParams).then(response => {
this.postList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
postId: undefined,
postCode: undefined,
postName: undefined,
postSort: 0,
status: "0",
remark: undefined
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.postId)
this.single = selection.length!=1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加岗位";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const postId = row.postId || this.ids
getPost(postId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改岗位";
});
},
/** 提交按钮 */
submitForm: function() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.postId != undefined) {
updatePost(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addPost(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const postIds = row.postId || this.ids;
this.$modal.confirm('是否确认删除岗位编号为"' + postIds + '"的数据项?').then(function() {
return delPost(postIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('system/post/export', {
...this.queryParams
}, `post_${new Date().getTime()}.xlsx`)
}
}
};
</script>
-199
View File
@@ -1,199 +0,0 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
<el-form-item label="用户名称" prop="userName">
<el-input
v-model="queryParams.userName"
placeholder="请输入用户名称"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="手机号码" prop="phonenumber">
<el-input
v-model="queryParams.phonenumber"
placeholder="请输入手机号码"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="openSelectUser"
v-hasPermi="['system:role:add']"
>添加用户</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-circle-close"
size="mini"
:disabled="multiple"
@click="cancelAuthUserAll"
v-hasPermi="['system:role:remove']"
>批量取消授权</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-close"
size="mini"
@click="handleClose"
>关闭</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="用户名称" prop="userName" :show-overflow-tooltip="true" />
<el-table-column label="用户昵称" prop="nickName" :show-overflow-tooltip="true" />
<el-table-column label="邮箱" prop="email" :show-overflow-tooltip="true" />
<el-table-column label="手机" prop="phonenumber" :show-overflow-tooltip="true" />
<el-table-column label="状态" align="center" prop="status">
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-circle-close"
@click="cancelAuthUser(scope.row)"
v-hasPermi="['system:role:remove']"
>取消授权</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<select-user ref="select" :roleId="queryParams.roleId" @ok="handleQuery" />
</div>
</template>
<script>
import { allocatedUserList, authUserCancel, authUserCancelAll } from "@/api/system/role";
import selectUser from "./selectUser";
export default {
name: "AuthUser",
dicts: ['sys_normal_disable'],
components: { selectUser },
data() {
return {
// 遮罩层
loading: true,
// 选中用户组
userIds: [],
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 用户表格数据
userList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
roleId: undefined,
userName: undefined,
phonenumber: undefined
}
};
},
created() {
const roleId = this.$route.params && this.$route.params.roleId;
if (roleId) {
this.queryParams.roleId = roleId;
this.getList();
}
},
methods: {
/** 查询授权用户列表 */
getList() {
this.loading = true;
allocatedUserList(this.queryParams).then(response => {
this.userList = response.rows;
this.total = response.total;
this.loading = false;
}
);
},
// 返回按钮
handleClose() {
const obj = { path: "/system/role" };
this.$tab.closeOpenPage(obj);
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.userIds = selection.map(item => item.userId)
this.multiple = !selection.length
},
/** 打开授权用户表弹窗 */
openSelectUser() {
this.$refs.select.show();
},
/** 取消授权按钮操作 */
cancelAuthUser(row) {
const roleId = this.queryParams.roleId;
this.$modal.confirm('确认要取消该用户"' + row.userName + '"角色吗?').then(function() {
return authUserCancel({ userId: row.userId, roleId: roleId });
}).then(() => {
this.getList();
this.$modal.msgSuccess("取消授权成功");
}).catch(() => {});
},
/** 批量取消授权按钮操作 */
cancelAuthUserAll(row) {
const roleId = this.queryParams.roleId;
const userIds = this.userIds.join(",");
this.$modal.confirm('是否取消选中用户授权数据项?').then(function() {
return authUserCancelAll({ roleId: roleId, userIds: userIds });
}).then(() => {
this.getList();
this.$modal.msgSuccess("取消授权成功");
}).catch(() => {});
}
}
};
</script>
-605
View File
@@ -1,605 +0,0 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
<el-form-item label="角色名称" prop="roleName">
<el-input
v-model="queryParams.roleName"
placeholder="请输入角色名称"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="权限字符" prop="roleKey">
<el-input
v-model="queryParams.roleKey"
placeholder="请输入权限字符"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="状态" prop="status">
<el-select
v-model="queryParams.status"
placeholder="角色状态"
clearable
style="width: 240px"
>
<el-option
v-for="dict in dict.type.sys_normal_disable"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="创建时间">
<el-date-picker
v-model="dateRange"
style="width: 240px"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['system:role:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:role:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:role:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['system:role:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="roleList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="角色编号" prop="roleId" width="120" />
<el-table-column label="角色名称" prop="roleName" :show-overflow-tooltip="true" width="150" />
<el-table-column label="权限字符" prop="roleKey" :show-overflow-tooltip="true" width="150" />
<el-table-column label="显示顺序" prop="roleSort" width="100" />
<el-table-column label="状态" align="center" width="100">
<template slot-scope="scope">
<el-switch
v-model="scope.row.status"
active-value="0"
inactive-value="1"
@change="handleStatusChange(scope.row)"
></el-switch>
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope" v-if="scope.row.roleId !== 1">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:role:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:role:remove']"
>删除</el-button>
<el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['system:role:edit']">
<el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="handleDataScope" icon="el-icon-circle-check"
v-hasPermi="['system:role:edit']">数据权限</el-dropdown-item>
<el-dropdown-item command="handleAuthUser" icon="el-icon-user"
v-hasPermi="['system:role:edit']">分配用户</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改角色配置对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="角色名称" prop="roleName">
<el-input v-model="form.roleName" placeholder="请输入角色名称" />
</el-form-item>
<el-form-item prop="roleKey">
<span slot="label">
<el-tooltip content="控制器中定义的权限字符,如:@PreAuthorize(`@ss.hasRole('admin')`)" placement="top">
<i class="el-icon-question"></i>
</el-tooltip>
权限字符
</span>
<el-input v-model="form.roleKey" placeholder="请输入权限字符" />
</el-form-item>
<el-form-item label="角色顺序" prop="roleSort">
<el-input-number v-model="form.roleSort" controls-position="right" :min="0" />
</el-form-item>
<el-form-item label="状态">
<el-radio-group v-model="form.status">
<el-radio
v-for="dict in dict.type.sys_normal_disable"
:key="dict.value"
:label="dict.value"
>{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="菜单权限">
<el-checkbox v-model="menuExpand" @change="handleCheckedTreeExpand($event, 'menu')">展开/折叠</el-checkbox>
<el-checkbox v-model="menuNodeAll" @change="handleCheckedTreeNodeAll($event, 'menu')">全选/全不选</el-checkbox>
<el-checkbox v-model="form.menuCheckStrictly" @change="handleCheckedTreeConnect($event, 'menu')">父子联动</el-checkbox>
<el-tree
class="tree-border"
:data="menuOptions"
show-checkbox
ref="menu"
node-key="id"
:check-strictly="!form.menuCheckStrictly"
empty-text="加载中,请稍候"
:props="defaultProps"
></el-tree>
</el-form-item>
<el-form-item label="备注">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
<!-- 分配角色数据权限对话框 -->
<el-dialog :title="title" :visible.sync="openDataScope" width="500px" append-to-body>
<el-form :model="form" label-width="80px">
<el-form-item label="角色名称">
<el-input v-model="form.roleName" :disabled="true" />
</el-form-item>
<el-form-item label="权限字符">
<el-input v-model="form.roleKey" :disabled="true" />
</el-form-item>
<el-form-item label="权限范围">
<el-select v-model="form.dataScope" @change="dataScopeSelectChange">
<el-option
v-for="item in dataScopeOptions"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="数据权限" v-show="form.dataScope == 2">
<el-checkbox v-model="deptExpand" @change="handleCheckedTreeExpand($event, 'dept')">展开/折叠</el-checkbox>
<el-checkbox v-model="deptNodeAll" @change="handleCheckedTreeNodeAll($event, 'dept')">全选/全不选</el-checkbox>
<el-checkbox v-model="form.deptCheckStrictly" @change="handleCheckedTreeConnect($event, 'dept')">父子联动</el-checkbox>
<el-tree
class="tree-border"
:data="deptOptions"
show-checkbox
default-expand-all
ref="dept"
node-key="id"
:check-strictly="!form.deptCheckStrictly"
empty-text="加载中,请稍候"
:props="defaultProps"
></el-tree>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitDataScope">确 定</el-button>
<el-button @click="cancelDataScope">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listRole, getRole, delRole, addRole, updateRole, dataScope, changeRoleStatus, deptTreeSelect } from "@/api/system/role";
import { treeselect as menuTreeselect, roleMenuTreeselect } from "@/api/system/menu";
export default {
name: "Role",
dicts: ['sys_normal_disable'],
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 角色表格数据
roleList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 是否显示弹出层(数据权限)
openDataScope: false,
menuExpand: false,
menuNodeAll: false,
deptExpand: true,
deptNodeAll: false,
// 日期范围
dateRange: [],
// 数据范围选项
dataScopeOptions: [
{
value: "1",
label: "全部数据权限"
},
{
value: "2",
label: "自定数据权限"
},
{
value: "3",
label: "本部门数据权限"
},
{
value: "4",
label: "本部门及以下数据权限"
},
{
value: "5",
label: "仅本人数据权限"
}
],
// 菜单列表
menuOptions: [],
// 部门列表
deptOptions: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
roleName: undefined,
roleKey: undefined,
status: undefined
},
// 表单参数
form: {},
defaultProps: {
children: "children",
label: "label"
},
// 表单校验
rules: {
roleName: [
{ required: true, message: "角色名称不能为空", trigger: "blur" }
],
roleKey: [
{ required: true, message: "权限字符不能为空", trigger: "blur" }
],
roleSort: [
{ required: true, message: "角色顺序不能为空", trigger: "blur" }
]
}
};
},
created() {
this.getList();
},
methods: {
/** 查询角色列表 */
getList() {
this.loading = true;
listRole(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
this.roleList = response.rows;
this.total = response.total;
this.loading = false;
}
);
},
/** 查询菜单树结构 */
getMenuTreeselect() {
menuTreeselect().then(response => {
this.menuOptions = response.data;
});
},
// 所有菜单节点数据
getMenuAllCheckedKeys() {
// 目前被选中的菜单节点
let checkedKeys = this.$refs.menu.getCheckedKeys();
// 半选中的菜单节点
let halfCheckedKeys = this.$refs.menu.getHalfCheckedKeys();
checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys);
return checkedKeys;
},
// 所有部门节点数据
getDeptAllCheckedKeys() {
// 目前被选中的部门节点
let checkedKeys = this.$refs.dept.getCheckedKeys();
// 半选中的部门节点
let halfCheckedKeys = this.$refs.dept.getHalfCheckedKeys();
checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys);
return checkedKeys;
},
/** 根据角色ID查询菜单树结构 */
getRoleMenuTreeselect(roleId) {
return roleMenuTreeselect(roleId).then(response => {
this.menuOptions = response.menus;
return response;
});
},
/** 根据角色ID查询部门树结构 */
getDeptTree(roleId) {
return deptTreeSelect(roleId).then(response => {
this.deptOptions = response.depts;
return response;
});
},
// 角色状态修改
handleStatusChange(row) {
let text = row.status === "0" ? "启用" : "停用";
this.$modal.confirm('确认要"' + text + '""' + row.roleName + '"角色吗?').then(function() {
return changeRoleStatus(row.roleId, row.status);
}).then(() => {
this.$modal.msgSuccess(text + "成功");
}).catch(function() {
row.status = row.status === "0" ? "1" : "0";
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 取消按钮(数据权限)
cancelDataScope() {
this.openDataScope = false;
this.reset();
},
// 表单重置
reset() {
if (this.$refs.menu != undefined) {
this.$refs.menu.setCheckedKeys([]);
}
this.menuExpand = false,
this.menuNodeAll = false,
this.deptExpand = true,
this.deptNodeAll = false,
this.form = {
roleId: undefined,
roleName: undefined,
roleKey: undefined,
roleSort: 0,
status: "0",
menuIds: [],
deptIds: [],
menuCheckStrictly: true,
deptCheckStrictly: true,
remark: undefined
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = [];
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.roleId)
this.single = selection.length!=1
this.multiple = !selection.length
},
// 更多操作触发
handleCommand(command, row) {
switch (command) {
case "handleDataScope":
this.handleDataScope(row);
break;
case "handleAuthUser":
this.handleAuthUser(row);
break;
default:
break;
}
},
// 树权限(展开/折叠)
handleCheckedTreeExpand(value, type) {
if (type == 'menu') {
let treeList = this.menuOptions;
for (let i = 0; i < treeList.length; i++) {
this.$refs.menu.store.nodesMap[treeList[i].id].expanded = value;
}
} else if (type == 'dept') {
let treeList = this.deptOptions;
for (let i = 0; i < treeList.length; i++) {
this.$refs.dept.store.nodesMap[treeList[i].id].expanded = value;
}
}
},
// 树权限(全选/全不选)
handleCheckedTreeNodeAll(value, type) {
if (type == 'menu') {
this.$refs.menu.setCheckedNodes(value ? this.menuOptions: []);
} else if (type == 'dept') {
this.$refs.dept.setCheckedNodes(value ? this.deptOptions: []);
}
},
// 树权限(父子联动)
handleCheckedTreeConnect(value, type) {
if (type == 'menu') {
this.form.menuCheckStrictly = value ? true: false;
} else if (type == 'dept') {
this.form.deptCheckStrictly = value ? true: false;
}
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.getMenuTreeselect();
this.open = true;
this.title = "添加角色";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const roleId = row.roleId || this.ids
const roleMenu = this.getRoleMenuTreeselect(roleId);
getRole(roleId).then(response => {
this.form = response.data;
this.open = true;
this.$nextTick(() => {
roleMenu.then(res => {
let checkedKeys = res.checkedKeys
checkedKeys.forEach((v) => {
this.$nextTick(()=>{
this.$refs.menu.setChecked(v, true ,false);
})
})
});
});
this.title = "修改角色";
});
},
/** 选择角色权限范围触发 */
dataScopeSelectChange(value) {
if(value !== '2') {
this.$refs.dept.setCheckedKeys([]);
}
},
/** 分配数据权限操作 */
handleDataScope(row) {
this.reset();
const deptTreeSelect = this.getDeptTree(row.roleId);
getRole(row.roleId).then(response => {
this.form = response.data;
this.openDataScope = true;
this.$nextTick(() => {
deptTreeSelect.then(res => {
this.$refs.dept.setCheckedKeys(res.checkedKeys);
});
});
this.title = "分配数据权限";
});
},
/** 分配用户操作 */
handleAuthUser: function(row) {
const roleId = row.roleId;
this.$router.push("/system/role-auth/user/" + roleId);
},
/** 提交按钮 */
submitForm: function() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.roleId != undefined) {
this.form.menuIds = this.getMenuAllCheckedKeys();
updateRole(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
this.form.menuIds = this.getMenuAllCheckedKeys();
addRole(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 提交按钮(数据权限) */
submitDataScope: function() {
if (this.form.roleId != undefined) {
this.form.deptIds = this.getDeptAllCheckedKeys();
dataScope(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.openDataScope = false;
this.getList();
});
}
},
/** 删除按钮操作 */
handleDelete(row) {
const roleIds = row.roleId || this.ids;
this.$modal.confirm('是否确认删除角色编号为"' + roleIds + '"的数据项?').then(function() {
return delRole(roleIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('system/role/export', {
...this.queryParams
}, `role_${new Date().getTime()}.xlsx`)
}
}
};
</script>
-138
View File
@@ -1,138 +0,0 @@
<template>
<!-- 授权用户 -->
<el-dialog title="选择用户" :visible.sync="visible" width="800px" top="5vh" append-to-body>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true">
<el-form-item label="用户名称" prop="userName">
<el-input
v-model="queryParams.userName"
placeholder="请输入用户名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="手机号码" prop="phonenumber">
<el-input
v-model="queryParams.phonenumber"
placeholder="请输入手机号码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row>
<el-table @row-click="clickRow" ref="table" :data="userList" @selection-change="handleSelectionChange" height="260px">
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column label="用户名称" prop="userName" :show-overflow-tooltip="true" />
<el-table-column label="用户昵称" prop="nickName" :show-overflow-tooltip="true" />
<el-table-column label="邮箱" prop="email" :show-overflow-tooltip="true" />
<el-table-column label="手机" prop="phonenumber" :show-overflow-tooltip="true" />
<el-table-column label="状态" align="center" prop="status">
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-row>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleSelectUser">确 定</el-button>
<el-button @click="visible = false">取 消</el-button>
</div>
</el-dialog>
</template>
<script>
import { unallocatedUserList, authUserSelectAll } from "@/api/system/role";
export default {
dicts: ['sys_normal_disable'],
props: {
// 角色编号
roleId: {
type: [Number, String]
}
},
data() {
return {
// 遮罩层
visible: false,
// 选中数组值
userIds: [],
// 总条数
total: 0,
// 未授权用户数据
userList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
roleId: undefined,
userName: undefined,
phonenumber: undefined
}
};
},
methods: {
// 显示弹框
show() {
this.queryParams.roleId = this.roleId;
this.getList();
this.visible = true;
},
clickRow(row) {
this.$refs.table.toggleRowSelection(row);
},
// 多选框选中数据
handleSelectionChange(selection) {
this.userIds = selection.map(item => item.userId);
},
// 查询表数据
getList() {
unallocatedUserList(this.queryParams).then(res => {
this.userList = res.rows;
this.total = res.total;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
/** 选择授权用户操作 */
handleSelectUser() {
const roleId = this.queryParams.roleId;
const userIds = this.userIds.join(",");
if (userIds == "") {
this.$modal.msgError("请选择要分配的用户");
return;
}
authUserSelectAll({ roleId: roleId, userIds: userIds }).then(res => {
this.$modal.msgSuccess(res.msg);
if (res.code === 200) {
this.visible = false;
this.$emit("ok");
}
});
}
}
};
</script>
-117
View File
@@ -1,117 +0,0 @@
<template>
<div class="app-container">
<h4 class="form-header h4">基本信息</h4>
<el-form ref="form" :model="form" label-width="80px">
<el-row>
<el-col :span="8" :offset="2">
<el-form-item label="用户昵称" prop="nickName">
<el-input v-model="form.nickName" disabled />
</el-form-item>
</el-col>
<el-col :span="8" :offset="2">
<el-form-item label="登录账号" prop="userName">
<el-input v-model="form.userName" disabled />
</el-form-item>
</el-col>
</el-row>
</el-form>
<h4 class="form-header h4">角色信息</h4>
<el-table v-loading="loading" :row-key="getRowKey" @row-click="clickRow" ref="table" @selection-change="handleSelectionChange" :data="roles.slice((pageNum-1)*pageSize,pageNum*pageSize)">
<el-table-column label="序号" type="index" align="center">
<template slot-scope="scope">
<span>{{(pageNum - 1) * pageSize + scope.$index + 1}}</span>
</template>
</el-table-column>
<el-table-column type="selection" :reserve-selection="true" width="55"></el-table-column>
<el-table-column label="角色编号" align="center" prop="roleId" />
<el-table-column label="角色名称" align="center" prop="roleName" />
<el-table-column label="权限字符" align="center" prop="roleKey" />
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
</el-table>
<pagination v-show="total>0" :total="total" :page.sync="pageNum" :limit.sync="pageSize" />
<el-form label-width="100px">
<el-form-item style="text-align: center;margin-left:-120px;margin-top:30px;">
<el-button type="primary" @click="submitForm()">提交</el-button>
<el-button @click="close()">返回</el-button>
</el-form-item>
</el-form>
</div>
</template>
<script>
import { getAuthRole, updateAuthRole } from "@/api/system/user";
export default {
name: "AuthRole",
data() {
return {
// 遮罩层
loading: true,
// 分页信息
total: 0,
pageNum: 1,
pageSize: 10,
// 选中角色编号
roleIds:[],
// 角色信息
roles: [],
// 用户信息
form: {}
};
},
created() {
const userId = this.$route.params && this.$route.params.userId;
if (userId) {
this.loading = true;
getAuthRole(userId).then((response) => {
this.form = response.user;
this.roles = response.roles;
this.total = this.roles.length;
this.$nextTick(() => {
this.roles.forEach((row) => {
if (row.flag) {
this.$refs.table.toggleRowSelection(row);
}
});
});
this.loading = false;
});
}
},
methods: {
/** 单击选中行数据 */
clickRow(row) {
this.$refs.table.toggleRowSelection(row);
},
// 多选框选中数据
handleSelectionChange(selection) {
this.roleIds = selection.map((item) => item.roleId);
},
// 保存选中的数据编号
getRowKey(row) {
return row.roleId;
},
/** 提交按钮 */
submitForm() {
const userId = this.form.userId;
const roleIds = this.roleIds.join(",");
updateAuthRole({ userId: userId, roleIds: roleIds }).then((response) => {
this.$modal.msgSuccess("授权成功");
this.close();
});
},
/** 关闭按钮 */
close() {
const obj = { path: "/system/user" };
this.$tab.closeOpenPage(obj);
},
},
};
</script>
-579
View File
@@ -1,579 +0,0 @@
<template>
<div class="app-container">
<el-row :gutter="20">
<!--部门数据-->
<el-col :span="4" :xs="24">
<div class="head-container">
<el-input v-model="deptName" placeholder="请输入部门名称" clearable size="small" prefix-icon="el-icon-search"
style="margin-bottom: 20px" />
</div>
<div class="head-container">
<el-tree :data="deptOptions" :props="defaultProps" :expand-on-click-node="false"
:filter-node-method="filterNode" ref="tree" node-key="id" default-expand-all highlight-current
@node-click="handleNodeClick" />
</div>
</el-col>
<!--用户数据-->
<el-col :span="20" :xs="24">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="用户名称" prop="userName">
<el-input v-model="queryParams.userName" placeholder="请输入用户名称" clearable style="width: 240px"
@keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="手机号码" prop="phonenumber">
<el-input v-model="queryParams.phonenumber" placeholder="请输入手机号码" clearable style="width: 240px"
@keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="状态" prop="status">
<el-select v-model="queryParams.status" placeholder="用户状态" clearable style="width: 240px">
<el-option v-for="dict in dict.type.sys_normal_disable" :key="dict.value" :label="dict.label"
:value="dict.value" />
</el-select>
</el-form-item>
<el-form-item label="创建时间">
<el-date-picker v-model="dateRange" style="width: 240px" value-format="yyyy-MM-dd" type="daterange"
range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
v-hasPermi="['system:user:add']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
v-hasPermi="['system:user:edit']">修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
v-hasPermi="['system:user:remove']">删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="info" plain icon="el-icon-upload2" size="mini" @click="handleImport"
v-hasPermi="['system:user:import']">导入</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
v-hasPermi="['system:user:export']">导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="50" align="center" />
<el-table-column label="用户编号" align="center" key="userId" prop="userId" v-if="columns[0].visible" />
<el-table-column label="用户名称" align="center" key="userName" prop="userName" v-if="columns[1].visible"
:show-overflow-tooltip="true" />
<el-table-column label="用户昵称" align="center" key="nickName" prop="nickName" v-if="columns[2].visible"
:show-overflow-tooltip="true" />
<el-table-column label="部门" align="center" key="deptName" prop="dept.deptName" v-if="columns[3].visible"
:show-overflow-tooltip="true" />
<el-table-column label="手机号码" align="center" key="phonenumber" prop="phonenumber" v-if="columns[4].visible"
width="120" />
<el-table-column label="状态" align="center" key="status" v-if="columns[5].visible">
<template slot-scope="scope">
<el-switch v-model="scope.row.status" active-value="0" inactive-value="1"
@change="handleStatusChange(scope.row)"></el-switch>
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" v-if="columns[6].visible" width="160">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="160" class-name="small-padding fixed-width">
<template slot-scope="scope" v-if="scope.row.userId !== 1">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['system:user:edit']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['system:user:remove']">删除</el-button>
<el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)"
v-hasPermi="['system:user:resetPwd', 'system:user:edit']">
<el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="handleResetPwd" icon="el-icon-key"
v-hasPermi="['system:user:resetPwd']">重置密码</el-dropdown-item>
<el-dropdown-item command="handleAuthRole" icon="el-icon-circle-check"
v-hasPermi="['system:user:edit']">分配角色</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList" />
</el-col>
</el-row>
<!-- 添加或修改用户配置对话框 -->
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-row>
<el-col :span="12">
<el-form-item label="用户昵称" prop="nickName">
<el-input v-model="form.nickName" placeholder="请输入用户昵称" maxlength="30" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="归属部门" prop="deptId">
<el-select v-model="form.deptId" multiple placeholder="请选择角色">
<el-option v-for="item in deptOptions" :key="item.id" :label="item.label" :value="item.id"></el-option>
</el-select>
<!-- <treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="请选择归属部门" /> -->
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="手机号码" prop="phonenumber">
<el-input v-model="form.phonenumber" placeholder="请输入手机号码" maxlength="11" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="邮箱" prop="email">
<el-input v-model="form.email" placeholder="请输入邮箱" maxlength="50" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item v-if="form.userId == undefined" label="用户名称" prop="userName">
<el-input v-model="form.userName" placeholder="请输入用户名称" maxlength="30" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item v-if="form.userId == undefined" label="用户密码" prop="password">
<el-input v-model="form.password" placeholder="请输入用户密码" type="password" maxlength="20" show-password />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="用户性别">
<el-select v-model="form.sex" placeholder="请选择性别">
<el-option v-for="dict in dict.type.sys_user_sex" :key="dict.value" :label="dict.label"
:value="dict.value"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="状态">
<el-radio-group v-model="form.status">
<el-radio v-for="dict in dict.type.sys_normal_disable" :key="dict.value"
:label="dict.value">{{ dict.label }}</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="岗位">
<el-select v-model="form.postIds" multiple placeholder="请选择岗位">
<el-option v-for="item in postOptions" :key="item.postId" :label="item.postName" :value="item.postId"
:disabled="item.status == 1"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="角色">
<el-select v-model="form.roleIds" multiple placeholder="请选择角色">
<el-option v-for="item in roleOptions" :key="item.roleId" :label="item.roleName" :value="item.roleId"
:disabled="item.status == 1"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="备注">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="专长">
<el-input v-model="form.specialty" type="textarea" placeholder="请输入内容"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
<!-- 用户导入对话框 -->
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
<el-upload ref="upload" :limit="1" accept=".xlsx, .xls" :headers="upload.headers"
:action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading"
:on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag>
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
<div class="el-upload__tip text-center" slot="tip">
<div class="el-upload__tip" slot="tip">
<el-checkbox v-model="upload.updateSupport" /> 是否更新已经存在的用户数据
</div>
<span>仅允许导入xls、xlsx格式文件。</span>
<el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;"
@click="importTemplate">下载模板</el-link>
</div>
</el-upload>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitFileForm">确 定</el-button>
<el-button @click="upload.open = false">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listUser, getUser, delUser, addUser, updateUser, resetUserPwd, changeUserStatus, deptTreeSelect } from "@/api/system/user";
import { getToken } from "@/utils/auth";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default {
name: "User",
dicts: ['sys_normal_disable', 'sys_user_sex'],
components: { Treeselect },
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 用户表格数据
userList: null,
// 弹出层标题
title: "",
// 部门树选项
deptOptions: undefined,
// 是否显示弹出层
open: false,
// 部门名称
deptName: undefined,
// 默认密码
initPassword: undefined,
// 日期范围
dateRange: [],
// 岗位选项
postOptions: [],
// 角色选项
roleOptions: [],
// 表单参数
form: {},
defaultProps: {
children: "children",
label: "label"
},
// 用户导入参数
upload: {
// 是否显示弹出层(用户导入)
open: false,
// 弹出层标题(用户导入)
title: "",
// 是否禁用上传
isUploading: false,
// 是否更新已经存在的用户数据
updateSupport: 0,
// 设置上传的请求头部
headers: { Authorization: "Bearer " + getToken() },
// 上传的地址
url: process.env.VUE_APP_BASE_API + "/system/user/importData"
},
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
userName: undefined,
phonenumber: undefined,
status: undefined,
deptId: undefined
},
// 列信息
columns: [
{ key: 0, label: `用户编号`, visible: true },
{ key: 1, label: `用户名称`, visible: true },
{ key: 2, label: `用户昵称`, visible: true },
{ key: 3, label: `部门`, visible: true },
{ key: 4, label: `手机号码`, visible: true },
{ key: 5, label: `状态`, visible: true },
{ key: 6, label: `创建时间`, visible: true }
],
// 表单校验
rules: {
userName: [
{ required: true, message: "用户名称不能为空", trigger: "blur" },
{ min: 2, max: 20, message: '用户名称长度必须介于 2 和 20 之间', trigger: 'blur' }
],
nickName: [
{ required: true, message: "用户昵称不能为空", trigger: "blur" }
],
password: [
{ required: true, message: "用户密码不能为空", trigger: "blur" },
{ min: 5, max: 20, message: '用户密码长度必须介于 5 和 20 之间', trigger: 'blur' }
],
email: [
{
type: "email",
message: "请输入正确的邮箱地址",
trigger: ["blur", "change"]
}
],
phonenumber: [
{
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
message: "请输入正确的手机号码",
trigger: "blur"
}
]
}
};
},
watch: {
// 根据名称筛选部门树
deptName(val) {
this.$refs.tree.filter(val);
}
},
created() {
this.getList();
this.getDeptTree();
this.getConfigKey("sys.user.initPassword").then(response => {
this.initPassword = response.msg;
});
},
methods: {
/** 查询用户列表 */
getList() {
this.loading = true;
listUser(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
this.userList = response.rows;
this.total = response.total;
this.loading = false;
}
);
},
/** 查询部门下拉树结构 */
getDeptTree() {
deptTreeSelect().then(response => {
this.deptOptions = response.data;
});
},
// 筛选节点
filterNode(value, data) {
if (!value) return true;
return data.label.indexOf(value) !== -1;
},
// 节点单击事件
handleNodeClick(data) {
this.queryParams.deptId = data.id;
this.handleQuery();
},
// 用户状态修改
handleStatusChange(row) {
let text = row.status === "0" ? "启用" : "停用";
this.$modal.confirm('确认要"' + text + '""' + row.userName + '"用户吗?').then(function () {
return changeUserStatus(row.userId, row.status);
}).then(() => {
this.$modal.msgSuccess(text + "成功");
}).catch(function () {
row.status = row.status === "0" ? "1" : "0";
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
userId: undefined,
deptId: undefined,
userName: undefined,
nickName: undefined,
password: undefined,
phonenumber: undefined,
email: undefined,
sex: undefined,
status: "0",
remark: undefined,
postIds: [],
roleIds: []
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = [];
this.resetForm("queryForm");
this.queryParams.deptId = undefined;
this.$refs.tree.setCurrentKey(null);
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.userId);
this.single = selection.length != 1;
this.multiple = !selection.length;
},
// 更多操作触发
handleCommand(command, row) {
switch (command) {
case "handleResetPwd":
this.handleResetPwd(row);
break;
case "handleAuthRole":
this.handleAuthRole(row);
break;
default:
break;
}
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
getUser().then(response => {
this.postOptions = response.posts;
this.roleOptions = response.roles;
this.open = true;
this.title = "添加用户";
this.form.password = this.initPassword;
});
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const userId = row.userId || this.ids;
getUser(userId).then(response => {
this.form = response.data;
this.postOptions = response.posts;
this.roleOptions = response.roles;
this.$set(this.form, "postIds", response.postIds);
this.$set(this.form, "roleIds", response.roleIds);
this.$set(this.form, "deptId", response.deptId);
this.open = true;
this.title = "修改用户";
this.form.password = "";
});
},
/** 重置密码按钮操作 */
handleResetPwd(row) {
this.$prompt('请输入"' + row.userName + '"的新密码', "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
closeOnClickModal: false,
inputPattern: /^.{5,20}$/,
inputErrorMessage: "用户密码长度必须介于 5 和 20 之间"
}).then(({ value }) => {
resetUserPwd(row.userId, value).then(response => {
this.$modal.msgSuccess("修改成功,新密码是:" + value);
});
}).catch(() => { });
},
/** 分配角色操作 */
handleAuthRole: function (row) {
const userId = row.userId;
this.$router.push("/system/user-auth/role/" + userId);
},
/** 提交按钮 */
submitForm: function () {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.userId != undefined) {
updateUser(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addUser(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const userIds = row.userId || this.ids;
this.$modal.confirm('是否确认删除用户编号为"' + userIds + '"的数据项?').then(function () {
return delUser(userIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => { });
},
/** 导出按钮操作 */
handleExport() {
this.download('system/user/export', {
...this.queryParams
}, `user_${new Date().getTime()}.xlsx`)
},
/** 导入按钮操作 */
handleImport() {
this.upload.title = "用户导入";
this.upload.open = true;
},
/** 下载模板操作 */
importTemplate() {
this.download('system/user/importTemplate', {
}, `user_template_${new Date().getTime()}.xlsx`)
},
// 文件上传中处理
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true;
},
// 文件上传成功处理
handleFileSuccess(response, file, fileList) {
this.upload.open = false;
this.upload.isUploading = false;
this.$refs.upload.clearFiles();
this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导入结果", { dangerouslyUseHTMLString: true });
this.getList();
},
// 提交上传文件
submitFileForm() {
this.$refs.upload.submit();
}
}
};
</script>
<style lang="scss" scoped>
.head-container {
width: 98%;
::v-deep .el-tree-node {
white-space: normal;
.el-tree-node__content {
height: 100%;
align-items: start;
}
}
}
</style>
-91
View File
@@ -1,91 +0,0 @@
<template>
<div class="app-container">
<el-row :gutter="20">
<el-col :span="6" :xs="24">
<el-card class="box-card">
<div slot="header" class="clearfix">
<span>个人信息</span>
</div>
<div>
<div class="text-center">
<userAvatar />
</div>
<ul class="list-group list-group-striped">
<li class="list-group-item">
<svg-icon icon-class="user" />用户名称
<div class="pull-right">{{ user.userName }}</div>
</li>
<li class="list-group-item">
<svg-icon icon-class="phone" />手机号码
<div class="pull-right">{{ user.phonenumber }}</div>
</li>
<li class="list-group-item">
<svg-icon icon-class="email" />用户邮箱
<div class="pull-right">{{ user.email }}</div>
</li>
<li class="list-group-item">
<svg-icon icon-class="tree" />所属部门
<div class="pull-right" v-if="user.dept">{{ user.dept.deptName }} / {{ postGroup }}</div>
</li>
<li class="list-group-item">
<svg-icon icon-class="peoples" />所属角色
<div class="pull-right">{{ roleGroup }}</div>
</li>
<li class="list-group-item">
<svg-icon icon-class="date" />创建日期
<div class="pull-right">{{ user.createTime }}</div>
</li>
</ul>
</div>
</el-card>
</el-col>
<el-col :span="18" :xs="24">
<el-card>
<div slot="header" class="clearfix">
<span>基本资料</span>
</div>
<el-tabs v-model="activeTab">
<el-tab-pane label="基本资料" name="userinfo">
<userInfo :user="user" />
</el-tab-pane>
<el-tab-pane label="修改密码" name="resetPwd">
<resetPwd />
</el-tab-pane>
</el-tabs>
</el-card>
</el-col>
</el-row>
</div>
</template>
<script>
import userAvatar from "./userAvatar";
import userInfo from "./userInfo";
import resetPwd from "./resetPwd";
import { getUserProfile } from "@/api/system/user";
export default {
name: "Profile",
components: { userAvatar, userInfo, resetPwd },
data() {
return {
user: {},
roleGroup: {},
postGroup: {},
activeTab: "userinfo"
};
},
created() {
this.getUser();
},
methods: {
getUser() {
getUserProfile().then(response => {
this.user = response.data;
this.roleGroup = response.roleGroup;
this.postGroup = response.postGroup;
});
}
}
};
</script>
@@ -1,68 +0,0 @@
<template>
<el-form ref="form" :model="user" :rules="rules" label-width="80px">
<el-form-item label="旧密码" prop="oldPassword">
<el-input v-model="user.oldPassword" placeholder="请输入旧密码" type="password" show-password/>
</el-form-item>
<el-form-item label="新密码" prop="newPassword">
<el-input v-model="user.newPassword" placeholder="请输入新密码" type="password" show-password/>
</el-form-item>
<el-form-item label="确认密码" prop="confirmPassword">
<el-input v-model="user.confirmPassword" placeholder="请确认新密码" type="password" show-password/>
</el-form-item>
<el-form-item>
<el-button type="primary" size="mini" @click="submit">保存</el-button>
<el-button type="danger" size="mini" @click="close">关闭</el-button>
</el-form-item>
</el-form>
</template>
<script>
import { updateUserPwd } from "@/api/system/user";
export default {
data() {
const equalToPassword = (rule, value, callback) => {
if (this.user.newPassword !== value) {
callback(new Error("两次输入的密码不一致"));
} else {
callback();
}
};
return {
user: {
oldPassword: undefined,
newPassword: undefined,
confirmPassword: undefined
},
// 表单校验
rules: {
oldPassword: [
{ required: true, message: "旧密码不能为空", trigger: "blur" }
],
newPassword: [
{ required: true, message: "新密码不能为空", trigger: "blur" },
{ min: 6, max: 20, message: "长度在 6 到 20 个字符", trigger: "blur" }
],
confirmPassword: [
{ required: true, message: "确认密码不能为空", trigger: "blur" },
{ required: true, validator: equalToPassword, trigger: "blur" }
]
}
};
},
methods: {
submit() {
this.$refs["form"].validate(valid => {
if (valid) {
updateUserPwd(this.user.oldPassword, this.user.newPassword).then(response => {
this.$modal.msgSuccess("修改成功");
});
}
});
},
close() {
this.$tab.closePage();
}
}
};
</script>
@@ -1,182 +0,0 @@
<template>
<div>
<div class="user-info-head" @click="editCropper()"><img v-bind:src="options.img" title="点击上传头像" class="img-circle img-lg" /></div>
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body @opened="modalOpened" @close="closeDialog">
<el-row>
<el-col :xs="24" :md="12" :style="{height: '350px'}">
<vue-cropper
ref="cropper"
:img="options.img"
:info="true"
:autoCrop="options.autoCrop"
:autoCropWidth="options.autoCropWidth"
:autoCropHeight="options.autoCropHeight"
:fixedBox="options.fixedBox"
:outputType="options.outputType"
@realTime="realTime"
v-if="visible"
/>
</el-col>
<el-col :xs="24" :md="12" :style="{height: '350px'}">
<div class="avatar-upload-preview">
<img :src="previews.url" :style="previews.img" />
</div>
</el-col>
</el-row>
<br />
<el-row>
<el-col :lg="2" :sm="3" :xs="3">
<el-upload action="#" :http-request="requestUpload" :show-file-list="false" :before-upload="beforeUpload">
<el-button size="small">
选择
<i class="el-icon-upload el-icon--right"></i>
</el-button>
</el-upload>
</el-col>
<el-col :lg="{span: 1, offset: 2}" :sm="2" :xs="2">
<el-button icon="el-icon-plus" size="small" @click="changeScale(1)"></el-button>
</el-col>
<el-col :lg="{span: 1, offset: 1}" :sm="2" :xs="2">
<el-button icon="el-icon-minus" size="small" @click="changeScale(-1)"></el-button>
</el-col>
<el-col :lg="{span: 1, offset: 1}" :sm="2" :xs="2">
<el-button icon="el-icon-refresh-left" size="small" @click="rotateLeft()"></el-button>
</el-col>
<el-col :lg="{span: 1, offset: 1}" :sm="2" :xs="2">
<el-button icon="el-icon-refresh-right" size="small" @click="rotateRight()"></el-button>
</el-col>
<el-col :lg="{span: 2, offset: 6}" :sm="2" :xs="2">
<el-button type="primary" size="small" @click="uploadImg()">提 交</el-button>
</el-col>
</el-row>
</el-dialog>
</div>
</template>
<script>
import store from "@/store";
import { VueCropper } from "vue-cropper";
import { uploadAvatar } from "@/api/system/user";
import { debounce } from '@/utils'
export default {
components: { VueCropper },
data() {
return {
// 是否显示弹出层
open: false,
// 是否显示cropper
visible: false,
// 弹出层标题
title: "修改头像",
options: {
img: store.getters.avatar, //裁剪图片的地址
autoCrop: true, // 是否默认生成截图框
autoCropWidth: 200, // 默认生成截图框宽度
autoCropHeight: 200, // 默认生成截图框高度
fixedBox: true, // 固定截图框大小 不允许改变
outputType:"png" // 默认生成截图为PNG格式
},
previews: {},
resizeHandler: null
};
},
methods: {
// 编辑头像
editCropper() {
this.open = true;
},
// 打开弹出层结束时的回调
modalOpened() {
this.visible = true;
if (!this.resizeHandler) {
this.resizeHandler = debounce(() => {
this.refresh()
}, 100)
}
window.addEventListener("resize", this.resizeHandler)
},
// 刷新组件
refresh() {
this.$refs.cropper.refresh();
},
// 覆盖默认的上传行为
requestUpload() {
},
// 向左旋转
rotateLeft() {
this.$refs.cropper.rotateLeft();
},
// 向右旋转
rotateRight() {
this.$refs.cropper.rotateRight();
},
// 图片缩放
changeScale(num) {
num = num || 1;
this.$refs.cropper.changeScale(num);
},
// 上传预处理
beforeUpload(file) {
if (file.type.indexOf("image/") == -1) {
this.$modal.msgError("文件格式错误,请上传图片类型,如:JPG,PNG后缀的文件。");
} else {
const reader = new FileReader();
reader.readAsDataURL(file);
reader.onload = () => {
this.options.img = reader.result;
};
}
},
// 上传图片
uploadImg() {
this.$refs.cropper.getCropBlob(data => {
let formData = new FormData();
formData.append("avatarfile", data);
uploadAvatar(formData).then(response => {
this.open = false;
this.options.img = process.env.VUE_APP_BASE_API + response.imgUrl;
store.commit('SET_AVATAR', this.options.img);
this.$modal.msgSuccess("修改成功");
this.visible = false;
});
});
},
// 实时预览
realTime(data) {
this.previews = data;
},
// 关闭窗口
closeDialog() {
this.options.img = store.getters.avatar
this.visible = false;
window.removeEventListener("resize", this.resizeHandler)
}
}
};
</script>
<style scoped lang="scss">
.user-info-head {
position: relative;
display: inline-block;
height: 120px;
}
.user-info-head:hover:after {
content: '+';
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
color: #eee;
background: rgba(0, 0, 0, 0.5);
font-size: 24px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
cursor: pointer;
line-height: 110px;
border-radius: 50%;
}
</style>
@@ -1,75 +0,0 @@
<template>
<el-form ref="form" :model="user" :rules="rules" label-width="80px">
<el-form-item label="用户昵称" prop="nickName">
<el-input v-model="user.nickName" maxlength="30" />
</el-form-item>
<el-form-item label="手机号码" prop="phonenumber">
<el-input v-model="user.phonenumber" maxlength="11" />
</el-form-item>
<el-form-item label="邮箱" prop="email">
<el-input v-model="user.email" maxlength="50" />
</el-form-item>
<el-form-item label="性别">
<el-radio-group v-model="user.sex">
<el-radio label="0">男</el-radio>
<el-radio label="1">女</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item>
<el-button type="primary" size="mini" @click="submit">保存</el-button>
<el-button type="danger" size="mini" @click="close">关闭</el-button>
</el-form-item>
</el-form>
</template>
<script>
import { updateUserProfile } from "@/api/system/user";
export default {
props: {
user: {
type: Object
}
},
data() {
return {
// 表单校验
rules: {
nickName: [
{ required: true, message: "用户昵称不能为空", trigger: "blur" }
],
email: [
{ required: true, message: "邮箱地址不能为空", trigger: "blur" },
{
type: "email",
message: "请输入正确的邮箱地址",
trigger: ["blur", "change"]
}
],
phonenumber: [
{ required: true, message: "手机号码不能为空", trigger: "blur" },
{
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
message: "请输入正确的手机号码",
trigger: "blur"
}
]
}
};
},
methods: {
submit() {
this.$refs["form"].validate(valid => {
if (valid) {
updateUserProfile(this.user).then(response => {
this.$modal.msgSuccess("修改成功");
});
}
});
},
close() {
this.$tab.closePage();
}
}
};
</script>
-106
View File
@@ -1,106 +0,0 @@
<template>
<div>
<el-dialog
v-bind="$attrs"
width="500px"
:close-on-click-modal="false"
:modal-append-to-body="false"
v-on="$listeners"
@open="onOpen"
@close="onClose"
>
<el-row :gutter="15">
<el-form
ref="elForm"
:model="formData"
:rules="rules"
size="medium"
label-width="100px"
>
<el-col :span="24">
<el-form-item label="生成类型" prop="type">
<el-radio-group v-model="formData.type">
<el-radio-button
v-for="(item, index) in typeOptions"
:key="index"
:label="item.value"
:disabled="item.disabled"
>
{{ item.label }}
</el-radio-button>
</el-radio-group>
</el-form-item>
<el-form-item v-if="showFileName" label="文件名" prop="fileName">
<el-input v-model="formData.fileName" placeholder="请输入文件名" clearable />
</el-form-item>
</el-col>
</el-form>
</el-row>
<div slot="footer">
<el-button @click="close">
取消
</el-button>
<el-button type="primary" @click="handleConfirm">
确定
</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
export default {
inheritAttrs: false,
props: ['showFileName'],
data() {
return {
formData: {
fileName: undefined,
type: 'file'
},
rules: {
fileName: [{
required: true,
message: '请输入文件名',
trigger: 'blur'
}],
type: [{
required: true,
message: '生成类型不能为空',
trigger: 'change'
}]
},
typeOptions: [{
label: '页面',
value: 'file'
}, {
label: '弹窗',
value: 'dialog'
}]
}
},
computed: {
},
watch: {},
mounted() {},
methods: {
onOpen() {
if (this.showFileName) {
this.formData.fileName = `${+new Date()}.vue`
}
},
onClose() {
},
close(e) {
this.$emit('update:visible', false)
},
handleConfirm() {
this.$refs.elForm.validate(valid => {
if (!valid) return
this.$emit('confirm', { ...this.formData })
this.close()
})
}
}
}
</script>
-100
View File
@@ -1,100 +0,0 @@
<script>
import draggable from 'vuedraggable'
import render from '@/utils/generator/render'
const components = {
itemBtns(h, element, index, parent) {
const { copyItem, deleteItem } = this.$listeners
return [
<span class="drawing-item-copy" title="复制" onClick={event => {
copyItem(element, parent); event.stopPropagation()
}}>
<i class="el-icon-copy-document" />
</span>,
<span class="drawing-item-delete" title="删除" onClick={event => {
deleteItem(index, parent); event.stopPropagation()
}}>
<i class="el-icon-delete" />
</span>
]
}
}
const layouts = {
colFormItem(h, element, index, parent) {
const { activeItem } = this.$listeners
let className = this.activeId === element.formId ? 'drawing-item active-from-item' : 'drawing-item'
if (this.formConf.unFocusedComponentBorder) className += ' unfocus-bordered'
return (
<el-col span={element.span} class={className}
nativeOnClick={event => { activeItem(element); event.stopPropagation() }}>
<el-form-item label-width={element.labelWidth ? `${element.labelWidth}px` : null}
label={element.label} required={element.required}>
<render key={element.renderKey} conf={element} onInput={ event => {
this.$set(element, 'defaultValue', event)
}} />
</el-form-item>
{components.itemBtns.apply(this, arguments)}
</el-col>
)
},
rowFormItem(h, element, index, parent) {
const { activeItem } = this.$listeners
const className = this.activeId === element.formId ? 'drawing-row-item active-from-item' : 'drawing-row-item'
let child = renderChildren.apply(this, arguments)
if (element.type === 'flex') {
child = <el-row type={element.type} justify={element.justify} align={element.align}>
{child}
</el-row>
}
return (
<el-col span={element.span}>
<el-row gutter={element.gutter} class={className}
nativeOnClick={event => { activeItem(element); event.stopPropagation() }}>
<span class="component-name">{element.componentName}</span>
<draggable list={element.children} animation={340} group="componentsGroup" class="drag-wrapper">
{child}
</draggable>
{components.itemBtns.apply(this, arguments)}
</el-row>
</el-col>
)
}
}
function renderChildren(h, element, index, parent) {
if (!Array.isArray(element.children)) return null
return element.children.map((el, i) => {
const layout = layouts[el.layout]
if (layout) {
return layout.call(this, h, el, i, element.children)
}
return layoutIsNotFound()
})
}
function layoutIsNotFound() {
throw new Error(`没有与${this.element.layout}匹配的layout`)
}
export default {
components: {
render,
draggable
},
props: [
'element',
'index',
'drawingList',
'activeId',
'formConf'
],
render(h) {
const layout = layouts[this.element.layout]
if (layout) {
return layout.call(this, h, this.element, this.index, this.drawingList)
}
return layoutIsNotFound()
}
}
</script>
-123
View File
@@ -1,123 +0,0 @@
<template>
<div class="icon-dialog">
<el-dialog
v-bind="$attrs"
width="980px"
:modal-append-to-body="false"
v-on="$listeners"
@open="onOpen"
@close="onClose"
>
<div slot="title">
选择图标
<el-input
v-model="key"
size="mini"
:style="{width: '260px'}"
placeholder="请输入图标名称"
prefix-icon="el-icon-search"
clearable
/>
</div>
<ul class="icon-ul">
<li
v-for="icon in iconList"
:key="icon"
:class="active===icon?'active-item':''"
@click="onSelect(icon)"
>
<i :class="icon" />
<div>{{ icon }}</div>
</li>
</ul>
</el-dialog>
</div>
</template>
<script>
import iconList from '@/utils/generator/icon.json'
const originList = iconList.map(name => `el-icon-${name}`)
export default {
inheritAttrs: false,
props: ['current'],
data() {
return {
iconList: originList,
active: null,
key: ''
}
},
watch: {
key(val) {
if (val) {
this.iconList = originList.filter(name => name.indexOf(val) > -1)
} else {
this.iconList = originList
}
}
},
methods: {
onOpen() {
this.active = this.current
this.key = ''
},
onClose() {},
onSelect(icon) {
this.active = icon
this.$emit('select', icon)
this.$emit('update:visible', false)
}
}
}
</script>
<style lang="scss" scoped>
.icon-ul {
margin: 0;
padding: 0;
font-size: 0;
li {
list-style-type: none;
text-align: center;
font-size: 14px;
display: inline-block;
width: 16.66%;
box-sizing: border-box;
height: 108px;
padding: 15px 6px 6px 6px;
cursor: pointer;
overflow: hidden;
&:hover {
background: #f2f2f2;
}
&.active-item{
background: #e1f3fb;
color: #7a6df0
}
> i {
font-size: 30px;
line-height: 50px;
}
}
}
.icon-dialog {
::v-deep .el-dialog {
border-radius: 8px;
margin-bottom: 0;
margin-top: 4vh !important;
display: flex;
flex-direction: column;
max-height: 92vh;
overflow: hidden;
box-sizing: border-box;
.el-dialog__header {
padding-top: 14px;
}
.el-dialog__body {
margin: 0 20px 20px 20px;
padding: 0;
overflow: auto;
}
}
}
</style>
-946
View File
@@ -1,946 +0,0 @@
<template>
<div class="right-board">
<el-tabs v-model="currentTab" class="center-tabs">
<el-tab-pane label="组件属性" name="field" />
<el-tab-pane label="表单属性" name="form" />
</el-tabs>
<div class="field-box">
<a class="document-link" target="_blank" :href="documentLink" title="查看组件文档">
<i class="el-icon-link" />
</a>
<el-scrollbar class="right-scrollbar">
<!-- 组件属性 -->
<el-form v-show="currentTab==='field' && showField" size="small" label-width="90px">
<el-form-item v-if="activeData.changeTag" label="组件类型">
<el-select
v-model="activeData.tagIcon"
placeholder="请选择组件类型"
:style="{width: '100%'}"
@change="tagChange"
>
<el-option-group v-for="group in tagList" :key="group.label" :label="group.label">
<el-option
v-for="item in group.options"
:key="item.label"
:label="item.label"
:value="item.tagIcon"
>
<svg-icon class="node-icon" :icon-class="item.tagIcon" />
<span> {{ item.label }}</span>
</el-option>
</el-option-group>
</el-select>
</el-form-item>
<el-form-item v-if="activeData.vModel!==undefined" label="字段名">
<el-input v-model="activeData.vModel" placeholder="请输入字段名(v-model)" />
</el-form-item>
<el-form-item v-if="activeData.componentName!==undefined" label="组件名">
{{ activeData.componentName }}
</el-form-item>
<el-form-item v-if="activeData.label!==undefined" label="标题">
<el-input v-model="activeData.label" placeholder="请输入标题" />
</el-form-item>
<el-form-item v-if="activeData.placeholder!==undefined" label="占位提示">
<el-input v-model="activeData.placeholder" placeholder="请输入占位提示" />
</el-form-item>
<el-form-item v-if="activeData['start-placeholder']!==undefined" label="开始占位">
<el-input v-model="activeData['start-placeholder']" placeholder="请输入占位提示" />
</el-form-item>
<el-form-item v-if="activeData['end-placeholder']!==undefined" label="结束占位">
<el-input v-model="activeData['end-placeholder']" placeholder="请输入占位提示" />
</el-form-item>
<el-form-item v-if="activeData.span!==undefined" label="表单栅格">
<el-slider v-model="activeData.span" :max="24" :min="1" :marks="{12:''}" @change="spanChange" />
</el-form-item>
<el-form-item v-if="activeData.layout==='rowFormItem'" label="栅格间隔">
<el-input-number v-model="activeData.gutter" :min="0" placeholder="栅格间隔" />
</el-form-item>
<el-form-item v-if="activeData.layout==='rowFormItem'" label="布局模式">
<el-radio-group v-model="activeData.type">
<el-radio-button label="default" />
<el-radio-button label="flex" />
</el-radio-group>
</el-form-item>
<el-form-item v-if="activeData.justify!==undefined&&activeData.type==='flex'" label="水平排列">
<el-select v-model="activeData.justify" placeholder="请选择水平排列" :style="{width: '100%'}">
<el-option
v-for="(item, index) in justifyOptions"
:key="index"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item v-if="activeData.align!==undefined&&activeData.type==='flex'" label="垂直排列">
<el-radio-group v-model="activeData.align">
<el-radio-button label="top" />
<el-radio-button label="middle" />
<el-radio-button label="bottom" />
</el-radio-group>
</el-form-item>
<el-form-item v-if="activeData.labelWidth!==undefined" label="标签宽度">
<el-input v-model.number="activeData.labelWidth" type="number" placeholder="请输入标签宽度" />
</el-form-item>
<el-form-item v-if="activeData.style&&activeData.style.width!==undefined" label="组件宽度">
<el-input v-model="activeData.style.width" placeholder="请输入组件宽度" clearable />
</el-form-item>
<el-form-item v-if="activeData.vModel!==undefined" label="默认值">
<el-input
:value="setDefaultValue(activeData.defaultValue)"
placeholder="请输入默认值"
@input="onDefaultValueInput"
/>
</el-form-item>
<el-form-item v-if="activeData.tag==='el-checkbox-group'" label="至少应选">
<el-input-number
:value="activeData.min"
:min="0"
placeholder="至少应选"
@input="$set(activeData, 'min', $event?$event:undefined)"
/>
</el-form-item>
<el-form-item v-if="activeData.tag==='el-checkbox-group'" label="最多可选">
<el-input-number
:value="activeData.max"
:min="0"
placeholder="最多可选"
@input="$set(activeData, 'max', $event?$event:undefined)"
/>
</el-form-item>
<el-form-item v-if="activeData.prepend!==undefined" label="前缀">
<el-input v-model="activeData.prepend" placeholder="请输入前缀" />
</el-form-item>
<el-form-item v-if="activeData.append!==undefined" label="后缀">
<el-input v-model="activeData.append" placeholder="请输入后缀" />
</el-form-item>
<el-form-item v-if="activeData['prefix-icon']!==undefined" label="前图标">
<el-input v-model="activeData['prefix-icon']" placeholder="请输入前图标名称">
<el-button slot="append" icon="el-icon-thumb" @click="openIconsDialog('prefix-icon')">
选择
</el-button>
</el-input>
</el-form-item>
<el-form-item v-if="activeData['suffix-icon'] !== undefined" label="后图标">
<el-input v-model="activeData['suffix-icon']" placeholder="请输入后图标名称">
<el-button slot="append" icon="el-icon-thumb" @click="openIconsDialog('suffix-icon')">
选择
</el-button>
</el-input>
</el-form-item>
<el-form-item v-if="activeData.tag === 'el-cascader'" label="选项分隔符">
<el-input v-model="activeData.separator" placeholder="请输入选项分隔符" />
</el-form-item>
<el-form-item v-if="activeData.autosize !== undefined" label="最小行数">
<el-input-number v-model="activeData.autosize.minRows" :min="1" placeholder="最小行数" />
</el-form-item>
<el-form-item v-if="activeData.autosize !== undefined" label="最大行数">
<el-input-number v-model="activeData.autosize.maxRows" :min="1" placeholder="最大行数" />
</el-form-item>
<el-form-item v-if="activeData.min !== undefined" label="最小值">
<el-input-number v-model="activeData.min" placeholder="最小值" />
</el-form-item>
<el-form-item v-if="activeData.max !== undefined" label="最大值">
<el-input-number v-model="activeData.max" placeholder="最大值" />
</el-form-item>
<el-form-item v-if="activeData.step !== undefined" label="步长">
<el-input-number v-model="activeData.step" placeholder="步数" />
</el-form-item>
<el-form-item v-if="activeData.tag === 'el-input-number'" label="精度">
<el-input-number v-model="activeData.precision" :min="0" placeholder="精度" />
</el-form-item>
<el-form-item v-if="activeData.tag === 'el-input-number'" label="按钮位置">
<el-radio-group v-model="activeData['controls-position']">
<el-radio-button label="">
默认
</el-radio-button>
<el-radio-button label="right">
右侧
</el-radio-button>
</el-radio-group>
</el-form-item>
<el-form-item v-if="activeData.maxlength !== undefined" label="最多输入">
<el-input v-model="activeData.maxlength" placeholder="请输入字符长度">
<template slot="append">
个字符
</template>
</el-input>
</el-form-item>
<el-form-item v-if="activeData['active-text'] !== undefined" label="开启提示">
<el-input v-model="activeData['active-text']" placeholder="请输入开启提示" />
</el-form-item>
<el-form-item v-if="activeData['inactive-text'] !== undefined" label="关闭提示">
<el-input v-model="activeData['inactive-text']" placeholder="请输入关闭提示" />
</el-form-item>
<el-form-item v-if="activeData['active-value'] !== undefined" label="开启值">
<el-input
:value="setDefaultValue(activeData['active-value'])"
placeholder="请输入开启值"
@input="onSwitchValueInput($event, 'active-value')"
/>
</el-form-item>
<el-form-item v-if="activeData['inactive-value'] !== undefined" label="关闭值">
<el-input
:value="setDefaultValue(activeData['inactive-value'])"
placeholder="请输入关闭值"
@input="onSwitchValueInput($event, 'inactive-value')"
/>
</el-form-item>
<el-form-item
v-if="activeData.type !== undefined && 'el-date-picker' === activeData.tag"
label="时间类型"
>
<el-select
v-model="activeData.type"
placeholder="请选择时间类型"
:style="{ width: '100%' }"
@change="dateTypeChange"
>
<el-option
v-for="(item, index) in dateOptions"
:key="index"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item v-if="activeData.name !== undefined" label="文件字段名">
<el-input v-model="activeData.name" placeholder="请输入上传文件字段名" />
</el-form-item>
<el-form-item v-if="activeData.accept !== undefined" label="文件类型">
<el-select
v-model="activeData.accept"
placeholder="请选择文件类型"
:style="{ width: '100%' }"
clearable
>
<el-option label="图片" value="image/*" />
<el-option label="视频" value="video/*" />
<el-option label="音频" value="audio/*" />
<el-option label="excel" value=".xls,.xlsx" />
<el-option label="word" value=".doc,.docx" />
<el-option label="pdf" value=".pdf" />
<el-option label="txt" value=".txt" />
</el-select>
</el-form-item>
<el-form-item v-if="activeData.fileSize !== undefined" label="文件大小">
<el-input v-model.number="activeData.fileSize" placeholder="请输入文件大小">
<el-select slot="append" v-model="activeData.sizeUnit" :style="{ width: '66px' }">
<el-option label="KB" value="KB" />
<el-option label="MB" value="MB" />
<el-option label="GB" value="GB" />
</el-select>
</el-input>
</el-form-item>
<el-form-item v-if="activeData.action !== undefined" label="上传地址">
<el-input v-model="activeData.action" placeholder="请输入上传地址" clearable />
</el-form-item>
<el-form-item v-if="activeData['list-type'] !== undefined" label="列表类型">
<el-radio-group v-model="activeData['list-type']" size="small">
<el-radio-button label="text">
text
</el-radio-button>
<el-radio-button label="picture">
picture
</el-radio-button>
<el-radio-button label="picture-card">
picture-card
</el-radio-button>
</el-radio-group>
</el-form-item>
<el-form-item
v-if="activeData.buttonText !== undefined"
v-show="'picture-card' !== activeData['list-type']"
label="按钮文字"
>
<el-input v-model="activeData.buttonText" placeholder="请输入按钮文字" />
</el-form-item>
<el-form-item v-if="activeData['range-separator'] !== undefined" label="分隔符">
<el-input v-model="activeData['range-separator']" placeholder="请输入分隔符" />
</el-form-item>
<el-form-item v-if="activeData['picker-options'] !== undefined" label="时间段">
<el-input
v-model="activeData['picker-options'].selectableRange"
placeholder="请输入时间段"
/>
</el-form-item>
<el-form-item v-if="activeData.format !== undefined" label="时间格式">
<el-input
:value="activeData.format"
placeholder="请输入时间格式"
@input="setTimeValue($event)"
/>
</el-form-item>
<template v-if="['el-checkbox-group', 'el-radio-group', 'el-select'].indexOf(activeData.tag) > -1">
<el-divider>选项</el-divider>
<draggable
:list="activeData.options"
:animation="340"
group="selectItem"
handle=".option-drag"
>
<div v-for="(item, index) in activeData.options" :key="index" class="select-item">
<div class="select-line-icon option-drag">
<i class="el-icon-s-operation" />
</div>
<el-input v-model="item.label" placeholder="选项名" size="small" />
<el-input
placeholder="选项值"
size="small"
:value="item.value"
@input="setOptionValue(item, $event)"
/>
<div class="close-btn select-line-icon" @click="activeData.options.splice(index, 1)">
<i class="el-icon-remove-outline" />
</div>
</div>
</draggable>
<div style="margin-left: 20px;">
<el-button
style="padding-bottom: 0"
icon="el-icon-circle-plus-outline"
type="text"
@click="addSelectItem"
>
添加选项
</el-button>
</div>
<el-divider />
</template>
<template v-if="['el-cascader'].indexOf(activeData.tag) > -1">
<el-divider>选项</el-divider>
<el-form-item label="数据类型">
<el-radio-group v-model="activeData.dataType" size="small">
<el-radio-button label="dynamic">
动态数据
</el-radio-button>
<el-radio-button label="static">
静态数据
</el-radio-button>
</el-radio-group>
</el-form-item>
<template v-if="activeData.dataType === 'dynamic'">
<el-form-item label="标签键名">
<el-input v-model="activeData.labelKey" placeholder="请输入标签键名" />
</el-form-item>
<el-form-item label="值键名">
<el-input v-model="activeData.valueKey" placeholder="请输入值键名" />
</el-form-item>
<el-form-item label="子级键名">
<el-input v-model="activeData.childrenKey" placeholder="请输入子级键名" />
</el-form-item>
</template>
<el-tree
v-if="activeData.dataType === 'static'"
draggable
:data="activeData.options"
node-key="id"
:expand-on-click-node="false"
:render-content="renderContent"
/>
<div v-if="activeData.dataType === 'static'" style="margin-left: 20px">
<el-button
style="padding-bottom: 0"
icon="el-icon-circle-plus-outline"
type="text"
@click="addTreeItem"
>
添加父级
</el-button>
</div>
<el-divider />
</template>
<el-form-item v-if="activeData.optionType !== undefined" label="选项样式">
<el-radio-group v-model="activeData.optionType">
<el-radio-button label="default">
默认
</el-radio-button>
<el-radio-button label="button">
按钮
</el-radio-button>
</el-radio-group>
</el-form-item>
<el-form-item v-if="activeData['active-color'] !== undefined" label="开启颜色">
<el-color-picker v-model="activeData['active-color']" />
</el-form-item>
<el-form-item v-if="activeData['inactive-color'] !== undefined" label="关闭颜色">
<el-color-picker v-model="activeData['inactive-color']" />
</el-form-item>
<el-form-item v-if="activeData['allow-half'] !== undefined" label="允许半选">
<el-switch v-model="activeData['allow-half']" />
</el-form-item>
<el-form-item v-if="activeData['show-text'] !== undefined" label="辅助文字">
<el-switch v-model="activeData['show-text']" @change="rateTextChange" />
</el-form-item>
<el-form-item v-if="activeData['show-score'] !== undefined" label="显示分数">
<el-switch v-model="activeData['show-score']" @change="rateScoreChange" />
</el-form-item>
<el-form-item v-if="activeData['show-stops'] !== undefined" label="显示间断点">
<el-switch v-model="activeData['show-stops']" />
</el-form-item>
<el-form-item v-if="activeData.range !== undefined" label="范围选择">
<el-switch v-model="activeData.range" @change="rangeChange" />
</el-form-item>
<el-form-item
v-if="activeData.border !== undefined && activeData.optionType === 'default'"
label="是否带边框"
>
<el-switch v-model="activeData.border" />
</el-form-item>
<el-form-item v-if="activeData.tag === 'el-color-picker'" label="颜色格式">
<el-select
v-model="activeData['color-format']"
placeholder="请选择颜色格式"
:style="{ width: '100%' }"
@change="colorFormatChange"
>
<el-option
v-for="(item, index) in colorFormatOptions"
:key="index"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item
v-if="activeData.size !== undefined &&
(activeData.optionType === 'button' ||
activeData.border ||
activeData.tag === 'el-color-picker')"
label="选项尺寸"
>
<el-radio-group v-model="activeData.size">
<el-radio-button label="medium">
中等
</el-radio-button>
<el-radio-button label="small">
较小
</el-radio-button>
<el-radio-button label="mini">
迷你
</el-radio-button>
</el-radio-group>
</el-form-item>
<el-form-item v-if="activeData['show-word-limit'] !== undefined" label="输入统计">
<el-switch v-model="activeData['show-word-limit']" />
</el-form-item>
<el-form-item v-if="activeData.tag === 'el-input-number'" label="严格步数">
<el-switch v-model="activeData['step-strictly']" />
</el-form-item>
<el-form-item v-if="activeData.tag === 'el-cascader'" label="是否多选">
<el-switch v-model="activeData.props.props.multiple" />
</el-form-item>
<el-form-item v-if="activeData.tag === 'el-cascader'" label="展示全路径">
<el-switch v-model="activeData['show-all-levels']" />
</el-form-item>
<el-form-item v-if="activeData.tag === 'el-cascader'" label="可否筛选">
<el-switch v-model="activeData.filterable" />
</el-form-item>
<el-form-item v-if="activeData.clearable !== undefined" label="能否清空">
<el-switch v-model="activeData.clearable" />
</el-form-item>
<el-form-item v-if="activeData.showTip !== undefined" label="显示提示">
<el-switch v-model="activeData.showTip" />
</el-form-item>
<el-form-item v-if="activeData.multiple !== undefined" label="多选文件">
<el-switch v-model="activeData.multiple" />
</el-form-item>
<el-form-item v-if="activeData['auto-upload'] !== undefined" label="自动上传">
<el-switch v-model="activeData['auto-upload']" />
</el-form-item>
<el-form-item v-if="activeData.readonly !== undefined" label="是否只读">
<el-switch v-model="activeData.readonly" />
</el-form-item>
<el-form-item v-if="activeData.disabled !== undefined" label="是否禁用">
<el-switch v-model="activeData.disabled" />
</el-form-item>
<el-form-item v-if="activeData.tag === 'el-select'" label="是否可搜索">
<el-switch v-model="activeData.filterable" />
</el-form-item>
<el-form-item v-if="activeData.tag === 'el-select'" label="是否多选">
<el-switch v-model="activeData.multiple" @change="multipleChange" />
</el-form-item>
<el-form-item v-if="activeData.required !== undefined" label="是否必填">
<el-switch v-model="activeData.required" />
</el-form-item>
<template v-if="activeData.layoutTree">
<el-divider>布局结构树</el-divider>
<el-tree
:data="[activeData]"
:props="layoutTreeProps"
node-key="renderKey"
default-expand-all
draggable
>
<span slot-scope="{ node, data }">
<span class="node-label">
<svg-icon class="node-icon" :icon-class="data.tagIcon" />
{{ node.label }}
</span>
</span>
</el-tree>
</template>
<template v-if="activeData.layout === 'colFormItem' && activeData.tag !== 'el-button'">
<el-divider>正则校验</el-divider>
<div
v-for="(item, index) in activeData.regList"
:key="index"
class="reg-item"
>
<span class="close-btn" @click="activeData.regList.splice(index, 1)">
<i class="el-icon-close" />
</span>
<el-form-item label="表达式">
<el-input v-model="item.pattern" placeholder="请输入正则" />
</el-form-item>
<el-form-item label="错误提示" style="margin-bottom:0">
<el-input v-model="item.message" placeholder="请输入错误提示" />
</el-form-item>
</div>
<div style="margin-left: 20px">
<el-button icon="el-icon-circle-plus-outline" type="text" @click="addReg">
添加规则
</el-button>
</div>
</template>
</el-form>
<!-- 表单属性 -->
<el-form v-show="currentTab === 'form'" size="small" label-width="90px">
<el-form-item label="表单名">
<el-input v-model="formConf.formRef" placeholder="请输入表单名(ref)" />
</el-form-item>
<el-form-item label="表单模型">
<el-input v-model="formConf.formModel" placeholder="请输入数据模型" />
</el-form-item>
<el-form-item label="校验模型">
<el-input v-model="formConf.formRules" placeholder="请输入校验模型" />
</el-form-item>
<el-form-item label="表单尺寸">
<el-radio-group v-model="formConf.size">
<el-radio-button label="medium">
中等
</el-radio-button>
<el-radio-button label="small">
较小
</el-radio-button>
<el-radio-button label="mini">
迷你
</el-radio-button>
</el-radio-group>
</el-form-item>
<el-form-item label="标签对齐">
<el-radio-group v-model="formConf.labelPosition">
<el-radio-button label="left">
左对齐
</el-radio-button>
<el-radio-button label="right">
右对齐
</el-radio-button>
<el-radio-button label="top">
顶部对齐
</el-radio-button>
</el-radio-group>
</el-form-item>
<el-form-item label="标签宽度">
<el-input-number v-model="formConf.labelWidth" placeholder="标签宽度" />
</el-form-item>
<el-form-item label="栅格间隔">
<el-input-number v-model="formConf.gutter" :min="0" placeholder="栅格间隔" />
</el-form-item>
<el-form-item label="禁用表单">
<el-switch v-model="formConf.disabled" />
</el-form-item>
<el-form-item label="表单按钮">
<el-switch v-model="formConf.formBtns" />
</el-form-item>
<el-form-item label="显示未选中组件边框">
<el-switch v-model="formConf.unFocusedComponentBorder" />
</el-form-item>
</el-form>
</el-scrollbar>
</div>
<treeNode-dialog :visible.sync="dialogVisible" title="添加选项" @commit="addNode" />
<icons-dialog :visible.sync="iconsVisible" :current="activeData[currentIconModel]" @select="setIcon" />
</div>
</template>
<script>
import { isArray } from 'util'
import draggable from 'vuedraggable'
import TreeNodeDialog from './TreeNodeDialog'
import { isNumberStr } from '@/utils/index'
import IconsDialog from './IconsDialog'
import {
inputComponents,
selectComponents,
layoutComponents
} from '@/utils/generator/config'
const dateTimeFormat = {
date: 'yyyy-MM-dd',
week: 'yyyy 第 WW 周',
month: 'yyyy-MM',
year: 'yyyy',
datetime: 'yyyy-MM-dd HH:mm:ss',
daterange: 'yyyy-MM-dd',
monthrange: 'yyyy-MM',
datetimerange: 'yyyy-MM-dd HH:mm:ss'
}
export default {
components: {
draggable,
TreeNodeDialog,
IconsDialog
},
props: ['showField', 'activeData', 'formConf'],
data() {
return {
currentTab: 'field',
currentNode: null,
dialogVisible: false,
iconsVisible: false,
currentIconModel: null,
dateTypeOptions: [
{
label: '日(date)',
value: 'date'
},
{
label: '周(week)',
value: 'week'
},
{
label: '月(month)',
value: 'month'
},
{
label: '年(year)',
value: 'year'
},
{
label: '日期时间(datetime)',
value: 'datetime'
}
],
dateRangeTypeOptions: [
{
label: '日期范围(daterange)',
value: 'daterange'
},
{
label: '月范围(monthrange)',
value: 'monthrange'
},
{
label: '日期时间范围(datetimerange)',
value: 'datetimerange'
}
],
colorFormatOptions: [
{
label: 'hex',
value: 'hex'
},
{
label: 'rgb',
value: 'rgb'
},
{
label: 'rgba',
value: 'rgba'
},
{
label: 'hsv',
value: 'hsv'
},
{
label: 'hsl',
value: 'hsl'
}
],
justifyOptions: [
{
label: 'start',
value: 'start'
},
{
label: 'end',
value: 'end'
},
{
label: 'center',
value: 'center'
},
{
label: 'space-around',
value: 'space-around'
},
{
label: 'space-between',
value: 'space-between'
}
],
layoutTreeProps: {
label(data, node) {
return data.componentName || `${data.label}: ${data.vModel}`
}
}
}
},
computed: {
documentLink() {
return (
this.activeData.document
|| 'https://element.eleme.cn/#/zh-CN/component/installation'
)
},
dateOptions() {
if (
this.activeData.type !== undefined
&& this.activeData.tag === 'el-date-picker'
) {
if (this.activeData['start-placeholder'] === undefined) {
return this.dateTypeOptions
}
return this.dateRangeTypeOptions
}
return []
},
tagList() {
return [
{
label: '输入型组件',
options: inputComponents
},
{
label: '选择型组件',
options: selectComponents
}
]
}
},
methods: {
addReg() {
this.activeData.regList.push({
pattern: '',
message: ''
})
},
addSelectItem() {
this.activeData.options.push({
label: '',
value: ''
})
},
addTreeItem() {
++this.idGlobal
this.dialogVisible = true
this.currentNode = this.activeData.options
},
renderContent(h, { node, data, store }) {
return (
<div class="custom-tree-node">
<span>{node.label}</span>
<span class="node-operation">
<i on-click={() => this.append(data)}
class="el-icon-plus"
title="添加"
></i>
<i on-click={() => this.remove(node, data)}
class="el-icon-delete"
title="删除"
></i>
</span>
</div>
)
},
append(data) {
if (!data.children) {
this.$set(data, 'children', [])
}
this.dialogVisible = true
this.currentNode = data.children
},
remove(node, data) {
const { parent } = node
const children = parent.data.children || parent.data
const index = children.findIndex(d => d.id === data.id)
children.splice(index, 1)
},
addNode(data) {
this.currentNode.push(data)
},
setOptionValue(item, val) {
item.value = isNumberStr(val) ? +val : val
},
setDefaultValue(val) {
if (Array.isArray(val)) {
return val.join(',')
}
if (['string', 'number'].indexOf(val) > -1) {
return val
}
if (typeof val === 'boolean') {
return `${val}`
}
return val
},
onDefaultValueInput(str) {
if (isArray(this.activeData.defaultValue)) {
// 数组
this.$set(
this.activeData,
'defaultValue',
str.split(',').map(val => (isNumberStr(val) ? +val : val))
)
} else if (['true', 'false'].indexOf(str) > -1) {
// 布尔
this.$set(this.activeData, 'defaultValue', JSON.parse(str))
} else {
// 字符串和数字
this.$set(
this.activeData,
'defaultValue',
isNumberStr(str) ? +str : str
)
}
},
onSwitchValueInput(val, name) {
if (['true', 'false'].indexOf(val) > -1) {
this.$set(this.activeData, name, JSON.parse(val))
} else {
this.$set(this.activeData, name, isNumberStr(val) ? +val : val)
}
},
setTimeValue(val, type) {
const valueFormat = type === 'week' ? dateTimeFormat.date : val
this.$set(this.activeData, 'defaultValue', null)
this.$set(this.activeData, 'value-format', valueFormat)
this.$set(this.activeData, 'format', val)
},
spanChange(val) {
this.formConf.span = val
},
multipleChange(val) {
this.$set(this.activeData, 'defaultValue', val ? [] : '')
},
dateTypeChange(val) {
this.setTimeValue(dateTimeFormat[val], val)
},
rangeChange(val) {
this.$set(
this.activeData,
'defaultValue',
val ? [this.activeData.min, this.activeData.max] : this.activeData.min
)
},
rateTextChange(val) {
if (val) this.activeData['show-score'] = false
},
rateScoreChange(val) {
if (val) this.activeData['show-text'] = false
},
colorFormatChange(val) {
this.activeData.defaultValue = null
this.activeData['show-alpha'] = val.indexOf('a') > -1
this.activeData.renderKey = +new Date() // 更新renderKey,重新渲染该组件
},
openIconsDialog(model) {
this.iconsVisible = true
this.currentIconModel = model
},
setIcon(val) {
this.activeData[this.currentIconModel] = val
},
tagChange(tagIcon) {
let target = inputComponents.find(item => item.tagIcon === tagIcon)
if (!target) target = selectComponents.find(item => item.tagIcon === tagIcon)
this.$emit('tag-change', target)
}
}
}
</script>
<style lang="scss" scoped>
.right-board {
width: 350px;
position: absolute;
right: 0;
top: 0;
padding-top: 3px;
.field-box {
position: relative;
height: calc(100vh - 42px);
box-sizing: border-box;
overflow: hidden;
}
.el-scrollbar {
height: 100%;
}
}
.select-item {
display: flex;
border: 1px dashed #fff;
box-sizing: border-box;
& .close-btn {
cursor: pointer;
color: #f56c6c;
}
& .el-input + .el-input {
margin-left: 4px;
}
}
.select-item + .select-item {
margin-top: 4px;
}
.select-item.sortable-chosen {
border: 1px dashed #409eff;
}
.select-line-icon {
line-height: 32px;
font-size: 22px;
padding: 0 4px;
color: #777;
}
.option-drag {
cursor: move;
}
.time-range {
.el-date-editor {
width: 227px;
}
::v-deep .el-icon-time {
display: none;
}
}
.document-link {
position: absolute;
display: block;
width: 26px;
height: 26px;
top: 0;
left: 0;
cursor: pointer;
background: #409eff;
z-index: 1;
border-radius: 0 0 6px 0;
text-align: center;
line-height: 26px;
color: #fff;
font-size: 18px;
}
.node-label{
font-size: 14px;
}
.node-icon{
color: #bebfc3;
}
</style>
-149
View File
@@ -1,149 +0,0 @@
<template>
<div>
<el-dialog
v-bind="$attrs"
:close-on-click-modal="false"
:modal-append-to-body="false"
v-on="$listeners"
@open="onOpen"
@close="onClose"
>
<el-row :gutter="0">
<el-form
ref="elForm"
:model="formData"
:rules="rules"
size="small"
label-width="100px"
>
<el-col :span="24">
<el-form-item
label="选项名"
prop="label"
>
<el-input
v-model="formData.label"
placeholder="请输入选项名"
clearable
/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item
label="选项值"
prop="value"
>
<el-input
v-model="formData.value"
placeholder="请输入选项值"
clearable
>
<el-select
slot="append"
v-model="dataType"
:style="{width: '100px'}"
>
<el-option
v-for="(item, index) in dataTypeOptions"
:key="index"
:label="item.label"
:value="item.value"
:disabled="item.disabled"
/>
</el-select>
</el-input>
</el-form-item>
</el-col>
</el-form>
</el-row>
<div slot="footer">
<el-button
type="primary"
@click="handleConfirm"
>
确定
</el-button>
<el-button @click="close">
取消
</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { isNumberStr } from '@/utils/index'
export default {
components: {},
inheritAttrs: false,
props: [],
data() {
return {
id: 100,
formData: {
label: undefined,
value: undefined
},
rules: {
label: [
{
required: true,
message: '请输入选项名',
trigger: 'blur'
}
],
value: [
{
required: true,
message: '请输入选项值',
trigger: 'blur'
}
]
},
dataType: 'string',
dataTypeOptions: [
{
label: '字符串',
value: 'string'
},
{
label: '数字',
value: 'number'
}
]
}
},
computed: {},
watch: {
// eslint-disable-next-line func-names
'formData.value': function (val) {
this.dataType = isNumberStr(val) ? 'number' : 'string'
}
},
created() {},
mounted() {},
methods: {
onOpen() {
this.formData = {
label: undefined,
value: undefined
}
},
onClose() {},
close() {
this.$emit('update:visible', false)
},
handleConfirm() {
this.$refs.elForm.validate(valid => {
if (!valid) return
if (this.dataType === 'number') {
this.formData.value = parseFloat(this.formData.value)
}
this.formData.id = this.id++
this.$emit('commit', this.formData)
this.close()
})
}
}
}
</script>
-768
View File
@@ -1,768 +0,0 @@
<template>
<div class="container">
<div class="left-board">
<div class="logo-wrapper">
<div class="logo">
<img :src="logo" alt="logo"> Form Generator
</div>
</div>
<el-scrollbar class="left-scrollbar">
<div class="components-list">
<div class="components-title">
<svg-icon icon-class="component" />输入型组件
</div>
<draggable
class="components-draggable"
:list="inputComponents"
:group="{ name: 'componentsGroup', pull: 'clone', put: false }"
:clone="cloneComponent"
draggable=".components-item"
:sort="false"
@end="onEnd"
>
<div
v-for="(element, index) in inputComponents" :key="index" class="components-item"
@click="addComponent(element)"
>
<div class="components-body">
<svg-icon :icon-class="element.tagIcon" />
{{ element.label }}
</div>
</div>
</draggable>
<div class="components-title">
<svg-icon icon-class="component" />选择型组件
</div>
<draggable
class="components-draggable"
:list="selectComponents"
:group="{ name: 'componentsGroup', pull: 'clone', put: false }"
:clone="cloneComponent"
draggable=".components-item"
:sort="false"
@end="onEnd"
>
<div
v-for="(element, index) in selectComponents"
:key="index"
class="components-item"
@click="addComponent(element)"
>
<div class="components-body">
<svg-icon :icon-class="element.tagIcon" />
{{ element.label }}
</div>
</div>
</draggable>
<div class="components-title">
<svg-icon icon-class="component" /> 布局型组件
</div>
<draggable
class="components-draggable" :list="layoutComponents"
:group="{ name: 'componentsGroup', pull: 'clone', put: false }" :clone="cloneComponent"
draggable=".components-item" :sort="false" @end="onEnd"
>
<div
v-for="(element, index) in layoutComponents" :key="index" class="components-item"
@click="addComponent(element)"
>
<div class="components-body">
<svg-icon :icon-class="element.tagIcon" />
{{ element.label }}
</div>
</div>
</draggable>
</div>
</el-scrollbar>
</div>
<div class="center-board">
<div class="action-bar">
<el-button icon="el-icon-download" type="text" @click="download">
导出vue文件
</el-button>
<el-button class="copy-btn-main" icon="el-icon-document-copy" type="text" @click="copy">
复制代码
</el-button>
<el-button class="delete-btn" icon="el-icon-delete" type="text" @click="empty">
清空
</el-button>
</div>
<el-scrollbar class="center-scrollbar">
<el-row class="center-board-row" :gutter="formConf.gutter">
<el-form
:size="formConf.size"
:label-position="formConf.labelPosition"
:disabled="formConf.disabled"
:label-width="formConf.labelWidth + 'px'"
>
<draggable class="drawing-board" :list="drawingList" :animation="340" group="componentsGroup">
<draggable-item
v-for="(element, index) in drawingList"
:key="element.renderKey"
:drawing-list="drawingList"
:element="element"
:index="index"
:active-id="activeId"
:form-conf="formConf"
@activeItem="activeFormItem"
@copyItem="drawingItemCopy"
@deleteItem="drawingItemDelete"
/>
</draggable>
<div v-show="!drawingList.length" class="empty-info">
从左侧拖入或点选组件进行表单设计
</div>
</el-form>
</el-row>
</el-scrollbar>
</div>
<right-panel
:active-data="activeData"
:form-conf="formConf"
:show-field="!!drawingList.length"
@tag-change="tagChange"
/>
<code-type-dialog
:visible.sync="dialogVisible"
title="选择生成类型"
:show-file-name="showFileName"
@confirm="generate"
/>
<input id="copyNode" type="hidden">
</div>
</template>
<script>
import draggable from 'vuedraggable'
import beautifier from 'js-beautify'
import ClipboardJS from 'clipboard'
import render from '@/utils/generator/render'
import RightPanel from './RightPanel'
import { inputComponents, selectComponents, layoutComponents, formConf } from '@/utils/generator/config'
import { beautifierConf, titleCase } from '@/utils/index'
import { makeUpHtml, vueTemplate, vueScript, cssStyle } from '@/utils/generator/html'
import { makeUpJs } from '@/utils/generator/js'
import { makeUpCss } from '@/utils/generator/css'
import drawingDefault from '@/utils/generator/drawingDefault'
import logo from '@/assets/logo/logo.png'
import CodeTypeDialog from './CodeTypeDialog'
import DraggableItem from './DraggableItem'
let oldActiveId
let tempActiveData
export default {
components: {
draggable,
render,
RightPanel,
CodeTypeDialog,
DraggableItem
},
data() {
return {
logo,
idGlobal: 100,
formConf,
inputComponents,
selectComponents,
layoutComponents,
labelWidth: 100,
drawingList: drawingDefault,
drawingData: {},
activeId: drawingDefault[0].formId,
drawerVisible: false,
formData: {},
dialogVisible: false,
generateConf: null,
showFileName: false,
activeData: drawingDefault[0]
}
},
created() {
// 防止 firefox 下 拖拽 会新打卡一个选项卡
document.body.ondrop = event => {
event.preventDefault()
event.stopPropagation()
}
},
watch: {
// eslint-disable-next-line func-names
'activeData.label': function (val, oldVal) {
if (
this.activeData.placeholder === undefined
|| !this.activeData.tag
|| oldActiveId !== this.activeId
) {
return
}
this.activeData.placeholder = this.activeData.placeholder.replace(oldVal, '') + val
},
activeId: {
handler(val) {
oldActiveId = val
},
immediate: true
}
},
mounted() {
const clipboard = new ClipboardJS('#copyNode', {
text: trigger => {
const codeStr = this.generateCode()
this.$notify({
title: '成功',
message: '代码已复制到剪切板,可粘贴。',
type: 'success'
})
return codeStr
}
})
clipboard.on('error', e => {
this.$message.error('代码复制失败')
})
},
methods: {
activeFormItem(element) {
this.activeData = element
this.activeId = element.formId
},
onEnd(obj, a) {
if (obj.from !== obj.to) {
this.activeData = tempActiveData
this.activeId = this.idGlobal
}
},
addComponent(item) {
const clone = this.cloneComponent(item)
this.drawingList.push(clone)
this.activeFormItem(clone)
},
cloneComponent(origin) {
const clone = JSON.parse(JSON.stringify(origin))
clone.formId = ++this.idGlobal
clone.span = formConf.span
clone.renderKey = +new Date() // 改变renderKey后可以实现强制更新组件
if (!clone.layout) clone.layout = 'colFormItem'
if (clone.layout === 'colFormItem') {
clone.vModel = `field${this.idGlobal}`
clone.placeholder !== undefined && (clone.placeholder += clone.label)
tempActiveData = clone
} else if (clone.layout === 'rowFormItem') {
delete clone.label
clone.componentName = `row${this.idGlobal}`
clone.gutter = this.formConf.gutter
tempActiveData = clone
}
return tempActiveData
},
AssembleFormData() {
this.formData = {
fields: JSON.parse(JSON.stringify(this.drawingList)),
...this.formConf
}
},
generate(data) {
const func = this[`exec${titleCase(this.operationType)}`]
this.generateConf = data
func && func(data)
},
execRun(data) {
this.AssembleFormData()
this.drawerVisible = true
},
execDownload(data) {
const codeStr = this.generateCode()
const blob = new Blob([codeStr], { type: 'text/plain;charset=utf-8' })
this.$download.saveAs(blob, data.fileName)
},
execCopy(data) {
document.getElementById('copyNode').click()
},
empty() {
this.$confirm('确定要清空所有组件吗?', '提示', { type: 'warning' }).then(
() => {
this.drawingList = []
}
)
},
drawingItemCopy(item, parent) {
let clone = JSON.parse(JSON.stringify(item))
clone = this.createIdAndKey(clone)
parent.push(clone)
this.activeFormItem(clone)
},
createIdAndKey(item) {
item.formId = ++this.idGlobal
item.renderKey = +new Date()
if (item.layout === 'colFormItem') {
item.vModel = `field${this.idGlobal}`
} else if (item.layout === 'rowFormItem') {
item.componentName = `row${this.idGlobal}`
}
if (Array.isArray(item.children)) {
item.children = item.children.map(childItem => this.createIdAndKey(childItem))
}
return item
},
drawingItemDelete(index, parent) {
parent.splice(index, 1)
this.$nextTick(() => {
const len = this.drawingList.length
if (len) {
this.activeFormItem(this.drawingList[len - 1])
}
})
},
generateCode() {
const { type } = this.generateConf
this.AssembleFormData()
const script = vueScript(makeUpJs(this.formData, type))
const html = vueTemplate(makeUpHtml(this.formData, type))
const css = cssStyle(makeUpCss(this.formData))
return beautifier.html(html + script + css, beautifierConf.html)
},
download() {
this.dialogVisible = true
this.showFileName = true
this.operationType = 'download'
},
run() {
this.dialogVisible = true
this.showFileName = false
this.operationType = 'run'
},
copy() {
this.dialogVisible = true
this.showFileName = false
this.operationType = 'copy'
},
tagChange(newTag) {
newTag = this.cloneComponent(newTag)
newTag.vModel = this.activeData.vModel
newTag.formId = this.activeId
newTag.span = this.activeData.span
delete this.activeData.tag
delete this.activeData.tagIcon
delete this.activeData.document
Object.keys(newTag).forEach(key => {
if (this.activeData[key] !== undefined
&& typeof this.activeData[key] === typeof newTag[key]) {
newTag[key] = this.activeData[key]
}
})
this.activeData = newTag
this.updateDrawingList(newTag, this.drawingList)
},
updateDrawingList(newTag, list) {
const index = list.findIndex(item => item.formId === this.activeId)
if (index > -1) {
list.splice(index, 1, newTag)
} else {
list.forEach(item => {
if (Array.isArray(item.children)) this.updateDrawingList(newTag, item.children)
})
}
}
}
}
</script>
<style lang='scss'>
.editor-tabs{
background: #121315;
.el-tabs__header{
margin: 0;
border-bottom-color: #121315;
.el-tabs__nav{
border-color: #121315;
}
}
.el-tabs__item{
height: 32px;
line-height: 32px;
color: #888a8e;
border-left: 1px solid #121315 !important;
background: #363636;
margin-right: 5px;
user-select: none;
}
.el-tabs__item.is-active{
background: #1e1e1e;
border-bottom-color: #1e1e1e!important;
color: #fff;
}
.el-icon-edit{
color: #f1fa8c;
}
.el-icon-document{
color: #a95812;
}
}
// home
.right-scrollbar {
.el-scrollbar__view {
padding: 12px 18px 15px 15px;
}
}
.left-scrollbar .el-scrollbar__wrap {
box-sizing: border-box;
overflow-x: hidden !important;
margin-bottom: 0 !important;
}
.center-tabs{
.el-tabs__header{
margin-bottom: 0!important;
}
.el-tabs__item{
width: 50%;
text-align: center;
}
.el-tabs__nav{
width: 100%;
}
}
.reg-item{
padding: 12px 6px;
background: #f8f8f8;
position: relative;
border-radius: 4px;
.close-btn{
position: absolute;
right: -6px;
top: -6px;
display: block;
width: 16px;
height: 16px;
line-height: 16px;
background: rgba(0, 0, 0, 0.2);
border-radius: 50%;
color: #fff;
text-align: center;
z-index: 1;
cursor: pointer;
font-size: 12px;
&:hover{
background: rgba(210, 23, 23, 0.5)
}
}
& + .reg-item{
margin-top: 18px;
}
}
.action-bar{
& .el-button+.el-button {
margin-left: 15px;
}
& i {
font-size: 20px;
vertical-align: middle;
position: relative;
top: -1px;
}
}
.custom-tree-node{
width: 100%;
font-size: 14px;
.node-operation{
float: right;
}
i[class*="el-icon"] + i[class*="el-icon"]{
margin-left: 6px;
}
.el-icon-plus{
color: #409EFF;
}
.el-icon-delete{
color: #157a0c;
}
}
.left-scrollbar .el-scrollbar__view{
overflow-x: hidden;
}
.el-rate{
display: inline-block;
vertical-align: text-top;
}
.el-upload__tip{
line-height: 1.2;
}
$selectedColor: #f6f7ff;
$lighterBlue: #409EFF;
.container {
position: relative;
width: 100%;
height: 100%;
}
.components-list {
padding: 8px;
box-sizing: border-box;
height: 100%;
.components-item {
display: inline-block;
width: 48%;
margin: 1%;
transition: transform 0ms !important;
}
}
.components-draggable{
padding-bottom: 20px;
}
.components-title{
font-size: 14px;
color: #222;
margin: 6px 2px;
.svg-icon{
color: #666;
font-size: 18px;
}
}
.components-body {
padding: 8px 10px;
background: $selectedColor;
font-size: 12px;
cursor: move;
border: 1px dashed $selectedColor;
border-radius: 3px;
.svg-icon{
color: #777;
font-size: 15px;
}
&:hover {
border: 1px dashed #787be8;
color: #787be8;
.svg-icon {
color: #787be8;
}
}
}
.left-board {
width: 260px;
position: absolute;
left: 0;
top: 0;
height: 100vh;
}
.left-scrollbar{
height: calc(100vh - 42px);
overflow: hidden;
}
.center-scrollbar {
height: calc(100vh - 42px);
overflow: hidden;
border-left: 1px solid #f1e8e8;
border-right: 1px solid #f1e8e8;
box-sizing: border-box;
}
.center-board {
height: 100vh;
width: auto;
margin: 0 350px 0 260px;
box-sizing: border-box;
}
.empty-info{
position: absolute;
top: 46%;
left: 0;
right: 0;
text-align: center;
font-size: 18px;
color: #ccb1ea;
letter-spacing: 4px;
}
.action-bar{
position: relative;
height: 42px;
text-align: right;
padding: 0 15px;
box-sizing: border-box;;
border: 1px solid #f1e8e8;
border-top: none;
border-left: none;
.delete-btn{
color: #F56C6C;
}
}
.logo-wrapper{
position: relative;
height: 42px;
background: #fff;
border-bottom: 1px solid #f1e8e8;
box-sizing: border-box;
}
.logo{
position: absolute;
left: 12px;
top: 6px;
line-height: 30px;
color: #00afff;
font-weight: 600;
font-size: 17px;
white-space: nowrap;
> img{
width: 30px;
height: 30px;
vertical-align: top;
}
.github{
display: inline-block;
vertical-align: sub;
margin-left: 15px;
> img{
height: 22px;
}
}
}
.center-board-row {
padding: 12px 12px 15px 12px;
box-sizing: border-box;
& > .el-form {
// 69 = 12+15+42
height: calc(100vh - 69px);
}
}
.drawing-board {
height: 100%;
position: relative;
.components-body {
padding: 0;
margin: 0;
font-size: 0;
}
.sortable-ghost {
position: relative;
display: block;
overflow: hidden;
&::before {
content: " ";
position: absolute;
left: 0;
right: 0;
top: 0;
height: 3px;
background: rgb(89, 89, 223);
z-index: 2;
}
}
.components-item.sortable-ghost {
width: 100%;
height: 60px;
background-color: $selectedColor;
}
.active-from-item {
& > .el-form-item{
background: $selectedColor;
border-radius: 6px;
}
& > .drawing-item-copy, & > .drawing-item-delete{
display: initial;
}
& > .component-name{
color: $lighterBlue;
}
}
.el-form-item{
margin-bottom: 15px;
}
}
.drawing-item{
position: relative;
cursor: move;
&.unfocus-bordered:not(.activeFromItem) > div:first-child {
border: 1px dashed #ccc;
}
.el-form-item{
padding: 12px 10px;
}
}
.drawing-row-item{
position: relative;
cursor: move;
box-sizing: border-box;
border: 1px dashed #ccc;
border-radius: 3px;
padding: 0 2px;
margin-bottom: 15px;
.drawing-row-item {
margin-bottom: 2px;
}
.el-col{
margin-top: 22px;
}
.el-form-item{
margin-bottom: 0;
}
.drag-wrapper{
min-height: 80px;
}
&.active-from-item{
border: 1px dashed $lighterBlue;
}
.component-name{
position: absolute;
top: 0;
left: 0;
font-size: 12px;
color: #bbb;
display: inline-block;
padding: 0 6px;
}
}
.drawing-item, .drawing-row-item{
&:hover {
& > .el-form-item{
background: $selectedColor;
border-radius: 6px;
}
& > .drawing-item-copy, & > .drawing-item-delete{
display: initial;
}
}
& > .drawing-item-copy, & > .drawing-item-delete{
display: none;
position: absolute;
top: -10px;
width: 22px;
height: 22px;
line-height: 22px;
text-align: center;
border-radius: 50%;
font-size: 12px;
border: 1px solid;
cursor: pointer;
z-index: 1;
}
& > .drawing-item-copy{
right: 56px;
border-color: $lighterBlue;
color: $lighterBlue;
background: #fff;
&:hover{
background: $lighterBlue;
color: #fff;
}
}
& > .drawing-item-delete{
right: 24px;
border-color: #F56C6C;
color: #F56C6C;
background: #fff;
&:hover{
background: #F56C6C;
color: #fff;
}
}
}
</style>
-60
View File
@@ -1,60 +0,0 @@
<template>
<el-form ref="basicInfoForm" :model="info" :rules="rules" label-width="150px">
<el-row>
<el-col :span="12">
<el-form-item label="表名称" prop="tableName">
<el-input placeholder="请输入仓库名称" v-model="info.tableName" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="表描述" prop="tableComment">
<el-input placeholder="请输入" v-model="info.tableComment" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="实体类名称" prop="className">
<el-input placeholder="请输入" v-model="info.className" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="作者" prop="functionAuthor">
<el-input placeholder="请输入" v-model="info.functionAuthor" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="备注" prop="remark">
<el-input type="textarea" :rows="3" v-model="info.remark"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
<script>
export default {
props: {
info: {
type: Object,
default: null
}
},
data() {
return {
rules: {
tableName: [
{ required: true, message: "请输入表名称", trigger: "blur" }
],
tableComment: [
{ required: true, message: "请输入表描述", trigger: "blur" }
],
className: [
{ required: true, message: "请输入实体类名称", trigger: "blur" }
],
functionAuthor: [
{ required: true, message: "请输入作者", trigger: "blur" }
]
}
};
}
};
</script>
-234
View File
@@ -1,234 +0,0 @@
<template>
<el-card>
<el-tabs v-model="activeName">
<el-tab-pane label="基本信息" name="basic">
<basic-info-form ref="basicInfo" :info="info" />
</el-tab-pane>
<el-tab-pane label="字段信息" name="columnInfo">
<el-table ref="dragTable" :data="columns" row-key="columnId" :max-height="tableHeight">
<el-table-column label="序号" type="index" min-width="5%" class-name="allowDrag" />
<el-table-column
label="字段列名"
prop="columnName"
min-width="10%"
:show-overflow-tooltip="true"
/>
<el-table-column label="字段描述" min-width="10%">
<template slot-scope="scope">
<el-input v-model="scope.row.columnComment"></el-input>
</template>
</el-table-column>
<el-table-column
label="物理类型"
prop="columnType"
min-width="10%"
:show-overflow-tooltip="true"
/>
<el-table-column label="Java类型" min-width="11%">
<template slot-scope="scope">
<el-select v-model="scope.row.javaType">
<el-option label="Long" value="Long" />
<el-option label="String" value="String" />
<el-option label="Integer" value="Integer" />
<el-option label="Double" value="Double" />
<el-option label="BigDecimal" value="BigDecimal" />
<el-option label="Date" value="Date" />
<el-option label="Boolean" value="Boolean" />
</el-select>
</template>
</el-table-column>
<el-table-column label="java属性" min-width="10%">
<template slot-scope="scope">
<el-input v-model="scope.row.javaField"></el-input>
</template>
</el-table-column>
<el-table-column label="插入" min-width="5%">
<template slot-scope="scope">
<el-checkbox true-label="1" false-label="0" v-model="scope.row.isInsert"></el-checkbox>
</template>
</el-table-column>
<el-table-column label="编辑" min-width="5%">
<template slot-scope="scope">
<el-checkbox true-label="1" false-label="0" v-model="scope.row.isEdit"></el-checkbox>
</template>
</el-table-column>
<el-table-column label="列表" min-width="5%">
<template slot-scope="scope">
<el-checkbox true-label="1" false-label="0" v-model="scope.row.isList"></el-checkbox>
</template>
</el-table-column>
<el-table-column label="查询" min-width="5%">
<template slot-scope="scope">
<el-checkbox true-label="1" false-label="0" v-model="scope.row.isQuery"></el-checkbox>
</template>
</el-table-column>
<el-table-column label="查询方式" min-width="10%">
<template slot-scope="scope">
<el-select v-model="scope.row.queryType">
<el-option label="=" value="EQ" />
<el-option label="!=" value="NE" />
<el-option label=">" value="GT" />
<el-option label=">=" value="GTE" />
<el-option label="<" value="LT" />
<el-option label="<=" value="LTE" />
<el-option label="LIKE" value="LIKE" />
<el-option label="BETWEEN" value="BETWEEN" />
</el-select>
</template>
</el-table-column>
<el-table-column label="必填" min-width="5%">
<template slot-scope="scope">
<el-checkbox true-label="1" false-label="0" v-model="scope.row.isRequired"></el-checkbox>
</template>
</el-table-column>
<el-table-column label="显示类型" min-width="12%">
<template slot-scope="scope">
<el-select v-model="scope.row.htmlType">
<el-option label="文本框" value="input" />
<el-option label="文本域" value="textarea" />
<el-option label="下拉框" value="select" />
<el-option label="单选框" value="radio" />
<el-option label="复选框" value="checkbox" />
<el-option label="日期控件" value="datetime" />
<el-option label="图片上传" value="imageUpload" />
<el-option label="文件上传" value="fileUpload" />
<el-option label="富文本控件" value="editor" />
</el-select>
</template>
</el-table-column>
<el-table-column label="字典类型" min-width="12%">
<template slot-scope="scope">
<el-select v-model="scope.row.dictType" clearable filterable placeholder="请选择">
<el-option
v-for="dict in dictOptions"
:key="dict.dictType"
:label="dict.dictName"
:value="dict.dictType">
<span style="float: left">{{ dict.dictName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ dict.dictType }}</span>
</el-option>
</el-select>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane label="生成信息" name="genInfo">
<gen-info-form ref="genInfo" :info="info" :tables="tables" :menus="menus"/>
</el-tab-pane>
</el-tabs>
<el-form label-width="100px">
<el-form-item style="text-align: center;margin-left:-100px;margin-top:10px;">
<el-button type="primary" @click="submitForm()">提交</el-button>
<el-button @click="close()">返回</el-button>
</el-form-item>
</el-form>
</el-card>
</template>
<script>
import { getGenTable, updateGenTable } from "@/api/tool/gen";
import { optionselect as getDictOptionselect } from "@/api/system/dict/type";
import { listMenu as getMenuTreeselect } from "@/api/system/menu";
import basicInfoForm from "./basicInfoForm";
import genInfoForm from "./genInfoForm";
import Sortable from 'sortablejs'
export default {
name: "GenEdit",
components: {
basicInfoForm,
genInfoForm
},
data() {
return {
// 选中选项卡的 name
activeName: "columnInfo",
// 表格的高度
tableHeight: document.documentElement.scrollHeight - 245 + "px",
// 表信息
tables: [],
// 表列信息
columns: [],
// 字典信息
dictOptions: [],
// 菜单信息
menus: [],
// 表详细信息
info: {}
};
},
created() {
const tableId = this.$route.params && this.$route.params.tableId;
if (tableId) {
// 获取表详细信息
getGenTable(tableId).then(res => {
this.columns = res.data.rows;
this.info = res.data.info;
this.tables = res.data.tables;
});
/** 查询字典下拉列表 */
getDictOptionselect().then(response => {
this.dictOptions = response.data;
});
/** 查询菜单下拉列表 */
getMenuTreeselect().then(response => {
this.menus = this.handleTree(response.data, "menuId");
});
}
},
methods: {
/** 提交按钮 */
submitForm() {
const basicForm = this.$refs.basicInfo.$refs.basicInfoForm;
const genForm = this.$refs.genInfo.$refs.genInfoForm;
Promise.all([basicForm, genForm].map(this.getFormPromise)).then(res => {
const validateResult = res.every(item => !!item);
if (validateResult) {
const genTable = Object.assign({}, basicForm.model, genForm.model);
genTable.columns = this.columns;
genTable.params = {
treeCode: genTable.treeCode,
treeName: genTable.treeName,
treeParentCode: genTable.treeParentCode,
parentMenuId: genTable.parentMenuId
};
updateGenTable(genTable).then(res => {
this.$modal.msgSuccess(res.msg);
if (res.code === 200) {
this.close();
}
});
} else {
this.$modal.msgError("表单校验未通过,请重新检查提交内容");
}
});
},
getFormPromise(form) {
return new Promise(resolve => {
form.validate(res => {
resolve(res);
});
});
},
/** 关闭按钮 */
close() {
const obj = { path: "/tool/gen", query: { t: Date.now(), pageNum: this.$route.query.pageNum } };
this.$tab.closeOpenPage(obj);
}
},
mounted() {
const el = this.$refs.dragTable.$el.querySelectorAll(".el-table__body-wrapper > table > tbody")[0];
const sortable = Sortable.create(el, {
handle: ".allowDrag",
onEnd: evt => {
const targetRow = this.columns.splice(evt.oldIndex, 1)[0];
this.columns.splice(evt.newIndex, 0, targetRow);
for (let index in this.columns) {
this.columns[index].sort = parseInt(index) + 1;
}
}
});
}
};
</script>
-299
View File
@@ -1,299 +0,0 @@
<template>
<el-form ref="genInfoForm" :model="info" :rules="rules" label-width="150px">
<el-row>
<el-col :span="12">
<el-form-item prop="tplCategory">
<span slot="label">生成模板</span>
<el-select v-model="info.tplCategory" @change="tplSelectChange">
<el-option label="单表(增删改查)" value="crud" />
<el-option label="树表(增删改查)" value="tree" />
<el-option label="主子表(增删改查)" value="sub" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="packageName">
<span slot="label">
生成包路径
<el-tooltip content="生成在哪个java包下,例如 com.ruoyi.system" placement="top">
<i class="el-icon-question"></i>
</el-tooltip>
</span>
<el-input v-model="info.packageName" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="moduleName">
<span slot="label">
生成模块名
<el-tooltip content="可理解为子系统名,例如 system" placement="top">
<i class="el-icon-question"></i>
</el-tooltip>
</span>
<el-input v-model="info.moduleName" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="businessName">
<span slot="label">
生成业务名
<el-tooltip content="可理解为功能英文名,例如 user" placement="top">
<i class="el-icon-question"></i>
</el-tooltip>
</span>
<el-input v-model="info.businessName" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="functionName">
<span slot="label">
生成功能名
<el-tooltip content="用作类描述,例如 用户" placement="top">
<i class="el-icon-question"></i>
</el-tooltip>
</span>
<el-input v-model="info.functionName" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item>
<span slot="label">
上级菜单
<el-tooltip content="分配到指定菜单下,例如 系统管理" placement="top">
<i class="el-icon-question"></i>
</el-tooltip>
</span>
<treeselect
:append-to-body="true"
v-model="info.parentMenuId"
:options="menus"
:normalizer="normalizer"
:show-count="true"
placeholder="请选择系统菜单"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="genType">
<span slot="label">
生成代码方式
<el-tooltip content="默认为zip压缩包下载,也可以自定义生成路径" placement="top">
<i class="el-icon-question"></i>
</el-tooltip>
</span>
<el-radio v-model="info.genType" label="0">zip压缩包</el-radio>
<el-radio v-model="info.genType" label="1">自定义路径</el-radio>
</el-form-item>
</el-col>
<el-col :span="24" v-if="info.genType == '1'">
<el-form-item prop="genPath">
<span slot="label">
自定义路径
<el-tooltip content="填写磁盘绝对路径,若不填写,则生成到当前Web项目下" placement="top">
<i class="el-icon-question"></i>
</el-tooltip>
</span>
<el-input v-model="info.genPath">
<el-dropdown slot="append">
<el-button type="primary">
最近路径快速选择
<i class="el-icon-arrow-down el-icon--right"></i>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="info.genPath = '/'">恢复默认的生成基础路径</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row v-show="info.tplCategory == 'tree'">
<h4 class="form-header">其他信息</h4>
<el-col :span="12">
<el-form-item>
<span slot="label">
树编码字段
<el-tooltip content="树显示的编码字段名, 如:dept_id" placement="top">
<i class="el-icon-question"></i>
</el-tooltip>
</span>
<el-select v-model="info.treeCode" placeholder="请选择">
<el-option
v-for="(column, index) in info.columns"
:key="index"
:label="column.columnName + ':' + column.columnComment"
:value="column.columnName"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item>
<span slot="label">
树父编码字段
<el-tooltip content="树显示的父编码字段名, 如:parent_Id" placement="top">
<i class="el-icon-question"></i>
</el-tooltip>
</span>
<el-select v-model="info.treeParentCode" placeholder="请选择">
<el-option
v-for="(column, index) in info.columns"
:key="index"
:label="column.columnName + ':' + column.columnComment"
:value="column.columnName"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item>
<span slot="label">
树名称字段
<el-tooltip content="树节点的显示名称字段名, 如:dept_name" placement="top">
<i class="el-icon-question"></i>
</el-tooltip>
</span>
<el-select v-model="info.treeName" placeholder="请选择">
<el-option
v-for="(column, index) in info.columns"
:key="index"
:label="column.columnName + ':' + column.columnComment"
:value="column.columnName"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row v-show="info.tplCategory == 'sub'">
<h4 class="form-header">关联信息</h4>
<el-col :span="12">
<el-form-item>
<span slot="label">
关联子表的表名
<el-tooltip content="关联子表的表名, 如:sys_user" placement="top">
<i class="el-icon-question"></i>
</el-tooltip>
</span>
<el-select v-model="info.subTableName" placeholder="请选择" @change="subSelectChange">
<el-option
v-for="(table, index) in tables"
:key="index"
:label="table.tableName + ':' + table.tableComment"
:value="table.tableName"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item>
<span slot="label">
子表关联的外键名
<el-tooltip content="子表关联的外键名, 如:user_id" placement="top">
<i class="el-icon-question"></i>
</el-tooltip>
</span>
<el-select v-model="info.subTableFkName" placeholder="请选择">
<el-option
v-for="(column, index) in subColumns"
:key="index"
:label="column.columnName + ':' + column.columnComment"
:value="column.columnName"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
<script>
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default {
components: { Treeselect },
props: {
info: {
type: Object,
default: null
},
tables: {
type: Array,
default: null
},
menus: {
type: Array,
default: []
},
},
data() {
return {
subColumns: [],
rules: {
tplCategory: [
{ required: true, message: "请选择生成模板", trigger: "blur" }
],
packageName: [
{ required: true, message: "请输入生成包路径", trigger: "blur" }
],
moduleName: [
{ required: true, message: "请输入生成模块名", trigger: "blur" }
],
businessName: [
{ required: true, message: "请输入生成业务名", trigger: "blur" }
],
functionName: [
{ required: true, message: "请输入生成功能名", trigger: "blur" }
],
}
};
},
created() {},
watch: {
'info.subTableName': function(val) {
this.setSubTableColumns(val);
}
},
methods: {
/** 转换菜单数据结构 */
normalizer(node) {
if (node.children && !node.children.length) {
delete node.children;
}
return {
id: node.menuId,
label: node.menuName,
children: node.children
};
},
/** 选择子表名触发 */
subSelectChange(value) {
this.info.subTableFkName = '';
},
/** 选择生成模板触发 */
tplSelectChange(value) {
if(value !== 'sub') {
this.info.subTableName = '';
this.info.subTableFkName = '';
}
},
/** 设置关联外键 */
setSubTableColumns(value) {
for (var item in this.tables) {
const name = this.tables[item].tableName;
if (value === name) {
this.subColumns = this.tables[item].columns;
break;
}
}
}
}
};
</script>
-120
View File
@@ -1,120 +0,0 @@
<template>
<!-- 导入表 -->
<el-dialog title="导入表" :visible.sync="visible" width="800px" top="5vh" append-to-body>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true">
<el-form-item label="表名称" prop="tableName">
<el-input
v-model="queryParams.tableName"
placeholder="请输入表名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="表描述" prop="tableComment">
<el-input
v-model="queryParams.tableComment"
placeholder="请输入表描述"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row>
<el-table @row-click="clickRow" ref="table" :data="dbTableList" @selection-change="handleSelectionChange" height="260px">
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column prop="tableName" label="表名称" :show-overflow-tooltip="true"></el-table-column>
<el-table-column prop="tableComment" label="表描述" :show-overflow-tooltip="true"></el-table-column>
<el-table-column prop="createTime" label="创建时间"></el-table-column>
<el-table-column prop="updateTime" label="更新时间"></el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-row>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleImportTable">确 定</el-button>
<el-button @click="visible = false">取 消</el-button>
</div>
</el-dialog>
</template>
<script>
import { listDbTable, importTable } from "@/api/tool/gen";
export default {
data() {
return {
// 遮罩层
visible: false,
// 选中数组值
tables: [],
// 总条数
total: 0,
// 表数据
dbTableList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
tableName: undefined,
tableComment: undefined
}
};
},
methods: {
// 显示弹框
show() {
this.getList();
this.visible = true;
},
clickRow(row) {
this.$refs.table.toggleRowSelection(row);
},
// 多选框选中数据
handleSelectionChange(selection) {
this.tables = selection.map(item => item.tableName);
},
// 查询表数据
getList() {
listDbTable(this.queryParams).then(res => {
if (res.code === 200) {
this.dbTableList = res.rows;
this.total = res.total;
}
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
/** 导入按钮操作 */
handleImportTable() {
const tableNames = this.tables.join(",");
if (tableNames == "") {
this.$modal.msgError("请选择要导入的表");
return;
}
importTable({ tables: tableNames }).then(res => {
this.$modal.msgSuccess(res.msg);
if (res.code === 200) {
this.visible = false;
this.$emit("ok");
}
});
}
}
};
</script>
-337
View File
@@ -1,337 +0,0 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="表名称" prop="tableName">
<el-input
v-model="queryParams.tableName"
placeholder="请输入表名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="表描述" prop="tableComment">
<el-input
v-model="queryParams.tableComment"
placeholder="请输入表描述"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="创建时间">
<el-date-picker
v-model="dateRange"
style="width: 240px"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-download"
size="mini"
@click="handleGenTable"
v-hasPermi="['tool:gen:code']"
>生成</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="info"
plain
icon="el-icon-upload"
size="mini"
@click="openImportTable"
v-hasPermi="['tool:gen:import']"
>导入</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleEditTable"
v-hasPermi="['tool:gen:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['tool:gen:remove']"
>删除</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="tableList" @selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" width="55"></el-table-column>
<el-table-column label="序号" type="index" width="50" align="center">
<template slot-scope="scope">
<span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
</template>
</el-table-column>
<el-table-column
label="表名称"
align="center"
prop="tableName"
:show-overflow-tooltip="true"
width="120"
/>
<el-table-column
label="表描述"
align="center"
prop="tableComment"
:show-overflow-tooltip="true"
width="120"
/>
<el-table-column
label="实体"
align="center"
prop="className"
:show-overflow-tooltip="true"
width="120"
/>
<el-table-column label="创建时间" align="center" prop="createTime" width="160" />
<el-table-column label="更新时间" align="center" prop="updateTime" width="160" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
type="text"
size="small"
icon="el-icon-view"
@click="handlePreview(scope.row)"
v-hasPermi="['tool:gen:preview']"
>预览</el-button>
<el-button
type="text"
size="small"
icon="el-icon-edit"
@click="handleEditTable(scope.row)"
v-hasPermi="['tool:gen:edit']"
>编辑</el-button>
<el-button
type="text"
size="small"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['tool:gen:remove']"
>删除</el-button>
<el-button
type="text"
size="small"
icon="el-icon-refresh"
@click="handleSynchDb(scope.row)"
v-hasPermi="['tool:gen:edit']"
>同步</el-button>
<el-button
type="text"
size="small"
icon="el-icon-download"
@click="handleGenTable(scope.row)"
v-hasPermi="['tool:gen:code']"
>生成代码</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 预览界面 -->
<el-dialog :title="preview.title" :visible.sync="preview.open" width="80%" top="5vh" append-to-body class="scrollbar">
<el-tabs v-model="preview.activeName">
<el-tab-pane
v-for="(value, key) in preview.data"
:label="key.substring(key.lastIndexOf('/')+1,key.indexOf('.vm'))"
:name="key.substring(key.lastIndexOf('/')+1,key.indexOf('.vm'))"
:key="key"
>
<el-link :underline="false" icon="el-icon-document-copy" v-clipboard:copy="value" v-clipboard:success="clipboardSuccess" style="float:right">复制</el-link>
<pre><code class="hljs" v-html="highlightedCode(value, key)"></code></pre>
</el-tab-pane>
</el-tabs>
</el-dialog>
<import-table ref="import" @ok="handleQuery" />
</div>
</template>
<script>
import { listTable, previewTable, delTable, genCode, synchDb } from "@/api/tool/gen";
import importTable from "./importTable";
import hljs from "highlight.js/lib/highlight";
import "highlight.js/styles/github-gist.css";
hljs.registerLanguage("java", require("highlight.js/lib/languages/java"));
hljs.registerLanguage("xml", require("highlight.js/lib/languages/xml"));
hljs.registerLanguage("html", require("highlight.js/lib/languages/xml"));
hljs.registerLanguage("vue", require("highlight.js/lib/languages/xml"));
hljs.registerLanguage("javascript", require("highlight.js/lib/languages/javascript"));
hljs.registerLanguage("sql", require("highlight.js/lib/languages/sql"));
export default {
name: "Gen",
components: { importTable },
data() {
return {
// 遮罩层
loading: true,
// 唯一标识符
uniqueId: "",
// 选中数组
ids: [],
// 选中表数组
tableNames: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 表数据
tableList: [],
// 日期范围
dateRange: "",
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
tableName: undefined,
tableComment: undefined
},
// 预览参数
preview: {
open: false,
title: "代码预览",
data: {},
activeName: "domain.java"
}
};
},
created() {
this.getList();
},
activated() {
const time = this.$route.query.t;
if (time != null && time != this.uniqueId) {
this.uniqueId = time;
this.queryParams.pageNum = Number(this.$route.query.pageNum);
this.getList();
}
},
methods: {
/** 查询表集合 */
getList() {
this.loading = true;
listTable(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
this.tableList = response.rows;
this.total = response.total;
this.loading = false;
}
);
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 生成代码操作 */
handleGenTable(row) {
const tableNames = row.tableName || this.tableNames;
if (tableNames == "") {
this.$modal.msgError("请选择要生成的数据");
return;
}
if(row.genType === "1") {
genCode(row.tableName).then(response => {
this.$modal.msgSuccess("成功生成到自定义路径:" + row.genPath);
});
} else {
this.$download.zip("/tool/gen/batchGenCode?tables=" + tableNames, "ruoyi.zip");
}
},
/** 同步数据库操作 */
handleSynchDb(row) {
const tableName = row.tableName;
this.$modal.confirm('确认要强制同步"' + tableName + '"表结构吗?').then(function() {
return synchDb(tableName);
}).then(() => {
this.$modal.msgSuccess("同步成功");
}).catch(() => {});
},
/** 打开导入表弹窗 */
openImportTable() {
this.$refs.import.show();
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = [];
this.resetForm("queryForm");
this.handleQuery();
},
/** 预览按钮 */
handlePreview(row) {
previewTable(row.tableId).then(response => {
this.preview.data = response.data;
this.preview.open = true;
this.preview.activeName = "domain.java";
});
},
/** 高亮显示 */
highlightedCode(code, key) {
const vmName = key.substring(key.lastIndexOf("/") + 1, key.indexOf(".vm"));
var language = vmName.substring(vmName.indexOf(".") + 1, vmName.length);
const result = hljs.highlight(language, code || "", true);
return result.value || '&nbsp;';
},
/** 复制代码成功 */
clipboardSuccess() {
this.$modal.msgSuccess("复制成功");
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.tableId);
this.tableNames = selection.map(item => item.tableName);
this.single = selection.length != 1;
this.multiple = !selection.length;
},
/** 修改按钮操作 */
handleEditTable(row) {
const tableId = row.tableId || this.ids[0];
const tableName = row.tableName || this.tableNames[0];
const params = { pageNum: this.queryParams.pageNum };
this.$tab.openPage("修改[" + tableName + "]生成配置", '/tool/gen-edit/index/' + tableId, params);
},
/** 删除按钮操作 */
handleDelete(row) {
const tableIds = row.tableId || this.ids;
this.$modal.confirm('是否确认删除表编号为"' + tableIds + '"的数据项?').then(function() {
return delTable(tableIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
}
}
};
</script>
-15
View File
@@ -1,15 +0,0 @@
<template>
<i-frame :src="url" />
</template>
<script>
import iFrame from "@/components/iFrame/index";
export default {
name: "Swagger",
components: { iFrame },
data() {
return {
url: process.env.VUE_APP_BASE_API + "/swagger-ui/index.html"
};
},
};
</script>