dhy
杜函宇 1 year ago
parent 388eab7bbc
commit 019aeeaa60

@ -87,11 +87,11 @@ export default {
trigger: "item", trigger: "item",
}, },
legend: { legend: {
width: "45%", width: "40%",
top: "25%", top: "25%",
right: "10%", right: "10%",
orient: "horizontal", orient: "horizontal",
itemGap: 25, itemGap: 27,
itemWidth: 10, itemWidth: 10,
itemHeight: 10, itemHeight: 10,
icon: "circle", icon: "circle",

@ -165,6 +165,7 @@
<el-col :span="24"> <el-col :span="24">
<el-form-item label="企业名称:" prop="enterpriseName"> <el-form-item label="企业名称:" prop="enterpriseName">
<el-input <el-input
placeholder="请输入企业名称"
v-model="form.enterpriseName" v-model="form.enterpriseName"
size="small" size="small"
></el-input> ></el-input>
@ -185,9 +186,9 @@
<el-form-item label="年份:" prop="year"> <el-form-item label="年份:" prop="year">
<el-date-picker <el-date-picker
v-model="form.year" v-model="form.year"
type="month" type="year"
placeholder="请选择" placeholder="请选择"
value-format="yyyy-MM" value-format="yyyy"
size="small" size="small"
> >
</el-date-picker> </el-date-picker>
@ -314,6 +315,45 @@ export default {
components: { myPagination, executive }, components: { myPagination, executive },
name: "Article", name: "Article",
data() { data() {
//
var checkSocialCreditCode = (rule, code, callback) => {
// false
if (!code) {
return callback(new Error("请输入统一社会信用代码"));
}
//18
const reg = /^\w\w\d{6}\w{9}\w$/;
if (code.length !== 18 || !reg.test(code)) {
return callback(new Error("请输入正确的统一社会信用代码"));
}
const codeOrigin = "0123456789ABCDEFGHJKLMNPQRTUWXY"; // IOSVZ
const weightedfactors = [
1, 3, 9, 27, 19, 26, 16, 17, 20, 29, 25, 13, 8, 24, 10, 30, 28,
]; //
let ci; //
let wi; //
let total = 0; //
//
for (let i = 0; i < code.length - 1; i++) {
ci = codeOrigin.indexOf(code[i]);
wi = weightedfactors[i];
total += ci * wi;
}
//
let logicCheckCode = 31 - (total % 31);
if (logicCheckCode === 31) logicCheckCode = 0;
logicCheckCode = codeOrigin[logicCheckCode];
if (logicCheckCode !== code.slice(17)) {
return callback(new Error("请输入正确的统一社会信用代码"));
} else {
callback();
}
};
return { return {
tableData: [], tableData: [],
options: [], options: [],
@ -361,9 +401,7 @@ export default {
enterpriseName: [ enterpriseName: [
{ required: true, message: "请输入企业名称", trigger: "blur" }, { required: true, message: "请输入企业名称", trigger: "blur" },
], ],
entCode: [ entCode: [{ validator: checkSocialCreditCode, trigger: "blur" }],
{ required: true, message: "请输入企业信用代码", trigger: "blur" },
],
year: [{ required: true, message: "请选择年份", trigger: "blur" }], year: [{ required: true, message: "请选择年份", trigger: "blur" }],
}, },
// //

@ -35,12 +35,13 @@
</div> </div>
</div> </div>
<!-- 各区域执法计划 --> <!-- 各区域执法计划 -->
<div class="bodyBox boxAllStyle" v-if="activeIndex == 1"> <div v-if="activeIndex == 1" class="boxs">
<div class="bodyBox boxAllStyle">
<div id="execution"> <div id="execution">
<executionPlan :newTable="newTable" :loadS="loadS"></executionPlan> <executionPlan :newTable="newTable" :loadS="loadS"></executionPlan>
</div> </div>
</div> </div>
<div class="bottomBox" v-if="activeIndex == 1"> <div class="bottomBox">
<div class="boxAllStyle"> <div class="boxAllStyle">
<completePlan :newTable="newTable" :loadS="loadS"></completePlan> <completePlan :newTable="newTable" :loadS="loadS"></completePlan>
</div> </div>
@ -49,6 +50,8 @@
<finishRate :newTable="newTable" :loadS="loadS"></finishRate> <finishRate :newTable="newTable" :loadS="loadS"></finishRate>
</div> </div>
</div> </div>
</div>
<div class="bgContent" v-if="activeIndex == 0"> <div class="bgContent" v-if="activeIndex == 0">
<div class="tables"> <div class="tables">
<el-table <el-table
@ -183,7 +186,7 @@ export default {
beforeParams: {}, beforeParams: {},
// //
loadS: false, loadS: false,
newTable:[], newTable: [],
}; };
}, },
components: { components: {
@ -200,14 +203,14 @@ export default {
methods: { methods: {
searchList() { searchList() {
this.beforeParams = { ...this.beforeParams, ...this.ruleForm }; this.beforeParams = { ...this.beforeParams, ...this.ruleForm };
this.getHomeList() this.getHomeList();
}, },
getHomeList() { getHomeList() {
this.load1 = true; this.load1 = true;
this.loadS = true; this.loadS = true;
indexRegionalism(this.beforeParams).then((res) => { indexRegionalism(this.beforeParams).then((res) => {
this.tableData = res.rows; this.tableData = res.rows;
this.newTable = res.rows this.newTable = res.rows;
res.rows.forEach((value1, index1) => { res.rows.forEach((value1, index1) => {
if (value1.institutionName == "苏州市") { if (value1.institutionName == "苏州市") {
let arr1 = this.tableData.slice(index1, index1 + 1); let arr1 = this.tableData.slice(index1, index1 + 1);
@ -316,7 +319,9 @@ export default {
margin-top: 10px; margin-top: 10px;
} }
//=== //===
.boxs {
height: calc(100% - 48px);
}
.boxAllStyle { .boxAllStyle {
background: #ffffff; background: #ffffff;
box-shadow: 0px 1px 24px 0px #e2e2e2; box-shadow: 0px 1px 24px 0px #e2e2e2;
@ -409,7 +414,7 @@ export default {
} }
.bodyBox { .bodyBox {
width: 100%; width: 100%;
height: 250px; height: 45%;
margin-bottom: 15px; margin-bottom: 15px;
#execution { #execution {
@ -418,7 +423,7 @@ export default {
} }
} }
.bottomBox { .bottomBox {
height: calc(100% - 250px - 48px - 15px); height: calc(100% - 45% - 15px);
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
& > .boxAllStyle { & > .boxAllStyle {

Loading…
Cancel
Save