xy 2 years ago
parent e3457a2307
commit 52bf586e01

@ -26,6 +26,7 @@
<td>
<div style="text-align: left;padding: 20px;height: 100%;">
{{ data.content }}
<p style="text-align: right;padding: 10px 6px;">执行状态{{ typeMap.get(data.status) }}</p>
</div>
</td>
</tr>
@ -47,7 +48,15 @@ export default {
data() {
return {
isShow: false,
data: {}
data: {},
typeMap: new Map([
[1,'待下发'],
[2,'已下发'],
[3,'待执行'],
[4,'执行中'],
[5,'已取消'],
[6,'已完成']
])
}
},
methods: {

@ -43,15 +43,19 @@
<span style="color: red;"> {{ abilities.find(i => i.value === ability) ? abilities.find(i => i.value === ability).key : '' }} </span>
调令
</p>
<DatePicker
:value="date"
type="date"
format="yyyy-MM-dd"
:options="options"
<el-radio-group size="small" style="margin-left: 14px;" v-model="createType">
<el-radio-button :label="1"></el-radio-button>
<el-radio-button :label="2"></el-radio-button>
</el-radio-group>
<el-date-picker
v-model="date"
:type="createType === 1 ? 'date' : 'week'"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions"
placeholder="日期选择"
:format="createType === 1 ? 'yyyy-MM-dd' : 'yyyy第WW周'"
style="width: 160px; margin-left: 14px"
@on-change="(e) => (date = e)"
></DatePicker>
></el-date-picker>
</div>
</div>
@ -79,38 +83,29 @@ export default {
inject: ["equipments"],
props: {},
data() {
const _this = this;
return {
options: {
shortcuts: [
{
text: "今天",
onClick() {
_this.date = _this.$moment().format("YYYY-MM-DD");
},
},
{
text: "明天",
onClick() {
_this.date = _this.$moment().add(1, "days").format("YYYY-MM-DD");
},
},
{
text: "一周后",
onClick() {
_this.date = _this.$moment().add(1, "weeks").format("YYYY-MM-DD");
},
},
{
text: "一个月后",
onClick() {
_this.date = _this
.$moment()
.add(1, "months")
.format("YYYY-MM-DD");
},
},
],
createType: 1,
pickerOptions: {
shortcuts: [{
text: '今天',
onClick(picker) {
picker.$emit('pick', new Date());
}
}, {
text: '明天',
onClick(picker) {
const date = new Date();
date.setTime(date.getTime() + 3600 * 1000 * 24);
picker.$emit('pick', date);
}
}, {
text: '下周',
onClick(picker) {
const date = new Date();
date.setTime(date.getTime() + 3600 * 1000 * 24 * 7);
picker.$emit('pick', date);
}
}]
},
areas: [],
types: [],
@ -337,6 +332,9 @@ export default {
};
},
methods: {
datePick (e) {
console.log(e)
},
clear () {
this.select = {

Loading…
Cancel
Save