xy 2 years ago
parent e3457a2307
commit 52bf586e01

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

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

Loading…
Cancel
Save