样式优化

master
fanluyan 2 years ago
parent ac41047225
commit f56f5f75b2

@ -34,6 +34,7 @@ service.interceptors.response.use(
const res = response.data; const res = response.data;
if (res.code !== 200) { if (res.code !== 200) {
Message({ Message({
showClose: true,
message: res.msg || "Error", message: res.msg || "Error",
type: "error", type: "error",
duration: 5 * 1000, duration: 5 * 1000,
@ -42,13 +43,26 @@ service.interceptors.response.use(
// Message({ message: '重新登录', type: 'error', duration: 5 * 1000 }) // Message({ message: '重新登录', type: 'error', duration: 5 * 1000 })
router.push("/login"); router.push("/login");
} }
if (res.code === 500) {
Message({
showClose: true,
message: 服务器错误(500),
type: "error",
duration: 5 * 1000,
});
}
return Promise.reject(new Error(res.msg || "Error")); return Promise.reject(new Error(res.msg || "Error"));
} else { } else {
return res; return res;
} }
}, },
(error) => { (error) => {
Message({ message: error.message, type: "error", duration: 5 * 1000 }); Message({
message: error.message,
showClose: true,
type: "error",
duration: 5 * 1000,
});
return Promise.reject(error); return Promise.reject(error);
} }
); );

@ -69,7 +69,11 @@
</div> </div>
</div> </div>
<el-button class="searchBtn" type="text" @click="inquirebtn()" <el-button
class="searchBtn"
type="text"
:loading="compareloading"
@click="inquirebtn()"
>装置时间表对比</el-button >装置时间表对比</el-button
> >
</div> </div>
@ -279,6 +283,7 @@ export default {
sureloading: false, sureloading: false,
offsetnum: "", offsetnum: "",
setNum: Math.floor(Math.random() * 10), setNum: Math.floor(Math.random() * 10),
compareloading: false,
}; };
}, },
mounted() { mounted() {
@ -340,6 +345,7 @@ export default {
// //
inquirebtn() { inquirebtn() {
console.log(this.selaccess, this.selfacilityId); console.log(this.selaccess, this.selfacilityId);
this.compareloading = true;
cmaSchelduleDetials({ cmaSchelduleDetials({
channelid: this.selaccess, channelid: this.selaccess,
terminalid: this.selfacilityId, terminalid: this.selfacilityId,
@ -367,12 +373,14 @@ export default {
if (res.code == 200) { if (res.code == 200) {
if (res.data.isNew == true) { if (res.data.isNew == true) {
// this.shedulenr = res.data.list.join("; ") // this.shedulenr = res.data.list.join("; ")
this.compareloading = false;
this.newshedulenr = res.data.list; this.newshedulenr = res.data.list;
this.timernum = 0; this.timernum = 0;
// this.$message.success(""); // this.$message.success("");
clearInterval(this.timer); clearInterval(this.timer);
this.timer = null; this.timer = null;
} else if (this.timernum > 9) { } else if (this.timernum > 9) {
this.compareloading = false;
this.searchloading = false; this.searchloading = false;
this.timernum = 0; this.timernum = 0;
this.$message.warning("暂无拍照时间表!"); this.$message.warning("暂无拍照时间表!");
@ -384,6 +392,7 @@ export default {
} }
}) })
.catch((err) => { .catch((err) => {
this.compareloading = false;
this.$message.error("查询失败"); this.$message.error("查询失败");
clearInterval(this.timer); clearInterval(this.timer);
this.timer = null; this.timer = null;
@ -636,9 +645,12 @@ export default {
} }
.searchBtn { .searchBtn {
font-size: 14px; font-size: 14px;
text-decoration-line: underline;
display: flex; display: flex;
margin-left: auto; margin-left: auto;
span {
text-decoration-line: underline;
}
} }
.flexnr { .flexnr {
display: flex; display: flex;

@ -88,9 +88,19 @@
<el-option <el-option
v-for="item in channelListOption" v-for="item in channelListOption"
:key="item.value" :key="item.value"
:label="item.label" :label="
item.alias !== null && item.alias !== ''
? item.alias
: item.label
"
:value="item.value" :value="item.value"
> >
{{
item.alias !== null && item.alias !== ""
? item.alias
: item.label
}}
<!-- {{ item.label }}{{ item.alias }} -->
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
@ -392,12 +402,14 @@ export default {
label: "全部", label: "全部",
value: "", value: "",
termid: "", termid: "",
alias: "",
}); });
this.channelList.forEach((item) => { this.channelList.forEach((item) => {
this.channelListOption.push({ this.channelListOption.push({
label: item.channelname, label: item.channelname,
value: item.channelid, value: item.channelid,
termid: item.termId, termid: item.termId,
alias: item.alias,
}); });
}); });
this.channelListValue = this.channelListOption[0].value; // this.channelListValue = this.channelListOption[0].value; //

@ -49,9 +49,19 @@
<el-option <el-option
v-for="item in tdOptions" v-for="item in tdOptions"
:key="item.id" :key="item.id"
:label="item.name" :label="
item.alias !== null && item.alias !== ''
? item.alias
: item.name
"
:value="item.id" :value="item.id"
></el-option> >
{{
item.alias !== null && item.alias !== ""
? item.alias
: item.name
}}
</el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="日期"> <el-form-item label="日期">
@ -98,6 +108,11 @@
$moment(item.photoTime).format("MM-DD HH:mm") $moment(item.photoTime).format("MM-DD HH:mm")
}} }}
/ {{ item.channnelname }} / {{ item.channnelname }}
{{
item.alias !== null && item.alias !== ""
? item.alias
: item.channnelname
}}
<!-- 上传时间{{ <!-- 上传时间{{
$moment(item.recvTime).format("YYYY-MM-DD HH:mm:ss") $moment(item.recvTime).format("YYYY-MM-DD HH:mm:ss")
}} --> }} -->
@ -122,10 +137,13 @@
}} }}
</p> </p>
<p class="infoBottom"> <p class="infoBottom">
拍照时间{{ 拍照时间{{ $moment(item.photoTime).format("MM-DD HH:mm") }}
$moment(item.photoTime).format("MM-DD HH:mm") /
{{
item.alias !== null && item.alias !== ""
? item.alias
: item.channnelname
}} }}
/ {{ item.channnelname }}
<!-- 上传时间{{ <!-- 上传时间{{
$moment(item.recvTime).format("YYYY-MM-DD HH:mm:ss") $moment(item.recvTime).format("YYYY-MM-DD HH:mm:ss")
}} --> }} -->
@ -174,7 +192,7 @@ export default {
xlOptions: [{ id: 0, name: "全部" }], //线 xlOptions: [{ id: 0, name: "全部" }], //线
gtOptions: [{ id: 0, name: "全部" }], // gtOptions: [{ id: 0, name: "全部" }], //
zzOptions: [{ id: 0, name: "全部" }], // zzOptions: [{ id: 0, name: "全部" }], //
tdOptions: [{ id: 0, name: "全部" }], // tdOptions: [{ id: 0, name: "全部", alias: "" }], //
formdata: { formdata: {
dyid: "", dyid: "",
lineid: "", lineid: "",
@ -254,7 +272,7 @@ export default {
getSearchtd() { getSearchtd() {
getSearchInfo({ type: 5, id: this.formdata.termid }) getSearchInfo({ type: 5, id: this.formdata.termid })
.then((res) => { .then((res) => {
this.tdOptions = [{ id: 0, name: "全部" }]; this.tdOptions = [{ id: 0, name: "全部", alias: "" }];
this.tdOptions = this.tdOptions.concat(res.data.list); this.tdOptions = this.tdOptions.concat(res.data.list);
this.formdata.channelid = this.tdOptions[0].id; this.formdata.channelid = this.tdOptions[0].id;
// if (this.signtype == 0) { // if (this.signtype == 0) {

Loading…
Cancel
Save